]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
20 months agoMerge pull request #14171 from mjstapp/fix_bgp_lblpool_indent
Donatas Abraitis [Thu, 10 Aug 2023 13:20:28 +0000 (16:20 +0300)]
Merge pull request #14171 from mjstapp/fix_bgp_lblpool_indent

bgpd: fix whitespace/indent in bgp_labelpool module

20 months agoMerge pull request #14170 from mjstapp/fix_bitfield_mtype
Donatas Abraitis [Thu, 10 Aug 2023 11:17:28 +0000 (14:17 +0300)]
Merge pull request #14170 from mjstapp/fix_bitfield_mtype

libs: use XREALLOC in bitfield lib module

20 months agoMerge pull request #14169 from qlyoung/amalgamate-checkping
Donald Sharp [Wed, 9 Aug 2023 23:47:56 +0000 (19:47 -0400)]
Merge pull request #14169 from qlyoung/amalgamate-checkping

tests: amalgamate check_ping

20 months agobgpd: fix whitespace/indent in bgp_labelpool module 14171/head
Mark Stapp [Wed, 9 Aug 2023 21:01:16 +0000 (17:01 -0400)]
bgpd: fix whitespace/indent in bgp_labelpool module

Fix some weird indentation in the bgp labelpool module.

Signed-off-by: Mark Stapp <mjs@labn.net>
20 months agolibs: use XREALLOC in bitfield lib module 14170/head
Mark Stapp [Wed, 9 Aug 2023 20:19:40 +0000 (16:19 -0400)]
libs: use XREALLOC in bitfield lib module

Use FRR mem api instead of raw realloc() in bitfield module.

Signed-off-by: Mark Stapp <mjs@labn.net>
20 months agotests: amalgamate check_ping 14169/head
Quentin Young [Wed, 9 Aug 2023 19:45:56 +0000 (15:45 -0400)]
tests: amalgamate check_ping

❌✂️📋

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
20 months agoMerge pull request #14073 from fdumontet6WIND/as_path_replace_reg
Donatas Abraitis [Wed, 9 Aug 2023 12:28:58 +0000 (15:28 +0300)]
Merge pull request #14073 from fdumontet6WIND/as_path_replace_reg

  bgpd: add set as-path replace acl-list command

20 months agoMerge pull request #14099 from lkClare/formated_sync_0727
Donatas Abraitis [Wed, 9 Aug 2023 11:46:48 +0000 (14:46 +0300)]
Merge pull request #14099 from lkClare/formated_sync_0727

bgpd: bgp_path_info_extra memory optimization

20 months agodoc: set as-path replace as-path-access-list 14073/head
Francois Dumontet [Fri, 21 Jul 2023 13:38:21 +0000 (15:38 +0200)]
doc: set as-path replace as-path-access-list

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
20 months agoMerge pull request #14161 from opensourcerouting/fix/comment
Mark Stapp [Tue, 8 Aug 2023 16:36:58 +0000 (12:36 -0400)]
Merge pull request #14161 from opensourcerouting/fix/comment

bgpd: Fix RFC number in a comment

20 months agoMerge pull request #14154 from opensourcerouting/feature/bgpd_handle_role_capability_...
Russ White [Tue, 8 Aug 2023 14:47:04 +0000 (10:47 -0400)]
Merge pull request #14154 from opensourcerouting/feature/bgpd_handle_role_capability_using_dynamic_capability

bgpd: Handle role capability using dynamic capability

20 months agoMerge pull request #14158 from donaldsharp/listnode_stuff
Donatas Abraitis [Tue, 8 Aug 2023 13:31:57 +0000 (16:31 +0300)]
Merge pull request #14158 from donaldsharp/listnode_stuff

ospfd: Ensure listnode returns are usable

20 months agobgpd: Fix RFC number in a comment 14161/head
Donatas Abraitis [Tue, 8 Aug 2023 13:31:12 +0000 (16:31 +0300)]
bgpd: Fix RFC number in a comment

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: bgp_path_info_extra memory optimization 14099/head
Valerian_He [Tue, 8 Aug 2023 10:47:29 +0000 (10:47 +0000)]
bgpd: bgp_path_info_extra memory optimization

Even if some of the attributes in bgp_path_info_extra are
not used, their memory is still allocated every time. It
cause a waste of memory.
This commit code deletes all unnecessary attributes and
changes the optional attributes to pointer storage. Memory
will only be allocated when they are actually used. After
optimization, extra info related memory is reduced by about
half(~400B -> ~200B).

Signed-off-by: Valerian_He <1826906282@qq.com>
20 months agoMerge pull request #14157 from donaldsharp/blargle_smargle
Donatas Abraitis [Tue, 8 Aug 2023 10:03:34 +0000 (13:03 +0300)]
Merge pull request #14157 from donaldsharp/blargle_smargle

bgpd: bgp_vrf is already deref'ed in all paths

20 months agoospfd: Ensure listnode returns are usable 14158/head
Donald Sharp [Mon, 7 Aug 2023 19:57:29 +0000 (15:57 -0400)]
ospfd: Ensure listnode returns are usable

Coverity is complaining that listnode can return a NULL
value and thus FRR could derefence the returned value.
Since this is not crashing we know that this is not happening
in the wild.  Let's make this an assert or check that it is
legal to use the value.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agoMerge pull request #14153 from idryzhov/vtysh-empty-interface
Donald Sharp [Mon, 7 Aug 2023 19:48:00 +0000 (15:48 -0400)]
Merge pull request #14153 from idryzhov/vtysh-empty-interface

vtysh: fix checking empty interface node

20 months agoMerge pull request #14155 from LabNConsulting/ziemba-zebra-pbr-ctx-common
Donald Sharp [Mon, 7 Aug 2023 19:15:25 +0000 (15:15 -0400)]
Merge pull request #14155 from LabNConsulting/ziemba-zebra-pbr-ctx-common

zebra: zebra_dplane.[ch]: use pbr common struct in ctx

20 months agobgpd: bgp_vrf is already deref'ed in all paths 14157/head
Donald Sharp [Mon, 7 Aug 2023 19:11:05 +0000 (15:11 -0400)]
bgpd: bgp_vrf is already deref'ed in all paths

The usage of bgp_vrf does not need to be tested
at this point since it's already been derefed in all
paths to this point.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agozebra: zebra_dplane.[ch]: use pbr common struct in ctx 14155/head
G. Paul Ziemba [Sun, 6 Aug 2023 15:51:01 +0000 (08:51 -0700)]
zebra: zebra_dplane.[ch]: use pbr common struct in ctx

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
20 months agotests: add one test to bgp_set_aspath_replace.py
Francois Dumontet [Mon, 17 Jul 2023 15:48:49 +0000 (17:48 +0200)]
tests: add one test to bgp_set_aspath_replace.py

add support of  set as-path replace as-path-access-list

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
20 months agobgpd: add set as-path exclude acl-list command
Francois Dumontet [Tue, 11 Jul 2023 08:03:04 +0000 (10:03 +0200)]
bgpd: add set as-path exclude acl-list command

A route-map applied on incoming BGP updates is not able
to replace an unwanted as segments by another one.
unwanted as segment are based on an AS path access-list.

The below configuration illustrates the case:

router bgp 65001

address-family ipv4 unicast
 neighbor 192.168.1.2 route-map rule_2 in
exit-address-family

bgp as-path access-list RULE permit ^65

route-map rule_2 permit 10
 set as-path replace as-path-access-list RULE 6000

```
BGP routing table entry for 10.10.10.10/32, version 13
Paths: (1 available, best #1, table default)
  Advertised to non peer-group peers:
  192.168.10.65
  65000 1 2 3 123
    192.168.10.65 from 192.168.10.65 (10.10.10.11)
      Origin IGP, metric 0, valid, external, best (First path received)
```

After:

```
do show ip bgp 10.10.10.10/32
BGP routing table entry for 10.10.10.10/32, version 15
    Paths: (1 available, best #1, table default)
      Advertised to non peer-group peers:
      192.168.10.65
      6000 1 2 3 123
        192.168.10.65 from 192.168.10.65 (10.10.10.11)
          Origin IGP, metric 0, valid, external, best (First path
          received)
```

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
20 months agoMerge pull request #14151 from opensourcerouting/fix/improve_addpath_selected_test
Donald Sharp [Sun, 6 Aug 2023 21:01:16 +0000 (17:01 -0400)]
Merge pull request #14151 from opensourcerouting/fix/improve_addpath_selected_test

tests: Improve bgp_addpath_best_selected topotest

20 months agoMerge pull request #14152 from idryzhov/vtysh-filter
Donatas Abraitis [Sun, 6 Aug 2023 17:14:13 +0000 (20:14 +0300)]
Merge pull request #14152 from idryzhov/vtysh-filter

vtysh: remove unused cmd_filter_type

20 months agoMerge pull request #14139 from donaldsharp/v6_v4_nexthops
Donatas Abraitis [Sun, 6 Aug 2023 17:11:19 +0000 (20:11 +0300)]
Merge pull request #14139 from donaldsharp/v6_v4_nexthops

V6 v4 nexthops

20 months agoMerge pull request #14149 from donaldsharp/cleanup_bad_commands
Donatas Abraitis [Sun, 6 Aug 2023 17:10:23 +0000 (20:10 +0300)]
Merge pull request #14149 from donaldsharp/cleanup_bad_commands

Cleanup bad commands

20 months agobgpd: Check if peer is established and dynamic capability-aware 14154/head
Donatas Abraitis [Sat, 5 Aug 2023 20:00:55 +0000 (23:00 +0300)]
bgpd: Check if peer is established and dynamic capability-aware

Add this logic inside bgp_capability_send() instead of repeating the whole
logic before calling bgp_capability_send().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agotests: Check if role capability is exchanged via dynamic capability
Donatas Abraitis [Sat, 5 Aug 2023 19:54:55 +0000 (22:54 +0300)]
tests: Check if role capability is exchanged via dynamic capability

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle role capability using dynamic capability
Donatas Abraitis [Sat, 5 Aug 2023 19:32:57 +0000 (22:32 +0300)]
bgpd: Handle role capability using dynamic capability

When setting local-role for the neighbor, force sending ROLE capability via
dynamic capability if it's enabled.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agovtysh: fix checking empty interface node 14153/head
Igor Ryzhov [Fri, 4 Aug 2023 21:46:45 +0000 (00:46 +0300)]
vtysh: fix checking empty interface node

vtysh is not supposed to show empty interface node in running config,
however the corresponding check is broken and empty nodes are shown.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
20 months agovtysh: remove unused cmd_filter_type 14152/head
Igor Ryzhov [Fri, 4 Aug 2023 21:45:10 +0000 (00:45 +0300)]
vtysh: remove unused cmd_filter_type

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
20 months agotests: Drop duplicate neighbor definition 14151/head
Donatas Abraitis [Fri, 4 Aug 2023 20:22:38 +0000 (23:22 +0300)]
tests: Drop duplicate neighbor definition

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #14148 from opensourcerouting/fix/tests_bgp_addpath_failing_sometimes
Donald Sharp [Fri, 4 Aug 2023 19:44:10 +0000 (15:44 -0400)]
Merge pull request #14148 from opensourcerouting/fix/tests_bgp_addpath_failing_sometimes

tests: Use a correct syntax for defining keepalive/hold timers

20 months agotests: Improve bgp_addpath_best_selected topotest
Donatas Abraitis [Fri, 4 Aug 2023 19:34:17 +0000 (22:34 +0300)]
tests: Improve bgp_addpath_best_selected topotest

Test everything else only after we have an initial good state.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #14147 from idryzhov/static-fix-nexthop-vrf
Mark Stapp [Fri, 4 Aug 2023 19:09:39 +0000 (15:09 -0400)]
Merge pull request #14147 from idryzhov/static-fix-nexthop-vrf

staticd: fix comparison of nexthop-vrf

20 months agotests: isis_snmp, ldpd doesn't talk to snmp 14149/head
Donald Sharp [Fri, 4 Aug 2023 17:06:56 +0000 (13:06 -0400)]
tests: isis_snmp, ldpd doesn't talk to snmp

isis_snmp.test_isis_snmp/r1/ldpd.log:2023/08/04 12:49:54 LDP: [SHWNK-NWT5S][EC 100663304] No such command on config line 8: agentx

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: babel_topo1 Another no such command
Donald Sharp [Fri, 4 Aug 2023 17:05:42 +0000 (13:05 -0400)]
tests: babel_topo1 Another no such command

babel_topo1.test_babel_topo1/r3/babeld.log:2023/08/04 12:46:55 BABELD: [SHWNK-NWT5S][EC 100663304] No such command on config line 17:  redistirbute ipv6 connected

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: config_timing calls non-existent command
Donald Sharp [Fri, 4 Aug 2023 17:04:48 +0000 (13:04 -0400)]
tests: config_timing calls non-existent command

./config_timing.test_config_timing/r1/zebra.log:2023/08/04 12:34:29 ZEBRA: [SHWNK-NWT5S][EC 100663304] No such command on config line 7: exit-route-map
./config_timing.test_config_timing/r1/zebra.log:2023/08/04 12:34:29 ZEBRA: [SHWNK-NWT5S][EC 100663304] No such command on config line 10: exit-route-map

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: bfd_ospf_topo1 there is no passive interface command
Donald Sharp [Fri, 4 Aug 2023 17:03:44 +0000 (13:03 -0400)]
tests: bfd_ospf_topo1 there is no passive interface command

./bfd_ospf_topo1.test_bfd_ospf_topo1/rt3/ospfd.log:2023/08/04 12:46:58 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 28:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt5/ospfd.log:2023/08/04 12:46:59 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 27:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt1/ospfd.log:2023/08/04 12:46:56 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 30:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt4/ospfd.log:2023/08/04 12:47:00 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 27:  passive interface lo
./bfd_ospf_topo1.test_bfd_ospf_topo1/rt2/ospfd.log:2023/08/04 12:46:57 OSPF: [SHWNK-NWT5S][EC 100663304] No such command on config line 28:  passive interface lo

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: ospf6_gr_topo1 attempts, but fails to set the password
Donald Sharp [Fri, 4 Aug 2023 17:01:54 +0000 (13:01 -0400)]
tests: ospf6_gr_topo1 attempts, but fails to set the password

Irrelevant and let's just remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: cspf_topo1 has `import-te` in sharpd.conf
Donald Sharp [Fri, 4 Aug 2023 17:00:36 +0000 (13:00 -0400)]
tests: cspf_topo1 has `import-te` in sharpd.conf

This will never work, let's remove

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: bgp_update_delay is not even using frr cli syntax
Donald Sharp [Fri, 4 Aug 2023 16:58:53 +0000 (12:58 -0400)]
tests: bgp_update_delay is not even using frr cli syntax

Let's just remove it.   Looks like iproute2 configuration

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: bgp_vpnv4_noretain test turns on isis but never uses it
Donald Sharp [Fri, 4 Aug 2023 16:56:11 +0000 (12:56 -0400)]
tests: bgp_vpnv4_noretain test turns on isis but never uses it

The test was reading in the bgp config for the isis config and
clearly the test is working without this.  So let's remove
from the test the usage of isisd

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: Use a correct syntax for defining keepalive/hold timers 14148/head
Donatas Abraitis [Fri, 4 Aug 2023 16:22:20 +0000 (19:22 +0300)]
tests: Use a correct syntax for defining keepalive/hold timers

BGP: [SHWNK-NWT5S][EC 100663304] No such command on config line 2:  timers 3 10

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #14140 from opensourcerouting/fix/handle_more_capabilities_via_dyn...
Donald Sharp [Fri, 4 Aug 2023 15:26:43 +0000 (11:26 -0400)]
Merge pull request #14140 from opensourcerouting/fix/handle_more_capabilities_via_dynamic_capability

bgpd: Handle software version capability dynamicaly

20 months agostaticd: fix comparison of nexthop-vrf 14147/head
Igor Ryzhov [Fri, 4 Aug 2023 15:24:51 +0000 (18:24 +0300)]
staticd: fix comparison of nexthop-vrf

When displaying the configuration, the order of nexthop-vrf is wrong,
because the default VRF is not displayed, but still compared as the word
"default". Therefore it is placed in the middle of the list instead of
always being the first one.

Before the fix:
```
ip route 1.1.1.0/24 2.2.2.2 nexthop-vrf ccc
ip route 1.1.1.0/24 2.2.2.2
ip route 1.1.1.0/24 2.2.2.2 nexthop-vrf eee
```

After the fix:
```
ip route 1.1.1.0/24 2.2.2.2
ip route 1.1.1.0/24 2.2.2.2 nexthop-vrf ccc
ip route 1.1.1.0/24 2.2.2.2 nexthop-vrf eee
```

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
20 months agoMerge pull request #14145 from opensourcerouting/fix/handling_cluster_transit
Donald Sharp [Fri, 4 Aug 2023 11:14:55 +0000 (07:14 -0400)]
Merge pull request #14145 from opensourcerouting/fix/handling_cluster_transit

bgpd: Some cleanup and consistency "improvements"

20 months agoMerge pull request #14141 from opensourcerouting/fix/remove_deprecated_internet_community
Donald Sharp [Fri, 4 Aug 2023 11:09:05 +0000 (07:09 -0400)]
Merge pull request #14141 from opensourcerouting/fix/remove_deprecated_internet_community

bgpd: Remove deprecated COMMUNITY_INTERNET community

20 months agobgpd: Use SET_FLAG when setting AIGP attribute flag 14145/head
Donatas Abraitis [Thu, 3 Aug 2023 19:54:36 +0000 (22:54 +0300)]
bgpd: Use SET_FLAG when setting AIGP attribute flag

Just reuse an existing more-readable code.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle srv6 attributes the same way as others using setters/getters
Donatas Abraitis [Thu, 3 Aug 2023 19:53:21 +0000 (22:53 +0300)]
bgpd: Handle srv6 attributes the same way as others using setters/getters

To be consistent and error-safe.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle encap attributes the same way as others using setters/getters
Donatas Abraitis [Thu, 3 Aug 2023 19:52:09 +0000 (22:52 +0300)]
bgpd: Handle encap attributes the same way as others using setters/getters

To be consistent and error-safe.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle transit attributes the same way as others using setters/getters
Donatas Abraitis [Thu, 3 Aug 2023 19:48:40 +0000 (22:48 +0300)]
bgpd: Handle transit attributes the same way as others using setters/getters

To be consistent and error-safe.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle cluster attribute the same way as others using setters/getters
Donatas Abraitis [Thu, 3 Aug 2023 19:44:17 +0000 (22:44 +0300)]
bgpd: Handle cluster attribute the same way as others using setters/getters

To be consistent and error-safe.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Check if we have such a peer before handling software capability 14140/head
Donatas Abraitis [Thu, 3 Aug 2023 19:00:27 +0000 (22:00 +0300)]
bgpd: Check if we have such a peer before handling software capability

Do not pass NULL for peer_established(), just in case.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Remove deprecated COMMUNITY_INTERNET community 14141/head
Donatas Abraitis [Thu, 3 Aug 2023 14:12:19 +0000 (17:12 +0300)]
bgpd: Remove deprecated COMMUNITY_INTERNET community

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Add all other capabilities for dynamic handling (placeholders)
Donatas Abraitis [Thu, 3 Aug 2023 13:58:40 +0000 (16:58 +0300)]
bgpd: Add all other capabilities for dynamic handling (placeholders)

Gonna be covered later with further PRs. Now adding them to avoid compiler
errors due to uncovered switch/cases.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agobgpd: Handle software version capability dynamicaly
Donatas Abraitis [Thu, 3 Aug 2023 13:37:54 +0000 (16:37 +0300)]
bgpd: Handle software version capability dynamicaly

We have dynamic capability support, but it handles only MP capability.

With this change, we can enable software version capability dynamicaly, without
resetting the session.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agotests: Check if we can handle software version capability dynamicaly
Donatas Abraitis [Thu, 3 Aug 2023 13:35:46 +0000 (16:35 +0300)]
tests: Check if we can handle software version capability dynamicaly

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agodoc: Add --v6-with-v4-nexthops documentation 14139/head
Donald Sharp [Thu, 3 Aug 2023 12:57:55 +0000 (08:57 -0400)]
doc: Add --v6-with-v4-nexthops documentation

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobgpd: Allow bgp to specify if it will allow v6 routing with v4 nexthops
Donald Sharp [Thu, 3 Aug 2023 12:14:08 +0000 (08:14 -0400)]
bgpd: Allow bgp to specify if it will allow v6 routing with v4 nexthops

Add a `--v6-with-v4-nexthop` cli to bgp to allow it to peer with
neighbors in the configuration where the interface has no v6 addresses
at all and there is a v4 address that is usable as a v4 address
embedded in a v6 address.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobgpd: Do not allow a peer to come up on v6 if we have no ability to route
Donald Sharp [Thu, 3 Aug 2023 01:15:02 +0000 (21:15 -0400)]
bgpd: Do not allow a peer to come up on v6 if we have no ability to route

Modify bgp to not allow a v6 peer to come up if the v6 afi is negotiated
and the outgoing interface has no v6 address as well as zebra does
not support the v6 with v4 nexthop capabilities that some dataplanes
allow.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobgpd: Have bgp notice the zebra ability to use v6_with_v4_nexthops
Donald Sharp [Thu, 3 Aug 2023 01:08:43 +0000 (21:08 -0400)]
bgpd: Have bgp notice the zebra ability to use v6_with_v4_nexthops

Store the data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agolib, zebra: Send up whether or not v6_with_v4_nexthops are supported
Donald Sharp [Thu, 3 Aug 2023 00:56:35 +0000 (20:56 -0400)]
lib, zebra: Send up whether or not v6_with_v4_nexthops are supported

After Zebra knows it's capability surrounding v6 with v4 nexthops
have it send this ability up to interested parties.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agozebra: Allow zebra cli to accept v6 routes with v4 nexthops
Donald Sharp [Mon, 24 Jul 2023 15:16:53 +0000 (11:16 -0400)]
zebra: Allow zebra cli to accept v6 routes with v4 nexthops

add --v6-with-v4-nexthop cli to zebra to allow operator to
specify that this functionality is allowed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agoMerge pull request #14129 from samanvithab/bgpd_frr_fix
Donald Sharp [Wed, 2 Aug 2023 17:48:14 +0000 (13:48 -0400)]
Merge pull request #14129 from samanvithab/bgpd_frr_fix

bgpd: Fix for session reset issue caused by malformed core attributes  in update message

20 months agoMerge pull request #13466 from donaldsharp/remove_unneeded_test_files
Donatas Abraitis [Wed, 2 Aug 2023 14:26:26 +0000 (17:26 +0300)]
Merge pull request #13466 from donaldsharp/remove_unneeded_test_files

tests: Remove unused file in isis_snmp test

20 months agotests: Remove unused file in isis_snmp test 13466/head
Donald Sharp [Mon, 8 May 2023 12:45:55 +0000 (08:45 -0400)]
tests: Remove unused file in isis_snmp test

The */show_ip_route.ref files are never used, let's remove them
to prevent any future issues.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agobgpd: Fix session reset issue caused by malformed core attributes 14129/head
Samanvitha B Bhargav [Wed, 2 Aug 2023 06:10:35 +0000 (23:10 -0700)]
bgpd: Fix session reset issue caused by malformed core attributes

RCA:
On encountering any attribute error for core attributes in update message,
the error handling is set to 'treat as withdraw' and
further parsing of the remaining attributes is skipped.
But the stream pointer is not being correctly adjusted to
point to the next NLRI field skipping the rest of the attributes.
This leads to incorrect parsing of the NLRI field,
which causes BGP session to reset.

Fix:
The stream pointer offset is rightly adjusted to point to the NLRI field correctly
when the malformed attribute is encountered and remaining attribute parsing is skipped.

Signed-off-by: Samanvitha B Bhargav <bsamanvitha@vmware.com>
20 months agoMerge pull request #14125 from opensourcerouting/fix/drop_unused_lua_stuff
Jafar Al-Gharaibeh [Wed, 2 Aug 2023 04:52:56 +0000 (23:52 -0500)]
Merge pull request #14125 from opensourcerouting/fix/drop_unused_lua_stuff

lib: Do not use time_t as a special Lua encoder/decoder

20 months agoMerge pull request #14116 from donaldsharp/test_naming
Donatas Abraitis [Tue, 1 Aug 2023 15:13:02 +0000 (18:13 +0300)]
Merge pull request #14116 from donaldsharp/test_naming

Test naming

20 months agoMerge pull request #14071 from achernavin22/ospf-fix-abr-type-chg
Donald Sharp [Tue, 1 Aug 2023 14:42:54 +0000 (10:42 -0400)]
Merge pull request #14071 from achernavin22/ospf-fix-abr-type-chg

ospfd: fix changing ABR type between standard and shortcut

20 months agotests: Convert d1 and d2 to output and expected in gen_json_diff_report 14116/head
Donald Sharp [Mon, 31 Jul 2023 12:45:50 +0000 (08:45 -0400)]
tests: Convert d1 and d2 to output and expected in gen_json_diff_report

The output of gen_json_diff_report is used all over the place and
it outputs d1 and d2.  Let's change this to output and expected
as that is how it is used.  Should help with debugging.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: Run black over lib/topotest.py
Donald Sharp [Mon, 31 Jul 2023 12:21:04 +0000 (08:21 -0400)]
tests: Run black over lib/topotest.py

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agotests: Start using output and expected vs d1 and d2
Donald Sharp [Mon, 31 Jul 2023 12:18:40 +0000 (08:18 -0400)]
tests: Start using output and expected vs d1 and d2

Let us start using output and expected in lib/topotest.py
because when we see output it is confusing what d1 is
versus what d2 is.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
20 months agoMerge pull request #14117 from patrasar/pimv6_13893
Donald Sharp [Tue, 1 Aug 2023 11:30:57 +0000 (07:30 -0400)]
Merge pull request #14117 from patrasar/pimv6_13893

pimd, pim6d: Don't set SRC_STREAM flag on LHR

20 months agolib: Do not use time_t as a special Lua encoder/decoder 14125/head
Donatas Abraitis [Tue, 1 Aug 2023 11:08:25 +0000 (14:08 +0300)]
lib: Do not use time_t as a special Lua encoder/decoder

This is purely an integer (long long/long), and causes issues for 32-bit systems.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
20 months agoMerge pull request #14078 from raja-rajasekar/frr_dev1
Donatas Abraitis [Tue, 1 Aug 2023 09:19:18 +0000 (12:19 +0300)]
Merge pull request #14078 from raja-rajasekar/frr_dev1

zebra: fix nhe refcnt when frr service goes down

20 months agoMerge pull request #14115 from opensourcerouting/fix/build_alpine_images
Jafar Al-Gharaibeh [Tue, 1 Aug 2023 04:53:12 +0000 (23:53 -0500)]
Merge pull request #14115 from opensourcerouting/fix/build_alpine_images

docker: Adjustments for Alpine 3.18 and buildx

20 months agoMerge pull request #14121 from opensourcerouting/deb-protobuf-depend
Jafar Al-Gharaibeh [Tue, 1 Aug 2023 04:48:55 +0000 (23:48 -0500)]
Merge pull request #14121 from opensourcerouting/deb-protobuf-depend

debian: Add missing protobuf dependency

20 months agodebian: Add missing protobuf dependency 14121/head
Martin Winter [Mon, 31 Jul 2023 22:48:26 +0000 (00:48 +0200)]
debian: Add missing protobuf dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
21 months agoMerge pull request #14042 from FRIDM636/extcomm-list-delete
Donatas Abraitis [Mon, 31 Jul 2023 12:50:16 +0000 (15:50 +0300)]
Merge pull request #14042 from FRIDM636/extcomm-list-delete

bgp: add set BGP extended community for deletion command

21 months agopimd, pim6d: Don't set SRC_STREAM flag on LHR 14117/head
Sarita Patra [Mon, 31 Jul 2023 11:30:26 +0000 (04:30 -0700)]
pimd, pim6d: Don't set SRC_STREAM flag on LHR

Setup:
------
R1( LHR) ---------R2( RP) ----------R3( FHR)

Problem:
-------
- Send IGMP/MLD join and traffic.
  LHR: (S,G) mroute is created with reference count = 2
  and set the flag SRC_STREAM.
  (Code flow: pim_mroute_msg_wholepkt -> pim_upstream_add,
              pim_upstream_sg_running_proc -> pim_upstream_ref)
- Send IGMP/MLD prune.
  LHR: removes (*,G) entry and it tries to remove childen (S,G) entries.
       But (S,G) is having reference count = 2. So after prune,
       (S,G) entry reference count becomes 1 and will be present
       until KAT expires.

Fix:
---
Don't set SRC_STREAM flag for LHR.
In LHR, (S,G) should be maintained, until (*,G) is present.
When prune receives delete (*,G) and children (S,G).
When traffic stops, delete (S,G) after KAT expires.

Issue: #13893

Signed-off-by: Sarita Patra <saritap@vmware.com>
21 months agotests: test set extended-comm-list <> delete command 14042/head
Farid Mihoub [Wed, 12 Jul 2023 10:05:38 +0000 (12:05 +0200)]
tests: test set extended-comm-list <> delete command

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
21 months agobgpd: add set extended-comm-list <> delete command
Farid Mihoub [Wed, 14 Jun 2023 14:16:55 +0000 (16:16 +0200)]
bgpd: add set extended-comm-list <> delete command

Signed-off-by: Farid Mihoub <farid.mihoub@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
21 months agodocker: Install the apk packages regardless of the platform 14115/head
Donatas Abraitis [Mon, 31 Jul 2023 08:05:15 +0000 (11:05 +0300)]
docker: Install the apk packages regardless of the platform

It was hardcoded to x86_64, but we build Alpine images for more platforms, let's
be dynamical here.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
21 months agodocker: Use openssl instead of libressl
Donatas Abraitis [Mon, 31 Jul 2023 08:04:30 +0000 (11:04 +0300)]
docker: Use openssl instead of libressl

libressl is dropped from Alpine 3.18 for s390x.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
21 months agoMerge pull request #14109 from taspelund/noreset_update_src
Donatas Abraitis [Mon, 31 Jul 2023 07:03:28 +0000 (10:03 +0300)]
Merge pull request #14109 from taspelund/noreset_update_src

bgpd: skip reset when removing dup update-source

21 months agoMerge pull request #14112 from donaldsharp/test_sponging
Donatas Abraitis [Mon, 31 Jul 2023 07:02:36 +0000 (10:02 +0300)]
Merge pull request #14112 from donaldsharp/test_sponging

Test sponging

21 months agoMerge pull request #14111 from opensourcerouting/isisd-tilfa-topotest-fixes
Donald Sharp [Sat, 29 Jul 2023 23:22:34 +0000 (19:22 -0400)]
Merge pull request #14111 from opensourcerouting/isisd-tilfa-topotest-fixes

tests: improve stability of the IS-IS TI-LFA topotest

21 months agoMerge pull request #14103 from opensourcerouting/reload-keychain
Donald Sharp [Sat, 29 Jul 2023 18:01:31 +0000 (14:01 -0400)]
Merge pull request #14103 from opensourcerouting/reload-keychain

tools: fix key chain reload removal

21 months agoMerge pull request #14104 from rampxxxx/bfd_audit
Donald Sharp [Sat, 29 Jul 2023 17:57:33 +0000 (13:57 -0400)]
Merge pull request #14104 from rampxxxx/bfd_audit

bfdd: add additional parameters to json command

21 months agotests: Convert isis to use 1 and 10 for hello/multiplier 14112/head
Donald Sharp [Thu, 27 Jul 2023 19:36:33 +0000 (15:36 -0400)]
tests: Convert isis to use 1 and 10 for hello/multiplier

Current isis tests use a variety of hello timers as well
as hello-multiplier, let's modify all of the isis test
cases to use 1 and 10.  This cleans up some spurious test
failures I was seeing locally.  As an example without
these changes running isis_tilfa_topo1 2r6 times I would
see 5-10 test failures now I am seeing ~2 test failures.

In any event part of the problem was that some tests were
not fully converged when looking at them under heavy
system load.  Changing this to 1/10 gives us 10 chances
to see the incoming packet.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: bfd_bgp_cbit_topo3 allow bgp to converge before testing
Donald Sharp [Sat, 29 Jul 2023 17:26:26 +0000 (13:26 -0400)]
tests: bfd_bgp_cbit_topo3 allow bgp to converge before testing

This test was failing upstream a bunch of times.  Upon examining
the log files as well as the test script it was noticed that
the bfd peers were checked to see that they had come up.  But
both the timers used for bgp as well as not checking that bgp
has actually come up would cause the test to fail in subsuquent
steps if bgp has not come up.  Test that bgp peering is actually
established before testing link down events.  It's possible
this test might need to be revisited to ensure that the routes
are actually installed and ready to go before as well, but I am
not seeing that right now.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: Fix zebra_seg6_route to give more time for routes to be installed
Donald Sharp [Sat, 29 Jul 2023 17:24:55 +0000 (13:24 -0400)]
tests: Fix zebra_seg6_route to give more time for routes to be installed

This test is failing upstream regularly, when inspecting the log
files we see that the route being looked for is in a queued state
when the test fails.  Give this test more time for when the
system is under severe load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: isis_te_topo1 can fail occassionally
Donald Sharp [Sat, 29 Jul 2023 17:22:39 +0000 (13:22 -0400)]
tests: isis_te_topo1 can fail occassionally

Upstream ( and locally ) this test fails.  The adj-sid value
being looked for in the testing is a dynamic value that is
assigned based upon how the network comes up.  The reality
is that there is no enforced order of what the adj-sid
can be.  As such this test looking for this value makes
no sense.  Let's remove that from the test.

Additionally bring the isis hello-interval to 1 down
from 3 to make things converge faster.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: zebra_netlink ensure the address is installed
Donald Sharp [Fri, 28 Jul 2023 14:31:30 +0000 (10:31 -0400)]
tests: zebra_netlink ensure the address is installed

Ran test under high load and system rejected the sharp
install of routes.  Only reason that that would happen
would be if the address had not been set by the kernel
yet.  The test log files had timestamp precision and the
addition of the sharp routes was under 1/10 of a second
after the address was attempted to be installed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
21 months agotests: increase wait timer in TI-LFA topotest 14111/head
Renato Westphal [Sat, 29 Jul 2023 14:46:54 +0000 (11:46 -0300)]
tests: increase wait timer in TI-LFA topotest

Starting from step 11, this topotest focuses on validating the TI-LFA
switchover functionality, where the backup nexthops are activated
after an adjacency expires, either with or without BFD.

Currently, the test checks the RIB shortly after the switchover using
a tight 5 seconds interval to ensure that the RIB update is due to the
switchover and not an SPF update (which is configured with an initial
delay of 15 seconds). However, it was observed that the kernel might
take longer than 5 seconds to install routes when the system is under
heavy load. To account for that, double the wait interval so that
this topotest will succeed even in those conditions.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
21 months agotests: ensure BFD session is up before proceeding to the next step
Renato Westphal [Sat, 29 Jul 2023 01:32:17 +0000 (22:32 -0300)]
tests: ensure BFD session is up before proceeding to the next step

In this topotest, BFD is configured at the end of step 13. However,
in certain cases where the testing machine is exceptionally fast (e.g.,
Donald's quantum computer), there is a possibility that the interface
shutdown event from step 14 may occur before BFD has had sufficient
time to establish the session, which leads to a test failure. To fix
this problem, ensure the BFD session is up before proceeding to the
next step.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
21 months agoisisd: update Node-SID flag dynamically
Renato Westphal [Thu, 27 Jul 2023 23:35:10 +0000 (20:35 -0300)]
isisd: update Node-SID flag dynamically

Node-SIDs refer to Prefix-SIDs associated with host prefixes of
loopback addresses. As such, whenever an interface address is added
or deleted, all configured Prefix-SIDs must be reevaluated to check
if the N-flag needs to be set or unset.

This change fixes some race conditions in the TI-LFA topotest where
specific sequence of events could cause Prefix-SIDs to not have the
N-flag set when they should, resulting in various failures.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
21 months agotests: increase hello multiplier in TI-LFA topotest
Renato Westphal [Tue, 25 Jul 2023 22:50:14 +0000 (19:50 -0300)]
tests: increase hello multiplier in TI-LFA topotest

In this topotest, the IS-IS hello interval is set to 1 for fast
convergence. However, the current hello multiplier of 3 results in a
tight IS-IS adjacency holdtime of 3 seconds. This tight timeframe can
cause failures when the testing machine is running multiple tests at
full capacity. To improve stability under such conditions, this commit
raises the hello multiplier to 10, providing a more forgiving holdtime
and reducing the likelihood of failures.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>