Commit Graph

34898 Commits

Author SHA1 Message Date
Louis Scalbert
c040637e97 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>
2023-12-14 10:57:29 +01:00
Louis Scalbert
9589fb300d topotests: look for python3 exabgp
Look for python3 exabgp instead of python2.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2023-12-14 10:57:29 +01:00
Louis Scalbert
92c1a102e4 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>
2023-12-14 10:57:29 +01:00
Donatas Abraitis
c6b7e79d11 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 5be4ee9634, we don't need to duplicate that
info.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-14 09:56:39 +02:00
Donatas Abraitis
204508433d tools: Use error log level when failing to execute commands via frr-reload.py
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-14 09:05:02 +02:00
Donatas Abraitis
5e87eae543
Merge pull request #15014 from Shbinging/fix_ospf_commands
ospfd: fix some ospf cmds' param range
2023-12-14 07:40:48 +02:00
Donatas Abraitis
5bdf2e5962
Merge pull request #14996 from donaldsharp/srv6_shutdown_zebra_deletion
zebra: On shutdown, free up srv6 list data
2023-12-14 07:38:06 +02:00
Bing Shui
588b642143 doc: add param range for graceful-restart helper supported-grace-time
Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
2023-12-13 22:25:43 +08:00
Bing Shui
a1793303c0 ospfd: fix ospf dead-interval minimal hello-multiplier param range
Signed-off-by: Bing Shui <652023330037@smail.nju.edu.cn>
2023-12-13 22:23:58 +08:00
Donatas Abraitis
ec1e9f4ba2
Merge pull request #15004 from chiragshah6/mdev1
tools: fix frr-reload multiple no description cmds
2023-12-13 10:28:43 +02:00
Donatas Abraitis
4d0a0b3727
Merge pull request #15003 from donaldsharp/vrf_all_data
bgpd: Have `show bgp vrf all ipv4 uni summ` display vrf NAME
2023-12-13 09:27:34 +02:00
Chirag Shah
8a5c6e4389 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>
2023-12-12 17:47:00 -08:00
Donald Sharp
5be4ee9634 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>
2023-12-12 18:26:14 -05:00
Donald Sharp
dcaba9ca93 bgpd: When receiving a label, store it
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-12 15:29:49 -05:00
Russ White
c45a9dabe2
Merge pull request #14982 from donaldsharp/bgp_suppress_fib_clear_peers
bgpd: Make `suppress-fib-pending` clear peering
2023-12-12 14:31:37 -05:00
Donald Sharp
bdb5ae8bce 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>
2023-12-12 13:48:10 -05:00
Donald Sharp
8fcacf6803 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>
2023-12-12 13:29:47 -05:00
Donald Sharp
9393d36690 zebra: On shutdown, free up srv6 list data
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-12 12:04:14 -05:00
Russ White
315262cab3
Merge pull request #14992 from opensourcerouting/fix/oad_missing_parts
bgpd: Recent OAD fixes
2023-12-12 11:04:34 -05:00
Russ White
d28bfc3791
Merge pull request #14984 from pguibert6WIND/bgp_l3nhg_to_bgp_nhg
bgpd: move l3nhg functions in separate bgp_nhg.[ch] file
2023-12-12 11:03:39 -05:00
Russ White
39ab18f1fd
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
2023-12-12 10:54:34 -05:00
Donatas Abraitis
f17cd4587d
Merge pull request #14985 from donaldsharp/zebra_delete_memory_problems
Zebra delete memory problems
2023-12-12 16:31:52 +02:00
Donatas Abraitis
54625f5f94
Merge pull request #14986 from LabNConsulting/chopps/fix-asan-odr
lib: fix the ASAN OneDefinitionRule violation.
2023-12-12 15:55:41 +02:00
Donatas Abraitis
7685ffda19 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>
2023-12-12 11:55:10 +02:00
Donatas Abraitis
bc53667dc7 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>
2023-12-12 11:38:23 +02:00
Donatas Abraitis
29d33bd57d 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>
2023-12-12 11:34:29 +02:00
Donatas Abraitis
5077b6a025
Merge pull request #14983 from donaldsharp/dplane_fpm_nl_deleted
zebra: The dplane_fpm_nl return path leaks memory
2023-12-12 08:44:37 +02:00
Christian Hopps
29340e6b06 lib: fix the ASAN OneDefinitionRule violation.
Rename global client pointer variables and make the linkage static.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-12-11 19:53:03 -05:00
Donald Sharp
3d1f0c467b zebra: On shutdown properly free up ns memory
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-11 15:44:26 -05:00
Donald Sharp
f77095430d zebra: Cleanup linked list on shutdown in label manager
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-12-11 15:26:20 -05:00
Donald Sharp
7cabd9361c 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>
2023-12-11 15:22:07 -05:00
Philippe Guibert
9cb66bdceb 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>
2023-12-11 21:03:33 +01:00
Donald Sharp
c783d5b698
Merge pull request #14981 from opensourcerouting/fix/remove_depracated_code
bgpd: Remove deprecated code for bgpStatusCodes/bgpOriginCodes
2023-12-11 13:53:49 -05:00
Donald Sharp
7f9c5c7fa2 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>
2023-12-11 13:44:06 -05:00
Donatas Abraitis
7e219a2188 bgpd: Remove deprecated code for bgpStatusCodes/bgpOriginCodes
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-11 14:53:33 +02:00
Donald Sharp
d41c757763
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
2023-12-10 14:32:46 -05:00
Donald Sharp
f6864ec67d
Merge pull request #14962 from Orange-OpenSource/ospf-te
ospfd: Correct SID check size
2023-12-10 14:31:40 -05:00
Donald Sharp
fff267e4ee
Merge pull request #14968 from opensourcerouting/fix/missing_whitespace
zebra: Add missing whitespace when printing route entry status
2023-12-10 14:30:27 -05:00
Donald Sharp
dabef024f1
Merge pull request #14971 from opensourcerouting/o6-hidden-area
ospf6d: remove hidden obsolete command
2023-12-10 14:29:42 -05:00
Donald Sharp
df3e5ca61c
Merge pull request #14976 from vjardin/fixUbuntuModprobe
docker: fix /sbin/modprobe missing
2023-12-10 08:36:33 -05:00
Vincent Jardin
aa2e50621b docker: fix /sbin/modprobe missing
kmod is needed in order to get modprobe

Signed-off-by: Vincent Jardin <vjardin@free.fr>
2023-12-09 23:45:22 +00:00
Donatas Abraitis
00b23f22c5
Merge pull request #14975 from imzyxwvu/tidy-aggregate-duplication
bgpd: Remove duplicated code in `bgp_aggregate_route`
2023-12-09 20:03:00 +02:00
zyxwvu Shi
c2d97a2733 bgpd: Remove duplicated code in bgp_aggregate_route
Signed-off-by: zyxwvu Shi <i@shiyc.cn>
2023-12-09 19:26:45 +08:00
Rafael Zalamena
28f59691fa 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>
2023-12-08 10:51:39 -03:00
Rafael Zalamena
9f1a7ba972 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>
2023-12-08 10:51:32 -03:00
Olivier Dugeon
397dbbcae6 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>
2023-12-08 13:47:34 +01:00
Donald Sharp
4a2ece949e
Merge pull request #14964 from pguibert6WIND/nhg_del_in_queue
zebra: enqueue NHG_DEL in rib_nhg meta queue
2023-12-08 07:36:44 -05:00
Donatas Abraitis
162433cb2a zebra: Add missing whitespace when printing route entry status
Before:

```
status: Removed ReplacingInstalled
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-08 13:57:56 +02:00
Donatas Abraitis
ec2375e089 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>
2023-12-08 13:00:08 +02:00
Donatas Abraitis
8009047698 tests: Check if default-originate works combined with peer-groups + route-maps
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-12-08 12:41:44 +02:00