]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
16 months agoMerge pull request #15002 from donaldsharp/bgp_evpn_label_no_delete
Russ White [Tue, 19 Dec 2023 16:34:04 +0000 (11:34 -0500)]
Merge pull request #15002 from donaldsharp/bgp_evpn_label_no_delete

bgpd: When receiving a label, store it

16 months agoMerge pull request #15022 from opensourcerouting/fix/change_to_log.error
Donald Sharp [Mon, 18 Dec 2023 13:58:09 +0000 (08:58 -0500)]
Merge pull request #15022 from opensourcerouting/fix/change_to_log.error

tools: Use error log level when failing to execute commands via frr-reload.py

16 months agoMerge pull request #15036 from opensourcerouting/fix/use_constants_for_addpath_cap_length
Donald Sharp [Mon, 18 Dec 2023 13:54:39 +0000 (08:54 -0500)]
Merge pull request #15036 from opensourcerouting/fix/use_constants_for_addpath_cap_length

bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value

16 months agoMerge pull request #15037 from opensourcerouting/fix/validate_send_receive_flags
Donald Sharp [Mon, 18 Dec 2023 13:54:22 +0000 (08:54 -0500)]
Merge pull request #15037 from opensourcerouting/fix/validate_send_receive_flags

bgpd: Validate Addpath capability flags per AF

16 months agoMerge pull request #15032 from leonshaw/fix/bgp-default-withdraw
Donatas Abraitis [Mon, 18 Dec 2023 10:39:51 +0000 (12:39 +0200)]
Merge pull request #15032 from leonshaw/fix/bgp-default-withdraw

bgpd: "default-originate" shouldn't withdraw non-default routes

16 months agotests: Check for 0.0.0.0/1 in bgp_default_route 15032/head
Xiao Liang [Mon, 18 Dec 2023 06:57:22 +0000 (14:57 +0800)]
tests: Check for 0.0.0.0/1 in bgp_default_route

Ensure that 0.0.0.0/1 route can be advertised along with
default-originate.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
16 months agobgpd: Validate Addpath capability flags per AF 15037/head
Donatas Abraitis [Sun, 17 Dec 2023 13:13:57 +0000 (15:13 +0200)]
bgpd: Validate Addpath capability flags per AF

Send/Receive:
         This field indicates whether the sender is (a) able to receive
         multiple paths from its peer (value 1), (b) able to send
         multiple paths to its peer (value 2), or (c) both (value 3) for
         the <AFI, SAFI>.

         If any other value is received, then the capability SHOULD be
         treated as not understood and ignored [RFC5492].

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #15035 from donaldsharp/more_frr_memory_leaks_on_shutdown
Donatas Abraitis [Sun, 17 Dec 2023 10:04:47 +0000 (12:04 +0200)]
Merge pull request #15035 from donaldsharp/more_frr_memory_leaks_on_shutdown

More frr memory leaks on shutdown

16 months agobgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value 15036/head
Donatas Abraitis [Sun, 17 Dec 2023 10:03:36 +0000 (12:03 +0200)]
bgpd: Use CAPABILITY_CODE_ADDPATH_LEN instead of numeric value

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agonhrpd: Cleanup a hash on nhrp shutdown 15035/head
Donald Sharp [Sat, 16 Dec 2023 14:29:00 +0000 (09:29 -0500)]
nhrpd: Cleanup a hash on nhrp shutdown

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agolib, bgpd, nhrpd: Cleanup memory in lib/resolver on shutdown
Donald Sharp [Sat, 16 Dec 2023 14:18:41 +0000 (09:18 -0500)]
lib, bgpd, nhrpd: Cleanup memory in lib/resolver on shutdown

This memory was not being cleaned up on shutdown.  Fix this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: "default-originate" shouldn't withdraw non-default routes
Xiao Liang [Fri, 15 Dec 2023 10:27:39 +0000 (18:27 +0800)]
bgpd: "default-originate" shouldn't withdraw non-default routes

Prevent "default-originate" from withdrawing non-default routes like
0.0.0.0/1 by checking prefix length.

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
16 months agoMerge pull request #15015 from donaldsharp/test_ospf_suppress_fa_cleanup
Donatas Abraitis [Fri, 15 Dec 2023 05:01:27 +0000 (07:01 +0200)]
Merge pull request #15015 from donaldsharp/test_ospf_suppress_fa_cleanup

tests: ospf_suppress_fa sleeps, convert to run_and_expect

16 months agoMerge pull request #15023 from opensourcerouting/fix/drop_redundant_vrf_name
Donald Sharp [Fri, 15 Dec 2023 01:26:52 +0000 (20:26 -0500)]
Merge pull request #15023 from opensourcerouting/fix/drop_redundant_vrf_name

bgpd: Drop redundant VRF name printing for `show bgp summary`

16 months agoMerge pull request #15025 from donaldsharp/dplane_fpm_nl_wedgied
Mark Stapp [Thu, 14 Dec 2023 21:52:59 +0000 (16:52 -0500)]
Merge pull request #15025 from donaldsharp/dplane_fpm_nl_wedgied

zebra: Prevent possible wedged fpm write

16 months agoMerge pull request #15026 from Orange-OpenSource/ospf-te
Donald Sharp [Thu, 14 Dec 2023 21:16:34 +0000 (16:16 -0500)]
Merge pull request #15026 from Orange-OpenSource/ospf-te

ospfd: Correct LSA parser which fulfill the TED

16 months agotests: Update OSPF TE topotests 15026/head
Olivier Dugeon [Thu, 14 Dec 2023 17:34:38 +0000 (18:34 +0100)]
tests: Update OSPF TE topotests

The OSPF TE topotest is using switches to interconnect router. During the test,
interfaces are shutdown on some routers to simulate link failure and check that
the TED is correctly updated. However, the switche between router avoid the
detection by the neighbor router that the interface is down i.e. the interface
line remains up as it is conneted to the switch and not to the router.

This patch update the tested topology by removing the switch and connect
directly the router excepted the inter AS link on R3. Interface are also
renamed accordingly.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
16 months agoospfd: Correct LSA parser which fulfill the TED
Olivier Dugeon [Thu, 14 Dec 2023 17:22:32 +0000 (18:22 +0100)]
ospfd: Correct LSA parser which fulfill the TED

Traffic Engineering Database (TED) is fulfill from the various LSA advertised
and received by the router. To remove information on the TED, 2 mechanisms are
used: i) parse TE Opaque LSA when there are flushed and ii) compare the list of
prefixes advertised in the Router LSA with the list of corresponding edges and
subnets contained in the TED. However, this second mechanism assumes that the
Router LSA is unique and contains all prefixes of the advertised router.
But, this is wrong. Prefixes could be advertised with several Router LSA.
This conduct to remove edge and subnet in the TED while it should be maintained.
The result is a faulty test with ospf_sr_te_topo1 topotest when server is heavy
loaded.

This simple patch removed deletion of edges and subnets when parsing the Router
LSA and only removed them when the corresponding TE Opaque LSA is flushed. In
addition, TE Opaque LSA are not flushed when OSPF ajacency goes down. This
patch also correct this second problem.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
16 months agotests: ospf_suppress_fa sleeps, convert to run_and_expect 15015/head
Donald Sharp [Wed, 13 Dec 2023 17:05:25 +0000 (12:05 -0500)]
tests: ospf_suppress_fa sleeps, convert to run_and_expect

The test_ospf_suppres_fa.py script is using straight
up sleeps before testing that the next step worked properly.
On a unloaded test system this will work 100% of the time
on a loaded test system this will have random failures.
Convert the test to use run_and_expect and give each
section of the test 30 seconds to get to the next state
appropriately instead of 10.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Use event_add_event instead of _timer 15025/head
Donald Sharp [Thu, 14 Dec 2023 14:14:00 +0000 (09:14 -0500)]
zebra: Use event_add_event instead of _timer

The t_dequeue was being enqueued with a timer of 0
this is really an event instead of a timer.  Let's
use that instead.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Prevent possible wedged fpm write
Donald Sharp [Thu, 14 Dec 2023 13:19:36 +0000 (08:19 -0500)]
zebra: Prevent possible wedged fpm write

An operator is reporting that the dplane_fpm_nl connection has
started to accumulate contexts.  One such path that could cause
this is that the obuf used is full and stays full.  This would
imply that what ever is on the receiving end has gotten wedged
and is not reading from the stream of data being sent it's way.
If after 15 seconds of no response, let's declare the connection
dead and reset it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #14890 from louis-6wind/exabgp4
Martin Winter [Thu, 14 Dec 2023 13:46:24 +0000 (05:46 -0800)]
Merge pull request #14890 from louis-6wind/exabgp4

topotests: convert to exabgp 4 and python3

16 months agodoc: Update examples of show bgp summary 15023/head
Donatas Abraitis [Thu, 14 Dec 2023 13:14:40 +0000 (15:14 +0200)]
doc: Update examples of show bgp summary

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotests: Adopt topotests for `show bgp summary` non-JSON output
Donatas Abraitis [Thu, 14 Dec 2023 13:09:39 +0000 (15:09 +0200)]
tests: Adopt topotests for `show bgp summary` non-JSON output

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotopotests: tmp fix delay in bgp_peer_type_multipath_relax 14890/head
Louis Scalbert [Tue, 28 Nov 2023 15:18:30 +0000 (16:18 +0100)]
topotests: tmp fix delay in bgp_peer_type_multipath_relax

Workaround an issue in bgp_peer_type_multipath_relax.

Link: https://github.com/FRRouting/frr/issues/14895
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agodoc: update for exabgp 4
Louis Scalbert [Tue, 28 Nov 2023 11:33:42 +0000 (12:33 +0100)]
doc: update for exabgp 4

Update the documentation to require exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agodocker: update ubuntu template for exabgp 4
Louis Scalbert [Tue, 28 Nov 2023 11:35:41 +0000 (12:35 +0100)]
docker: update ubuntu template for exabgp 4

Update ubuntu template for exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: remove python2 support
Louis Scalbert [Tue, 28 Nov 2023 11:37:36 +0000 (12:37 +0100)]
topotests: remove python2 support

Remove python2 support

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_ecmp_topo1 to python3
Louis Scalbert [Tue, 28 Nov 2023 11:36:52 +0000 (12:36 +0100)]
topotests: convert bgp_ecmp_topo1 to python3

Convert bgp_ecmp_topo1 to python3

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert exabgp scripts to python3
Louis Scalbert [Tue, 28 Nov 2023 10:45:45 +0000 (11:45 +0100)]
topotests: convert exabgp scripts to python3

Convert exabgp scripts to python3

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: cleanup bgp_peer_type_multipath_relax
Louis Scalbert [Tue, 28 Nov 2023 10:35:23 +0000 (11:35 +0100)]
topotests: cleanup bgp_peer_type_multipath_relax

Cleanup bgp_peer_type_multipath_relax to make it more readable.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_peer_type_multipath_relax to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 15:49:53 +0000 (16:49 +0100)]
topotests: convert bgp_peer_type_multipath_relax to exabgp 4

Convert bgp_peer_type_multipath_relax to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_prefix_sid2 to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 16:04:32 +0000 (17:04 +0100)]
topotests: convert bgp_prefix_sid2 to exabgp 4

Convert bgp_prefix_sid2 to exabgp 4

Do not advertise prefixes to exabgp to avoid an issue where exabgp
resets the bgp session with the following notification:

> invalid ipv6 mpls-vpn next-hop length 48 expected 24 or 40

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_prefix_sid to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 15:33:56 +0000 (16:33 +0100)]
topotests: convert bgp_prefix_sid to exabgp 4

Convert bgp_prefix_sid to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_vrf_netns to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 16:09:56 +0000 (17:09 +0100)]
topotests: convert bgp_vrf_netns to exabgp 4

Convert bgp_vrf_netns to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_vrf_md5_peering to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 16:07:54 +0000 (17:07 +0100)]
topotests: convert bgp_vrf_md5_peering to exabgp 4

Convert bgp_vrf_md5_peering to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_multiview_topo1 to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 16:02:33 +0000 (17:02 +0100)]
topotests: convert bgp_multiview_topo1 to exabgp 4

Convert bgp_multiview_topo1 to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: convert bgp_ecmp_topo1 to exabgp 4
Louis Scalbert [Mon, 27 Nov 2023 14:20:54 +0000 (15:20 +0100)]
topotests: convert bgp_ecmp_topo1 to exabgp 4

Convert bgp_ecmp_topo1 to exabgp 4

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: create exabgp cli fifo
Louis Scalbert [Mon, 27 Nov 2023 15:18:13 +0000 (16:18 +0100)]
topotests: create exabgp cli fifo

Create reate exabgp cli fifo even it is not used in topotests to avoid
this error message:

> 16:21:42 | 2290205 | cli             | could not find the named pipes (exabgp.in and exabgp.out) required for the cli
> 16:21:42 | 2290205 | cli             | we scanned the following folders (the number is your PID):
> 16:21:42 | 2290205 | cli control     |  - /run/exabgp/
> 16:21:42 | 2290205 | cli control     |  - /run/0/
> 16:21:42 | 2290205 | cli control     |  - /run/
> 16:21:42 | 2290205 | cli control     |  - /var/run/exabgp/
> 16:21:42 | 2290205 | cli control     |  - /var/run/0/
> 16:21:42 | 2290205 | cli control     |  - /var/run/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/run/exabgp/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/run/0/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/run/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/var/run/exabgp/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/var/run/0/
> 16:21:42 | 2290205 | cli control     |  - /usr/local/var/run/
> 16:21:42 | 2290205 | cli control     | please make them in one of the folder with the following commands:
> 16:21:42 | 2290205 | cli control     | > mkfifo //run/exabgp.{in,out}
> 16:21:42 | 2290205 | cli control     | > chmod 600 //run/exabgp.{in,out}

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: log exabgp by default
Louis Scalbert [Wed, 14 Jun 2023 13:19:15 +0000 (15:19 +0200)]
topotests: log exabgp by default

Log exabgp by default in /tmp/topotests/<testname>/<peername>/exabgp.log
Level is INFO.

Note that in case the configuration syntax is invalid, exabgp does not
log into the file and exits at startup. You can check a configuration
syntax by running:

> exabgp <exabgp.cfg>

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: use exabgp 4.2.11 in ci
Louis Scalbert [Tue, 28 Nov 2023 16:04:32 +0000 (17:04 +0100)]
topotests: use exabgp 4.2.11 in ci

Use exabgp 4.2.11 in CI instead.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: look for python3 exabgp
Louis Scalbert [Tue, 28 Nov 2023 11:44:13 +0000 (12:44 +0100)]
topotests: look for python3 exabgp

Look for python3 exabgp instead of python2.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agotopotests: require exabgp version >= 4.2.11
Louis Scalbert [Thu, 23 Nov 2023 14:38:19 +0000 (15:38 +0100)]
topotests: require exabgp version >= 4.2.11

Require exabgp >= 4.2.11 to allow to newer version to run exabgp
topotests. Next commits will adapt the exabgp topotests when needed.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
16 months agobgpd: Drop redundant VRF name printing for `show bgp summary`
Donatas Abraitis [Thu, 14 Dec 2023 07:56:39 +0000 (09:56 +0200)]
bgpd: Drop redundant VRF name printing for `show bgp summary`

Before:

```
ton# sh bgp summary

IPv4 Unicast Summary (VRF default):
BGP router identifier 0.0.0.2, local AS number 65001 VRF default vrf-id 0
```

After:

```
ton# sh bgp summary

IPv4 Unicast Summary:
BGP router identifier 0.0.0.2, local AS number 65001 VRF default vrf-id 0
```

After 5be4ee96340a6fcf5c07ff285a0f50a98c85a8f2, we don't need to duplicate that
info.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotools: Use error log level when failing to execute commands via frr-reload.py 15022/head
Donatas Abraitis [Thu, 14 Dec 2023 07:05:02 +0000 (09:05 +0200)]
tools: Use error log level when failing to execute commands via frr-reload.py

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #15014 from Shbinging/fix_ospf_commands
Donatas Abraitis [Thu, 14 Dec 2023 05:40:48 +0000 (07:40 +0200)]
Merge pull request #15014 from Shbinging/fix_ospf_commands

ospfd: fix some ospf cmds' param range

16 months agoMerge pull request #14996 from donaldsharp/srv6_shutdown_zebra_deletion
Donatas Abraitis [Thu, 14 Dec 2023 05:38:06 +0000 (07:38 +0200)]
Merge pull request #14996 from donaldsharp/srv6_shutdown_zebra_deletion

zebra: On shutdown, free up srv6 list data

16 months agodoc: add param range for graceful-restart helper supported-grace-time 15014/head
Bing Shui [Wed, 13 Dec 2023 14:25:43 +0000 (22:25 +0800)]
doc: add param range for graceful-restart helper supported-grace-time

Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
16 months agoospfd: fix ospf dead-interval minimal hello-multiplier param range
Bing Shui [Wed, 13 Dec 2023 14:23:58 +0000 (22:23 +0800)]
ospfd: fix ospf dead-interval minimal hello-multiplier param range

Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
16 months agoMerge pull request #15004 from chiragshah6/mdev1
Donatas Abraitis [Wed, 13 Dec 2023 08:28:43 +0000 (10:28 +0200)]
Merge pull request #15004 from chiragshah6/mdev1

tools: fix frr-reload multiple no description cmds

16 months agoMerge pull request #15003 from donaldsharp/vrf_all_data
Donatas Abraitis [Wed, 13 Dec 2023 07:27:34 +0000 (09:27 +0200)]
Merge pull request #15003 from donaldsharp/vrf_all_data

bgpd: Have `show bgp vrf all ipv4 uni summ` display vrf NAME

16 months agotools: fix frr-reload multiple no description cmds 15004/head
Chirag Shah [Wed, 13 Dec 2023 01:31:40 +0000 (17:31 -0800)]
tools: fix frr-reload multiple no description cmds

Ensure to change description for index 0 from the list.

Ticket: #3628756
Testing Done:

After fix:
start with three interfaces description delete in lines_to_del:
(Pdb) lines_to_del
[(('interface swp1',), "description swp1 -> sp1's swp1"),
(('interface swp2',), "description swp2 -> sp2's swp
1"), (('interface swp3',), "description swp3 -> sp3's swp1")]

After first iteration swp1:
(Pdb) index
0
(Pdb) lines_to_del
[(('interface swp1',), 'description'), (('interface swp2',),
"description swp2 -> sp2's swp1"), (('interface swp
1s2',), "description swp3 -> sp3's swp1")]

After second iteration swp2:
(Pdb) lines_to_del
[(('interface swp1',), 'description'), (('interface swp2',),
'description'), (('interface swp3',), "description
swp3 -> sp3's swp1")]

After third iteration swp3 fix
(Pdb) lines_to_del
[(('interface swp1',), 'description'), (('interface swp2',),
'description'), (('interface swp3',), 'description'
)]

Signed-off-by: Chirag Shah <chirag@nvidia.com>
16 months agobgpd: Have `show bgp vrf all ipv4 uni summ` display vrf NAME 15003/head
Donald Sharp [Tue, 12 Dec 2023 22:48:16 +0000 (17:48 -0500)]
bgpd: Have `show bgp vrf all ipv4 uni summ` display vrf NAME

The vrf name was not being displayed in this output.
New output:

eva# show bgp vrf all ipv4 uni summ
BGP router identifier 0.0.0.0, local AS number 99 VRF RED vrf-id 14
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 20 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.119.1   4          0         0         0        0    0    0    never       Active        0 N/A

Total number of neighbors 1
BGP router identifier 0.0.0.0, local AS number 99 VRF GREEN vrf-id 15
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 20 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.119.1   4          0         0         0        0    0    0    never       Active        0 N/A

Total number of neighbors 1
BGP router identifier 192.168.122.1, local AS number 99 VRF default vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 20 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.119.1   4          0         0         0        0    0    0    never       Active        0 N/A

Total number of neighbors 1
BGP router identifier 0.0.0.0, local AS number 99 VRF GrEEn vrf-id -1
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 20 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.119.1   4          0         0         0        0    0    0    never         Idle        0 N/A

Total number of neighbors 1
eva#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: When receiving a label, store it 15002/head
Donald Sharp [Tue, 12 Dec 2023 20:29:49 +0000 (15:29 -0500)]
bgpd: When receiving a label, store it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #14982 from donaldsharp/bgp_suppress_fib_clear_peers
Russ White [Tue, 12 Dec 2023 19:31:37 +0000 (14:31 -0500)]
Merge pull request #14982 from donaldsharp/bgp_suppress_fib_clear_peers

bgpd: Make `suppress-fib-pending` clear peering

16 months agobgpd: Make `suppress-fib-pending` clear peering 14982/head
Donald Sharp [Mon, 11 Dec 2023 15:46:53 +0000 (10:46 -0500)]
bgpd: Make `suppress-fib-pending` clear peering

When a peer has come up and already started installing
routes into the rib and `suppress-fib-pending` is either
turned on or off.  BGP is left with some routes that
may need to be withdrawn from peers and routes that
it does not know the status of.  Clear the BGP peers
for the interesting parties and let's let us come
up to speed as needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Don't leak memory in rtadv.c code on shutdown 14996/head
Donald Sharp [Tue, 12 Dec 2023 18:29:47 +0000 (13:29 -0500)]
zebra: Don't leak memory in rtadv.c code on shutdown

The adata variable was being leaked on shutdown since
it was calloc'ed.  There is no need to make this dynamic
memory.  Just choose a size and use that.  Add a bit
of code to ensure that if it's not large enough,
it will just stop and the developer will fix it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: On shutdown, free up srv6 list data
Donald Sharp [Tue, 12 Dec 2023 17:03:10 +0000 (12:03 -0500)]
zebra: On shutdown, free up srv6 list data

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agoMerge pull request #14992 from opensourcerouting/fix/oad_missing_parts
Russ White [Tue, 12 Dec 2023 16:04:34 +0000 (11:04 -0500)]
Merge pull request #14992 from opensourcerouting/fix/oad_missing_parts

bgpd: Recent OAD fixes

16 months agoMerge pull request #14984 from pguibert6WIND/bgp_l3nhg_to_bgp_nhg
Russ White [Tue, 12 Dec 2023 16:03:39 +0000 (11:03 -0500)]
Merge pull request #14984 from pguibert6WIND/bgp_l3nhg_to_bgp_nhg

bgpd: move l3nhg functions in separate bgp_nhg.[ch] file

16 months agoMerge pull request #14966 from opensourcerouting/fix/bgpd_route-map_default_originate...
Russ White [Tue, 12 Dec 2023 15:54:34 +0000 (10:54 -0500)]
Merge pull request #14966 from opensourcerouting/fix/bgpd_route-map_default_originate_peer-group

tests: Check if default-originate works combined with peer-groups + route-maps

16 months agoMerge pull request #14985 from donaldsharp/zebra_delete_memory_problems
Donatas Abraitis [Tue, 12 Dec 2023 14:31:52 +0000 (16:31 +0200)]
Merge pull request #14985 from donaldsharp/zebra_delete_memory_problems

Zebra delete memory problems

16 months agoMerge pull request #14986 from LabNConsulting/chopps/fix-asan-odr
Donatas Abraitis [Tue, 12 Dec 2023 13:55:41 +0000 (15:55 +0200)]
Merge pull request #14986 from LabNConsulting/chopps/fix-asan-odr

lib: fix the ASAN OneDefinitionRule violation.

16 months agobgpd: Update sub_sort when handling doppelganger connections 14992/head
Donatas Abraitis [Tue, 12 Dec 2023 09:55:10 +0000 (11:55 +0200)]
bgpd: Update sub_sort when handling doppelganger connections

This is important especially for OPEN messages. Without this, we can't send
software-version capability which relies on OAD too.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: Use sub_sort also when creating a hash key for update-groups
Donatas Abraitis [Tue, 12 Dec 2023 09:38:23 +0000 (11:38 +0200)]
bgpd: Use sub_sort also when creating a hash key for update-groups

If OAD is not set or set at least for one peer in peer-group, then split, and
create a separate update-group for those peers.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: Add sub_sort for update group debug logging
Donatas Abraitis [Tue, 12 Dec 2023 09:34:29 +0000 (11:34 +0200)]
bgpd: Add sub_sort for update group debug logging

When added OAD support, it's handy to know peer->sub_sort also when printing
update-group debug messages.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #14983 from donaldsharp/dplane_fpm_nl_deleted
Donatas Abraitis [Tue, 12 Dec 2023 06:44:37 +0000 (08:44 +0200)]
Merge pull request #14983 from donaldsharp/dplane_fpm_nl_deleted

zebra: The dplane_fpm_nl return path leaks memory

16 months agolib: fix the ASAN OneDefinitionRule violation. 14986/head
Christian Hopps [Tue, 12 Dec 2023 00:53:03 +0000 (19:53 -0500)]
lib: fix the ASAN OneDefinitionRule violation.

Rename global client pointer variables and make the linkage static.

Signed-off-by: Christian Hopps <chopps@labn.net>
16 months agozebra: On shutdown properly free up ns memory 14985/head
Donald Sharp [Mon, 11 Dec 2023 20:44:26 +0000 (15:44 -0500)]
zebra: On shutdown properly free up ns memory

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Cleanup linked list on shutdown in label manager
Donald Sharp [Mon, 11 Dec 2023 20:26:20 +0000 (15:26 -0500)]
zebra: Cleanup linked list on shutdown in label manager

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Properly unregister hook on shutdown
Donald Sharp [Mon, 11 Dec 2023 20:22:07 +0000 (15:22 -0500)]
zebra: Properly unregister hook on shutdown

the zebra pseudo wire code was registering a callback
per vrf.  These callbacks are not per vrf based.  They
are vrf agnostic so this was a mistake.  Modify the code
to on startup register once and on shutdown unregister once.

Finally rename the zebra_pw_init and zebra_pw_exit functions
to more properly reflect when they are called.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: move l3nhg functions in separate bgp_nhg.[ch] file 14984/head
Philippe Guibert [Mon, 11 Dec 2023 16:23:50 +0000 (17:23 +0100)]
bgpd: move l3nhg functions in separate bgp_nhg.[ch] file

This rework separates l3nhg functionality from the nexthop
tracking code, by introducing two bgp_nhg.[ch] files. The
calling functions are renamed from bgp_l3nhg* to bgp_nhg*.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
16 months agoMerge pull request #14981 from opensourcerouting/fix/remove_depracated_code
Donald Sharp [Mon, 11 Dec 2023 18:53:49 +0000 (13:53 -0500)]
Merge pull request #14981 from opensourcerouting/fix/remove_depracated_code

bgpd: Remove deprecated code for bgpStatusCodes/bgpOriginCodes

16 months agozebra: The dplane_fpm_nl return path leaks memory 14983/head
Donald Sharp [Mon, 11 Dec 2023 18:41:36 +0000 (13:41 -0500)]
zebra: The dplane_fpm_nl return path leaks memory

The route entry created when using a ctx to pass route
entry data backup to the master pthread in zebra is
being leaked.  Prevent this from happening.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agobgpd: Remove deprecated code for bgpStatusCodes/bgpOriginCodes 14981/head
Donatas Abraitis [Mon, 11 Dec 2023 12:31:46 +0000 (14:31 +0200)]
bgpd: Remove deprecated code for bgpStatusCodes/bgpOriginCodes

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #14967 from opensourcerouting/fix/bgpd_enforce_first_as_peer-groups
Donald Sharp [Sun, 10 Dec 2023 19:32:46 +0000 (14:32 -0500)]
Merge pull request #14967 from opensourcerouting/fix/bgpd_enforce_first_as_peer-groups

bgpd: Respect enforce-first-as command for peer-groups according to the defaults

16 months agoMerge pull request #14962 from Orange-OpenSource/ospf-te
Donald Sharp [Sun, 10 Dec 2023 19:31:40 +0000 (14:31 -0500)]
Merge pull request #14962 from Orange-OpenSource/ospf-te

ospfd: Correct SID check size

16 months agoMerge pull request #14968 from opensourcerouting/fix/missing_whitespace
Donald Sharp [Sun, 10 Dec 2023 19:30:27 +0000 (14:30 -0500)]
Merge pull request #14968 from opensourcerouting/fix/missing_whitespace

zebra: Add missing whitespace when printing route entry status

16 months agoMerge pull request #14971 from opensourcerouting/o6-hidden-area
Donald Sharp [Sun, 10 Dec 2023 19:29:42 +0000 (14:29 -0500)]
Merge pull request #14971 from opensourcerouting/o6-hidden-area

ospf6d: remove hidden obsolete command

16 months agoMerge pull request #14976 from vjardin/fixUbuntuModprobe
Donald Sharp [Sun, 10 Dec 2023 13:36:33 +0000 (08:36 -0500)]
Merge pull request #14976 from vjardin/fixUbuntuModprobe

docker: fix /sbin/modprobe missing

16 months agodocker: fix /sbin/modprobe missing 14976/head
Vincent Jardin [Sat, 9 Dec 2023 23:45:22 +0000 (23:45 +0000)]
docker: fix /sbin/modprobe missing

kmod is needed in order to get modprobe

Signed-off-by: Vincent Jardin <vjardin@free.fr>
16 months agoMerge pull request #14975 from imzyxwvu/tidy-aggregate-duplication
Donatas Abraitis [Sat, 9 Dec 2023 18:03:00 +0000 (20:03 +0200)]
Merge pull request #14975 from imzyxwvu/tidy-aggregate-duplication

bgpd: Remove duplicated code in `bgp_aggregate_route`

16 months agobgpd: Remove duplicated code in `bgp_aggregate_route` 14975/head
zyxwvu Shi [Sat, 9 Dec 2023 11:26:45 +0000 (19:26 +0800)]
bgpd: Remove duplicated code in `bgp_aggregate_route`

Signed-off-by: zyxwvu Shi <i@shiyc.cn>
16 months agoospf6d: remove hidden obsolete commands 14971/head
Rafael Zalamena [Thu, 7 Dec 2023 15:24:04 +0000 (12:24 -0300)]
ospf6d: remove hidden obsolete commands

These commands were hidden in FRR 8.1 for the transition period and
never removed.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
16 months agotopotests: remove obsolete OSPFv3 area config
Rafael Zalamena [Thu, 7 Dec 2023 20:16:42 +0000 (17:16 -0300)]
topotests: remove obsolete OSPFv3 area config

Don't use 'interface WORD area A.B.C.D' for enabling OSPFv3 areas on
interfaces and instead use the standardized 'ipv6 ospf6 area A.B.C.D'.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
16 months agoospfd: Correct SID check size 14962/head
Olivier Dugeon [Thu, 7 Dec 2023 13:53:16 +0000 (14:53 +0100)]
ospfd: Correct SID check size

Segment Router Identifier (SID) could be an index (4 bytes) within a range
(SRGB or SRLB) or an MPLS label (3 bytes). Thus, before calling check_size
macro to verify SID TLVs size, it is mandatory to determine the SID type to
avoid wrong assert.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
16 months agoMerge pull request #14964 from pguibert6WIND/nhg_del_in_queue
Donald Sharp [Fri, 8 Dec 2023 12:36:44 +0000 (07:36 -0500)]
Merge pull request #14964 from pguibert6WIND/nhg_del_in_queue

zebra: enqueue NHG_DEL in rib_nhg meta queue

16 months agozebra: Add missing whitespace when printing route entry status 14968/head
Donatas Abraitis [Fri, 8 Dec 2023 11:57:56 +0000 (13:57 +0200)]
zebra: Add missing whitespace when printing route entry status

Before:

```
status: Removed ReplacingInstalled
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: Respect enforce-first-as command for peer-groups according to the defaults 14967/head
Donatas Abraitis [Fri, 8 Dec 2023 11:00:08 +0000 (13:00 +0200)]
bgpd: Respect enforce-first-as command for peer-groups according to the defaults

This was missed for peer-groups. Moved this default handling from peer_create()
to peer_new() which is also used by peer_group_get().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agotests: Check if default-originate works combined with peer-groups + route-maps 14966/head
Donatas Abraitis [Fri, 8 Dec 2023 10:11:34 +0000 (12:11 +0200)]
tests: Check if default-originate works combined with peer-groups + route-maps

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agobgpd: Convert variable `withdraw` integer to bool
Donatas Abraitis [Fri, 8 Dec 2023 09:58:59 +0000 (11:58 +0200)]
bgpd: Convert variable `withdraw` integer to bool

It holds only 0/1.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
16 months agoMerge pull request #14963 from donaldsharp/bgp_nht_fix
Donatas Abraitis [Fri, 8 Dec 2023 09:40:37 +0000 (11:40 +0200)]
Merge pull request #14963 from donaldsharp/bgp_nht_fix

bgpd: Ensure BGP does not stop monitoring nexthops

16 months agoMerge pull request #14889 from fdumontet6WIND/snmpv2
Donatas Abraitis [Fri, 8 Dec 2023 04:55:52 +0000 (06:55 +0200)]
Merge pull request #14889 from fdumontet6WIND/snmpv2

bgpd: add multiple paths support for draft ietf bgp4v2 in nlriTable

16 months agoMerge pull request #14936 from LabNConsulting/chopps/mgmt-dbg-improve
Donald Sharp [Thu, 7 Dec 2023 16:20:54 +0000 (11:20 -0500)]
Merge pull request #14936 from LabNConsulting/chopps/mgmt-dbg-improve

Chopps/mgmt dbg improve

16 months agozebra: enqueue NHG_DEL in rib_nhg meta queue 14964/head
Philippe Guibert [Thu, 7 Dec 2023 14:26:47 +0000 (15:26 +0100)]
zebra: enqueue NHG_DEL in rib_nhg meta queue

The NHG_DEL operation is done directly from ZAPI call, whereas
the NHG_ADD operation is done in the rib_nhg meta queue.

This may be problematic when ADD is followed by DEL. Imagine a
scenarion with two protocol NHIDs. <NH1> depends of <NH2> and
<NH3>. The deletion of <NH3> at the protocol level will trigger
2 messages to ZEBRA: NHG_ADD(<NH1>) and NHG_DEL(<NH3>).

Those operations are properly enqueued in ZAPI, but in the end,
the NHG_DEL is executed first. This causes NHG_ADD to unlink an
already freed NHG.

Fix this by consistently enqueuing NHG_DEL and NHG_ADD operations.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
16 months agoMerge pull request #14795 from donaldsharp/zebra_notify_admin_lost
Mark Stapp [Thu, 7 Dec 2023 13:30:00 +0000 (08:30 -0500)]
Merge pull request #14795 from donaldsharp/zebra_notify_admin_lost

zebra: Fix non-notification of better admin won

16 months agoMerge pull request #14957 from donaldsharp/zebra_noprefixroute
Donatas Abraitis [Thu, 7 Dec 2023 13:24:10 +0000 (15:24 +0200)]
Merge pull request #14957 from donaldsharp/zebra_noprefixroute

Add ability to handle `noprefixroute` to zebra

16 months agobgpd: Ensure BGP does not stop monitoring nexthops 14963/head
Donald Sharp [Mon, 6 Nov 2023 18:02:01 +0000 (13:02 -0500)]
bgpd: Ensure BGP does not stop monitoring nexthops

In some cases BGP can be monitoring the same prefix
in both the nexthop and import check tables.  If this
is the case, when unregistering one bnc from one table
make sure we are not still registered in the other

Example of the problem:

r1(config-router)# address-family ipv4 uni
r1(config-router-af)# no network 192.168.100.41/32
r1(config-router-af)# exit

r1# show bgp import-check-table
Current BGP import check cache:
r1# show bgp nexthop
Current BGP nexthop cache:
 192.168.100.41 valid [IGP metric 0], #paths 1, peer 192.168.100.41
  if r1-eth0
  Last update: Wed Dec  6 11:01:40 2023

BGP now believes it is only watching 192.168.100.41 in the nexthop
cache, but zebra doesn't have anything:

r1# show ip import-check
VRF default:
 Resolve via default: on
r1# show ip nht
VRF default:
 Resolve via default: on

So if anything happens to the route that is being matched for
192.168.100.41 bgp is no longer going to be notified about this.

The source of this problem is that zebra has dropped the two different
tables into 1 table, while bgp has 2 tables to track this.  The solution
to this problem (other than the rewrite that is being done ) is to have
BGP have a bit of smarts about looking in both tables for the bnc and
if found in both don't send the delete of the prefix tracking to zebra.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agotests: Add a noprefixroute test 14957/head
Donald Sharp [Wed, 6 Dec 2023 14:27:09 +0000 (09:27 -0500)]
tests: Add a noprefixroute test

Add a simple test case to ensure that the noprefixroute
code stays working in the future.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
16 months agozebra: Add connected with noprefixroute
Donald Sharp [Wed, 6 Dec 2023 13:33:31 +0000 (08:33 -0500)]
zebra: Add connected with noprefixroute

Add ability for the connected routes to know
if they are a prefix route or not.

sharpd@eva:/work/home/sharpd/frr1$ ip addr show dev dummy1
13: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether aa:93:ce:ce:3f:62 brd ff:ff:ff:ff:ff:ff
    inet 192.168.55.1/24 scope global noprefixroute dummy1
       valid_lft forever preferred_lft forever
    inet 192.168.56.1/24 scope global dummy1
       valid_lft forever preferred_lft forever
    inet6 fe80::a893:ceff:fece:3f62/64 scope link
       valid_lft forever preferred_lft forever

sharpd@eva:/work/home/sharpd/frr1$ sudo vtysh -c "show int dummy1"
Interface dummy1 is up, line protocol is up
  Link ups:       0    last: (never)
  Link downs:     0    last: (never)
  vrf: default
  index 13 metric 0 mtu 1500 speed 0 txqlen 1000
  flags: <UP,BROADCAST,RUNNING,NOARP>
  Type: Ethernet
  HWaddr: aa:93:ce:ce:3f:62
  inet 192.168.55.1/24 noprefixroute
  inet 192.168.56.1/24
  inet6 fe80::a893:ceff:fece:3f62/64
  Interface Type Other
  Interface Slave Type None
  protodown: off

sharpd@eva:/work/home/sharpd/frr1$ sudo vtysh -c "show ip route"
Codes: K - kernel route, C - connected, L - local, S - static,
       R - RIP, O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric, t - Table-Direct,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp13s0, 00:00:08
K>* 169.254.0.0/16 [0/1000] is directly connected, virbr2 linkdown, 00:00:08
L>* 192.168.44.1/32 is directly connected, dummy2, 00:00:08
L>* 192.168.55.1/32 is directly connected, dummy1, 00:00:08
C>* 192.168.56.0/24 is directly connected, dummy1, 00:00:08
L>* 192.168.56.1/32 is directly connected, dummy1, 00:00:08
L>* 192.168.119.205/32 is directly connected, enp13s0, 00:00:08

sharpd@eva:/work/home/sharpd/frr1$ ip route show
default via 192.168.119.1 dev enp13s0 proto dhcp metric 100
169.254.0.0/16 dev virbr2 scope link metric 1000 linkdown
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
192.168.45.0/24 dev virbr2 proto kernel scope link src 192.168.45.1 linkdown
192.168.56.0/24 dev dummy1 proto kernel scope link src 192.168.56.1
192.168.119.0/24 dev enp13s0 proto kernel scope link src 192.168.119.205 metric 100
192.168.122.0/24 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown

sharpd@eva:/work/home/sharpd/frr1$ ip route show table 255
local 127.0.0.0/8 dev lo proto kernel scope host src 127.0.0.1
local 127.0.0.1 dev lo proto kernel scope host src 127.0.0.1
broadcast 127.255.255.255 dev lo proto kernel scope link src 127.0.0.1
local 172.17.0.1 dev docker0 proto kernel scope host src 172.17.0.1
broadcast 172.17.255.255 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
local 192.168.44.1 dev dummy2 proto kernel scope host src 192.168.44.1
broadcast 192.168.44.255 dev dummy2 proto kernel scope link src 192.168.44.1
local 192.168.45.1 dev virbr2 proto kernel scope host src 192.168.45.1
broadcast 192.168.45.255 dev virbr2 proto kernel scope link src 192.168.45.1 linkdown
local 192.168.55.1 dev dummy1 proto kernel scope host src 192.168.55.1
broadcast 192.168.55.255 dev dummy1 proto kernel scope link src 192.168.55.1
local 192.168.56.1 dev dummy1 proto kernel scope host src 192.168.56.1
broadcast 192.168.56.255 dev dummy1 proto kernel scope link src 192.168.56.1
local 192.168.119.205 dev enp13s0 proto kernel scope host src 192.168.119.205
broadcast 192.168.119.255 dev enp13s0 proto kernel scope link src 192.168.119.205
local 192.168.122.1 dev virbr0 proto kernel scope host src 192.168.122.1
broadcast 192.168.122.255 dev virbr0 proto kernel scope link src 192.168.122.1 linkdown

Fixes: #14952
Signed-off-by: Donald Sharp <sharpd@nvidia.com>