Commit Graph

36055 Commits

Author SHA1 Message Date
G. Paul Ziemba
460703f3e8 tests: add wait to RequireVpnRoutes, RequireUnicastRoutes
Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2024-07-28 09:00:49 -07:00
Russ White
7f10381374
Merge pull request #15797 from pguibert6WIND/isis_srv6_ls_subnet
isis, lib: add isis srv6 end sid to ls_prefix
2024-07-26 14:45:01 -04:00
Donald Sharp
1f5a663cb5
Merge pull request #16463 from opensourcerouting/bfd-remove-control-socket
bfdd: remove obsolete control socket
2024-07-26 10:24:37 -04:00
Donald Sharp
5856bf1d0b
Merge pull request #16467 from louis-6wind/fix-flex-algo-asla
isisd: fix building flex-algo asla at init
2024-07-26 09:29:38 -04:00
Donald Sharp
f7eac63073
Merge pull request #16471 from opensourcerouting/fix/treat_as_withdraw_stats
bgpd: Do not increment treat-as-withdraw counters if debug is enabled
2024-07-26 07:34:22 -04:00
Donald Sharp
07489b4a3b
Merge pull request #16473 from opensourcerouting/fix/add_soft_version_in_summary
bgpd: Show software version in bgp summary
2024-07-26 07:34:08 -04:00
Louis Scalbert
e3634cb7c5 isisd: free asla at last flex-algo unconfiguration
Free ASLA when the last flex-algo is unconfigured.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-26 11:31:51 +02:00
Louis Scalbert
ae27101e6f isisd: fix building asla at first flex-algo config
When an color affinity is set on an interface before configuring the
flex-algorithm, the ASLA (Application Specific Link-Attribute) sub-TLV
is not build. Flex-algo fails to build the paths when a affinity
constraint is required because of the lacking of information contained
in ASLA. There are no problems when the configuration order is reversed.
For example:

> affinity-map red bit-position 1
>
> interface eth2
>  link-params
>   affinity red
>
> router isis 1
>  mpls-te on
>  flex-algo 129
>   dataplane sr-mpls
>   advertise-definition
>   affinity include-any green

In isis_link_params_update_asla(), the ASLA sub-TLV is not build when
the list of flex-algos is empty.

Update ASLA when the first flex-algorithm is configured.

Fixes: 893882ee20 ("isisd: add isis flex-algo configuration backend")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-26 11:28:00 +02:00
Louis Scalbert
9c0e668050 isisd: move flex_algo_delete into flex_algo_destroy
Move flex_algo_delete() content into isis_instance_flex_algo_destroy()
because it is called only once.

Rename _flex_algo_delete to flex_algo_free()

Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-26 11:27:51 +02:00
Louis Scalbert
67e2718e1c lib: remove duplicated flex_algos_free prototype
Remove duplicated flex_algos_free prototype

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-07-26 11:24:37 +02:00
Donatas Abraitis
353efe7ae8
Merge pull request #16416 from raja-rajasekar/rajasekarr/fix_logs_bp
bgpd: backpressure - fix ret value and log err for evpn
2024-07-25 21:09:39 +03:00
Donatas Abraitis
23c756ce68
Merge pull request #16472 from donaldsharp/msdp_bug
pimd: Fix msdp setting of sa->rp
2024-07-25 21:09:19 +03:00
Donald Sharp
4e7f4d0d36
Merge pull request #16470 from opensourcerouting/fix/keep_last_reset_reasons
bgpd: Keep the last reset reason before we reset the peer
2024-07-25 13:49:55 -04:00
mobash-rasool
3ddf5cf28f
Merge pull request #16041 from sri-mohan1/srib-24-zebra-d
zebra: changes for code maintainability
2024-07-25 22:36:17 +05:30
Rafael Zalamena
c4867fe2f2 doc: remove BFD control socket documentation
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-25 10:37:11 -03:00
Rafael Zalamena
5340fcf144 doc: missing distributed BFD man page bit
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-25 10:37:11 -03:00
Rafael Zalamena
88a9aa9c6b bfdd: remove control socket obsolete code
Let's remove the obsolete BFD control socket. If the functionality is
needed then YANG/northbound notifications / getting should be used
instead.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2024-07-25 10:37:11 -03:00
Donatas Abraitis
968ae85252 bgpd: Show software version in bgp summary
E.g.:

```
$ vtysh -c 'show bgp summary json' | jq '.ipv4Unicast.peers'
{
  "127.0.0.1": {
    "hostname": "donatas.net",
    "softwareVersion": "GoBGP/3.26.0",
    "remoteAs": 65001,
    "localAs": 65001,
    "version": 4,
    "msgRcvd": 12,
    "msgSent": 16,
    "tableVersion": 0,
    "outq": 0,
    "inq": 0,
    "peerUptime": "00:00:10",
    "peerUptimeMsec": 10000,
    "peerUptimeEstablishedEpoch": 1721908563,
    "pfxRcd": 0,
    "pfxSnt": 0,
    "state": "Established",
    "peerState": "OK",
    "connectionsEstablished": 1,
    "connectionsDropped": 0,
    "idType": "ipv4"
  },
  "127.0.0.3": {
    "hostname": "putin-xujlo",
    "domainname": "donatas.net",
    "softwareVersion": "ExaBGP/5.0.0-20240725+main-a56c70e84a",
    "remoteAs": 65003,
    "localAs": 65001,
    "version": 4,
    "msgRcvd": 3,
    "msgSent": 7,
    "tableVersion": 0,
    "outq": 0,
    "inq": 0,
    "peerUptime": "00:00:13",
    "peerUptimeMsec": 13000,
    "peerUptimeEstablishedEpoch": 1721908560,
    "pfxRcd": 0,
    "pfxSnt": 0,
    "state": "Established",
    "peerState": "OK",
    "connectionsEstablished": 1,
    "connectionsDropped": 0,
    "idType": "ipv4"
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-25 15:07:57 +03:00
Donald Sharp
7ccd9cab30
Merge pull request #16464 from cscarpitta/fix/remove-duplicate-include
zebra: Remove duplicate `#include`s
2024-07-25 08:05:19 -04:00
Donald Sharp
c4b4c242ec pimd: Fix msdp setting of sa->rp
The code is clearly incorrect.  After consultation with
the original author this is the decided change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-07-25 07:50:32 -04:00
Donald Sharp
035542f6bb
Merge pull request #16449 from opensourcerouting/py-invalid-escapes
build: fix a few python string escape warnings
2024-07-25 07:17:03 -04:00
Donald Sharp
30bbba1f32
Merge pull request #16469 from opensourcerouting/fix/add_5701_supported
doc: Add RFC 5701 to the supported RFCs list
2024-07-25 07:16:13 -04:00
Donatas Abraitis
b1b1c922a5 bgpd: Do not increment treat-as-withdraw counters if debug is enabled
Increment only if we really treat the UPDATE as withdrawn.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-25 13:41:23 +03:00
Donatas Abraitis
fa9bd07ae5 bgpd: Keep the last reset reason before we reset the peer
If we send a notification, there is no point setting the last_reset, because
bgp_notify_send() sets last_reset to PEER_DOWN_NOTIFY_SEND (almost everywhere).

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-25 13:22:27 +03:00
Donatas Abraitis
743b169384 bgpd: Set the last_reset if we change the password also
```
donatas.net(config-router)# do show ip bgp summary failed

IPv4 Unicast Summary:
BGP router identifier 1.1.1.1, local AS number 65001 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 24 KiB of memory

Neighbor        EstdCnt DropCnt ResetTime Reason
127.0.0.1             2       2  00:02:02 Password config change (GoBGP/3.26.0)

Displayed neighbors 1
Total number of neighbors 1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-25 13:06:46 +03:00
Donatas Abraitis
7b91b0b3ca doc: Add RFC 5701 to the supported RFCs list
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-25 11:52:45 +03:00
Carmine Scarpitta
846bbcba0d zebra: Remove duplicate #include "zebra/interface.h"
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:50:02 +02:00
Carmine Scarpitta
e2cb3ab5c6 zebra: Remove duplicate #include "zebra/interface.h"
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:41:29 +02:00
Carmine Scarpitta
bcf7bc1ce8 zebra: Remove duplicate #include "zebra/debug.h"
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:41:09 +02:00
Carmine Scarpitta
8b206b0cd7 zebra: Remove duplicate #include <stdio.h>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:39:34 +02:00
Carmine Scarpitta
4ca8332922 zebra: Remove duplicate #include <string.h>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:39:14 +02:00
Carmine Scarpitta
22aa0ffb81 zebra: Remove duplicate #include <stdlib.h>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:38:55 +02:00
Carmine Scarpitta
c432aa0bb4 zebra: Remove duplicate #include <arpa/inet.h>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:38:27 +02:00
Carmine Scarpitta
0a68626e48 zebra: Remove duplicate #include <netinet/in.h>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
2024-07-24 23:38:04 +02:00
Donald Sharp
bd86964db8
Merge pull request #16455 from opensourcerouting/fix/bgp_gr_notifications_timing_flake
tests: Delay initial OPEN after we do `clear bgp`
2024-07-24 13:17:31 -04:00
Donald Sharp
eab469b02e
Merge pull request #16456 from opensourcerouting/fix/delay_open_when_open_received
bgpd: Pass a connection struct directly for EVENT_OFF()
2024-07-24 13:17:12 -04:00
Donald Sharp
b2654e35e5
Merge pull request #16232 from zhou-run/202406171755
isisd: Even after configuring "no hostname dynamic", the topology still displays the hostname.
2024-07-24 10:30:34 -04:00
Donald Sharp
a694be6019
Merge pull request #16240 from y-bharath14/srib-topotest-f
tests: Avoid using unused modules and variables at FRR test suites
2024-07-24 10:28:43 -04:00
Donald Sharp
5bb0b01e34
Merge pull request #16451 from LabNConsulting/chopps/fix-early-mgmtd-detach
lib: mgmtd: fix too early daemon detach of mgmtd
2024-07-24 10:22:53 -04:00
Donatas Abraitis
45f80de734 bgpd: Pass a connection struct directly for EVENT_OFF()
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-24 15:30:43 +03:00
Donatas Abraitis
91e67abb61 tests: Delay initial OPEN after we do clear bgp
Under some circumstances it might happen that the session is quickly UP in the
middle of `clear bgp ...` and `shutdown`. That leads to session be UP, and
the stale routes being cleared quickly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2024-07-24 14:30:32 +03:00
Christian Hopps
1fddc91dc6
Merge pull request #16428 from y-bharath14/srib-yang-c
yang: Added missed prefix to the frr-deviations-ietf-routing yang file
2024-07-24 03:35:01 -07:00
Christian Hopps
be9a6fc0ea lib: mgmtd: fix too early daemon detach of mgmtd
Correct FRR startup counts on a daemon's vty socket to be open when the
parent process exits. The parent process waits for `frr_check_detach()`
to be called by the child before exiting. The problem is when the
`FRR_MANUAL_VTY_START` flag is set the vty socket was not opened but
`frr_check_detach()` was called anyway.

Instead add a bool option for `frr_check_detach()` to be called when the
socket is opened with `frr_vty_serv_start()`, and do so when "manually"
calling said function (i.e., when FRR_MANUAL_VTY_START is set).

The `FRR_MANUAL_VTY_START` flag is only set by mgmtd. The reason we
wait to open the vty socket is so that mgmtd can parse the various
daemon specific config files it has taken over, after the event loop has
started, but before we receive any possible new config from `vtysh`.

fixes #16362

Signed-off-by: Christian Hopps <chopps@labn.net>
2024-07-23 17:50:33 -04:00
Russ White
aa9d66e922
Merge pull request #16410 from pguibert6WIND/show_zebra_dplane_nexthop
zebra: add nexthop counter to 'show zebra dplane' command
2024-07-23 16:42:41 -04:00
David Lamparter
8916953b53 build: fix a few python string escape warnings
When using a regex (or anything that uses `\?` escapes) in python, raw
strings (`r"content"`) should be used so python doesn't consume the
escapes itself.  Otherwise we get either broken behavior and/or
`SyntaxWarning: invalid escape sequence '\['`

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-07-23 10:23:50 -07:00
Russ White
ea5498ec5a
Merge pull request #16403 from lsang6WIND/vpn_leak_label
bgpd: fix label lost when vrf loopback comes back
2024-07-23 10:54:12 -04:00
Russ White
fba472e848
Merge pull request #16376 from c-po/ospfd-ldp-sync
ospfd: fix internal ldp-sync state flags when feature is disabled
2024-07-23 10:51:46 -04:00
Russ White
9db9128c27
Merge pull request #16330 from donaldsharp/nhg_going_down
zebra: Properly note that a nhg's nexthop has gone down
2024-07-23 10:49:49 -04:00
Donatas Abraitis
c804446d63
Merge pull request #16437 from raja-rajasekar/rajasekarr/use_after_free_4001204
bgpd: backpressure - Avoid use after free
2024-07-23 17:46:43 +03:00
Mark Stapp
2ef7b65460
Merge pull request #16432 from Jafaral/pim-warn
pimd: fix compile warnings
2024-07-23 08:08:14 -04:00