]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
20 months agozebra: fix assert in process_subq_route
Pavel Ivashchenko [Thu, 3 Aug 2023 14:01:51 +0000 (14:01 +0000)]
zebra: fix assert in process_subq_route

 Bug is reporoduced in case of switching interfaces betwean VRFs.
 ospf6d is enabled and configured in each VRF.

 'dest' can be removed from the route node in the time when the same
 route node waiting processing in another sub-queue.

 A route node must only be in one sub-queue at a time.

 Details:

 1. Config:

    interface if0
     ipv6 address 2001:db8:cafe:2::2/64
     ipv6 nat inside
     ipv6 ospf6 area 0.0.0.51
     ipv6 ospf6 cost 10
     vrf test2
    exit
    !
    interface if1
     ipv6 address 2001:db8:cafe:4::1/64
     ipv6 nat outside
     ipv6 ospf6 area 0.0.0.0
     ipv6 ospf6 cost 10
     vrf test2
    exit
    !
    router ospf6
     ospf6 router-id 2.2.2.2
    exit
    !
    router ospf6 vrf test1
     ospf6 router-id 2.2.2.2
    exit
    !
    router ospf6 vrf test2
     ospf6 router-id 2.2.2.2
    exit

  I just quickly switched interfaces between different VRFs (default/test1/test2).

 2. Log messages:

  Aug 02 16:51:56 ubuntu zebra[386985]: [MFYWV-KH3MC] process_subq_early_route_add: (0:?):2001:db8:cafe:2::/64: Inserting route rn 0x56267593de90, re 0x56267595ae40 (connected) existing 0x0, same_count 0
  Aug 02 16:51:56 ubuntu zebra[386985]: [Q4T2G-E2SQF] process_subq_early_route_add: dumping RE entry 0x56267595ae40 for 2001:db8:cafe:2::/64 vrf default(0)
  Aug 02 16:51:56 ubuntu zebra[386985]: [GCGMT-SQR82] rib_link: (0:?):2001:db8:cafe:2::/64: rn 0x56267593de90 adding dest
  Aug 02 16:51:56 ubuntu zebra[386985]: [JF0K0-DVHWH] rib_meta_queue_add: (0:254):2001:db8:cafe:2::/64: queued rn 0x56267593de90 into sub-queue Connected Routes
  Aug 02 16:51:56 ubuntu zebra[386985]: [QE6V0-J8BG5] rib_delnode: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, re 0x56267595ae40, removing
  Aug 02 16:51:56 ubuntu zebra[386985]: [KMPGN-JBRKW] rib_meta_queue_add: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90 is already queued in sub-queue Connected Routes
  Aug 02 16:51:56 ubuntu zebra[386985]: [MFYWV-KH3MC] process_subq_early_route_add: (0:254):2001:db8:cafe:2::/64: Inserting route rn 0x56267593de90, re 0x56267595abf0 (ospf6) existing 0x0, same_count 1
  Aug 02 16:51:56 ubuntu zebra[386985]: [Q4T2G-E2SQF] process_subq_early_route_add: dumping RE entry 0x56267595abf0 for 2001:db8:cafe:2::/64 vrf default(0)
  Aug 02 16:51:56 ubuntu zebra[386985]: [KMPGN-JBRKW] rib_meta_queue_add: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90 is already queued in sub-queue Connected Routes
  Aug 02 16:51:56 ubuntu zebra[386985]: [YEYFX-TDSC2] process_subq_early_route_add: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, removing unneeded re 0x56267595ae40
  Aug 02 16:51:56 ubuntu zebra[386985]: [Y53JX-CBC5H] rib_unlink: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, re 0x56267595ae40
  Aug 02 16:51:56 ubuntu zebra[386985]: [QE6V0-J8BG5] rib_delnode: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, re 0x56267595abf0, removing
  Aug 02 16:51:56 ubuntu zebra[386985]: [JF0K0-DVHWH] rib_meta_queue_add: (0:254):2001:db8:cafe:2::/64: queued rn 0x56267593de90 into sub-queue RIP/OSPF/ISIS/EIGRP/NHRP Routes
  Aug 02 16:51:56 ubuntu zebra[386985]: [NZNZ4-7P54Y] default(0:254):2001:db8:cafe:2::/64: Processing rn 0x56267593de90
  Aug 02 16:51:56 ubuntu zebra[386985]: [ZJVZ4-XEGPF] default(0:254):2001:db8:cafe:2::/64: Examine re 0x56267595abf0 (ospf6) status: Removed Changed flags: None dist 110 metric 10
  Aug 02 16:51:56 ubuntu zebra[386985]: [NM15X-X83N9] rib_process: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, removing re 0x56267595abf0
  Aug 02 16:51:56 ubuntu zebra[386985]: [Y53JX-CBC5H] rib_unlink: (0:254):2001:db8:cafe:2::/64: rn 0x56267593de90, re 0x56267595abf0
  Aug 02 16:51:56 ubuntu zebra[386985]: [KT8QQ-45WQ0] rib_gc_dest: (0:?):2001:db8:cafe:2::/64: removing dest from table
  Aug 02 16:51:56 ubuntu zebra[386985]: [HH6N2-PDCJS] default(0:0):2001:db8:cafe:2::/64 rn 0x56267593de90 dequeued from sub-queue Connected Routes

 3. ...and then assert:

  (gdb) bt
  #0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=140662163115136) at ./nptl/pthread_kill.c:44
  #1  __pthread_kill_internal (signo=6, threadid=140662163115136) at ./nptl/pthread_kill.c:78
  #2  __GI___pthread_kill (threadid=140662163115136, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
  #3  0x00007fee76753476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
  #4  0x00007fee767397f3 in __GI_abort () at ./stdlib/abort.c:79
  #5  0x00007fee76a420fd in _zlog_assert_failed () from target:/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0
  #6  0x0000562674efe0f0 in process_subq_route (qindex=7 '\a', lnode=0x562675940c60) at zebra/zebra_rib.c:2540
  #7  process_subq (qindex=META_QUEUE_NOTBGP, subq=0x562675574580) at zebra/zebra_rib.c:3055
  #8  meta_queue_process (dummy=<optimized out>, data=0x56267556d430) at zebra/zebra_rib.c:3091
  #9  0x00007fee76a386e8 in work_queue_run () from target:/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0
  #10 0x00007fee76a31c91 in thread_call () from target:/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0
  #11 0x00007fee769ee528 in frr_run () from target:/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0
  #12 0x0000562674e97ec5 in main (argc=5, argv=0x7ffd1e275958) at zebra/main.c:478

  (gdb) print lnode->data
  $10 = (void *) 0x56267593de90
  (gdb) p/x *(struct route_node *)0x56267593de90
  $11 = {
    p = {
      family = 0xa,
      prefixlen = 0x40,
      u = {
        prefix = 0x20,
        prefix4 = {
          s_addr = 0xb80d0120
        },
        prefix6 = {
          __in6_u = {
            __u6_addr8 = {0x20, 0x1, 0xd, 0xb8, 0xca, 0xfe, 0x0, 0x2, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0},
            __u6_addr16 = {0x120, 0xb80d, 0xfeca, 0x200, 0x0, 0x0, 0x0, 0x0},
            __u6_addr32 = {0xb80d0120, 0x200feca, 0x0, 0x0}
          }
        },
   ...
    table = 0x5626755ae010,
    parent = 0x5626755ae070,
    link = {0x0, 0x0},
    lock = 0x4,
    nodehash = {
      hi = {
        next = 0x5626755ae0d0,
        hashval = 0xebe8bdbf
      }
    },
    info = 0x0

 3. What's happen:

   We removed unneeded re 0x56267595ae40 while adding re 0x56267595abf0. It was the last connected re,
   but rn 0x56267593de90 is still in the connected sub-queue.

   Then rib_delnode was called for 0x56267595abf0. (rn 0x56267593de90 is still in the connected sub-queue).
   rib_delnode have called rib_meta_queue_add which have checked, that rn is absent in sub-queue RIP/OSPF/ISIS/EIGRP/NHRP
   and have added rn in the second sub-queue.

Fixes: d7ac4c4d88 ("zebra: Introduce early route processing on the MetaQ")
Signed-off-by: Pavel Ivashchenko <pivashchenko@nfware.com>
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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

21 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

21 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

21 months agotests: Convert d1 and d2 to output and expected in gen_json_diff_report
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>
21 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>
21 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>
21 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

21 months agolib: Do not use time_t as a special Lua encoder/decoder
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>
21 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

21 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

21 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

21 months agodebian: Add missing protobuf dependency
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
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
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
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
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
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>
21 months agobfdd: add debug flag around log
lynnemorrison [Fri, 28 Jul 2023 15:46:30 +0000 (11:46 -0400)]
bfdd: add debug flag around log

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
21 months agobgpd: skip reset when removing dup update-source
Trey Aspelund [Mon, 24 Jul 2023 20:16:08 +0000 (20:16 +0000)]
bgpd: skip reset when removing dup update-source

When 'no neighbor .. update-source' is issued for a regular peer, that
peer is always reset.  This is unnecessary if the peer is a member of a
peer-group and it inherits an identical update-source, so let's skip
the reset/Notification for that condition.

Config:
------------
router bgp 1
 neighbor PG peer-group
 neighbor PG remote-as internal
 neighbor PG update-source 100.64.0.3
 neighbor 192.168.122.99 peer-group PG
 neighbor 192.168.122.99 update-source 100.64.0.3

Before:
------------
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1        36        34        0    0    0 00:00:17            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 46083
ub20-2(config-router)# no neighbor 192.168.122.99 update-source
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1        36        35        0    0    0 00:00:01         Idle        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39847

After:
------------
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1         3         3        0    0    0 00:00:20            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39415
ub20-2(config-router)# no neighbor 192.168.122.99 update-source
ub20-2(config-router)# do show ip bgp sum | include .99
192.168.122.99  4          1         3         3        0    0    0 00:00:28            0        0 N/A
ub20-2(config-router)# do show ip bgp neighbors 192.168.122.99 | include Local host
Local host: 100.64.0.3, Local port: 39415

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
21 months agobfdd: add additional parameters to json command
lynnemorrison [Thu, 27 Jul 2023 15:10:49 +0000 (11:10 -0400)]
bfdd: add additional parameters to json command

Add parameters to the "show bfd peers json" command to
display interface and type of BFD session.

Signed-off-by: Lynne Morrison <lynne.morrison@ibm.com>
21 months agotools: fix key chain reload removal
Rafael Zalamena [Thu, 27 Jul 2023 13:47:23 +0000 (10:47 -0300)]
tools: fix key chain reload removal

When deleting a key chain with frr-reload track if the whole root node
is being removed or not.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
21 months agoMerge pull request #12524 from leonshaw/fix/evpn-nh-order
Russ White [Thu, 27 Jul 2023 11:30:23 +0000 (07:30 -0400)]
Merge pull request #12524 from leonshaw/fix/evpn-nh-order

lib, zebra: Fix EVPN nexthop config order