]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agobgpd: implement SendHoldTimer 11225/head
David Lamparter [Thu, 22 Apr 2021 09:04:52 +0000 (11:04 +0200)]
bgpd: implement SendHoldTimer

As described by
https://www.ietf.org/archive/id/draft-spaghetti-idr-bgp-sendholdtimer-04.html

Since this replicates the HoldTime check on the receiver that is already
part of the protocol, I do not believe it necessary to wait for IETF
progress on this draft.  It's just replicating an existing element of
the protocol at the other side of the session.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #11183 from opensourcerouting/feature/handle_bgp_gr_notification
Russ White [Wed, 18 May 2022 19:17:59 +0000 (15:17 -0400)]
Merge pull request #11183 from opensourcerouting/feature/handle_bgp_gr_notification

bgpd: Activate Graceful-Restart when receiving CEASE/HOLDTIME notifications

2 years agoMerge pull request #11214 from kuldeepkash/multicast_pim_dr_nondr
Russ White [Wed, 18 May 2022 19:11:15 +0000 (15:11 -0400)]
Merge pull request #11214 from kuldeepkash/multicast_pim_dr_nondr

tests: Fix for test_pim_dr_nondr_with_ospf_topo2 test failure

2 years agoMerge pull request #11218 from opensourcerouting/fix/adv_routes_best_path_wrong_local_as
Russ White [Wed, 18 May 2022 19:10:18 +0000 (15:10 -0400)]
Merge pull request #11218 from opensourcerouting/fix/adv_routes_best_path_wrong_local_as

bgpd: Show a correct local AS for the advertised/bestpath routes

2 years agoMerge pull request #11219 from pguibert6WIND/doc_show_isis
Russ White [Wed, 18 May 2022 19:09:25 +0000 (15:09 -0400)]
Merge pull request #11219 from pguibert6WIND/doc_show_isis

doc: use real wording for the show isis segment-routing node command

2 years agoMerge pull request #11205 from chiragshah6/fdev1
Russ White [Wed, 18 May 2022 15:13:22 +0000 (11:13 -0400)]
Merge pull request #11205 from chiragshah6/fdev1

zebra: new netlink parse utility for rta used to send nhg msg

2 years agodoc: use real wording for the show isis segment-routing node command 11219/head
Philippe Guibert [Wed, 18 May 2022 13:08:18 +0000 (15:08 +0200)]
doc: use real wording for the show isis segment-routing node command

The node keyword does not take 's' at the end.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2 years agobgpd: Show a correct local AS for the advertised/bestpath routes 11218/head
Donatas Abraitis [Wed, 18 May 2022 10:34:02 +0000 (13:34 +0300)]
bgpd: Show a correct local AS for the advertised/bestpath routes

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11203 from donaldsharp/coverity_bgp_memcpy
Donatas Abraitis [Tue, 17 May 2022 16:42:51 +0000 (18:42 +0200)]
Merge pull request #11203 from donaldsharp/coverity_bgp_memcpy

bgpd: Fix coverity SA issue with copying over prefix data

2 years agobgpd: Fix coverity SA issue with copying over prefix data 11203/head
Donald Sharp [Sat, 14 May 2022 20:26:27 +0000 (16:26 -0400)]
bgpd: Fix coverity SA issue with copying over prefix data

in bgp_nlri_parse_ip there is a `sanity` check to ensure
that the prefix length as specified by the packet
will fit inside of a `struct prefix` correctly.  The problem
here of course is that this is only v4 / v6 unicast/multicast
parsing and the bytes will never be more than 16, but we are copying
into a part of the struct prefix that is only 16 bytes, but with
this check the length may be up to 47 bytes( but not really possible ).

Limit the size check to at most 16 bytes (since we are only handling
v4 or v6 addresses here )

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11037 from SaiGomathiN/clearcli
David Lamparter [Tue, 17 May 2022 13:00:32 +0000 (15:00 +0200)]
Merge pull request #11037 from SaiGomathiN/clearcli

2 years agoMerge pull request #11192 from cyberstorm-mauritius/zebra_netlink
Mark Stapp [Tue, 17 May 2022 12:13:23 +0000 (08:13 -0400)]
Merge pull request #11192 from cyberstorm-mauritius/zebra_netlink

zebra: Add startup message and display netlink buffer size.

2 years agoMerge pull request #11211 from donaldsharp/ospf6_time_left_in_hello
David Lamparter [Tue, 17 May 2022 11:21:38 +0000 (13:21 +0200)]
Merge pull request #11211 from donaldsharp/ospf6_time_left_in_hello

2 years agoMerge pull request #10775 from opensourcerouting/pim6-mld-pr
Donald Sharp [Tue, 17 May 2022 11:20:08 +0000 (07:20 -0400)]
Merge pull request #10775 from opensourcerouting/pim6-mld-pr

pim6d: MLD code

2 years agodoc: Updated the document for pimv6 clear commands 11037/head
Sai Gomathi N [Wed, 20 Apr 2022 05:12:43 +0000 (22:12 -0700)]
doc: Updated the document for pimv6 clear commands

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Add 'clear ipv6 mroute [vrf NAME] count' CLI
Sai Gomathi N [Wed, 13 Apr 2022 15:31:45 +0000 (08:31 -0700)]
pim6d: Add 'clear ipv6 mroute [vrf NAME] count' CLI

Adding clear ipv6 mroute count command for resetting
multicast routes and count.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Add 'clear ipv6 pim [vrf NAME] oil' command
Sai Gomathi N [Wed, 13 Apr 2022 14:41:46 +0000 (07:41 -0700)]
pim6d: Add 'clear ipv6 pim [vrf NAME] oil' command

Adding clear ipv6 pim [vrf NAME] oil CLI for resetting
PIMv6 output interface list.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Add 'clear ipv6 mroute [vrf NAME]' command
Sai Gomathi N [Wed, 13 Apr 2022 13:14:02 +0000 (06:14 -0700)]
pim6d: Add 'clear ipv6 mroute [vrf NAME]' command

Adding clear ipv6 mroute cli for resetting the PIMv6 mroutes.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Adding 'clear ipv6 pim statistics [vrf NAME]' cmd
Sai Gomathi N [Wed, 13 Apr 2022 11:16:59 +0000 (04:16 -0700)]
pim6d: Adding 'clear ipv6 pim statistics [vrf NAME]' cmd

Adding clear ipv6 pim statistics cli for resetting pimv6 statistics

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopim6d: Adding pim_cmd_lookup api in pim_cmd_common file
Sai Gomathi N [Wed, 27 Apr 2022 15:07:53 +0000 (08:07 -0700)]
pim6d: Adding pim_cmd_lookup api in pim_cmd_common file

Adding pim_cmd_lookup function for clear CLIs

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agopimd: Moving the common functions from pim_cmd.c file
Sai Gomathi N [Tue, 12 Apr 2022 11:36:35 +0000 (04:36 -0700)]
pimd: Moving the common functions from pim_cmd.c file

Moving the functions that are used by both IPV4 and IPV6 to a
common file pim_cmd_common.c file.

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agoospf6d: Ensure the ospf6 interface hello timer pops in all cases 11211/head
Donald Sharp [Mon, 16 May 2022 19:20:12 +0000 (15:20 -0400)]
ospf6d: Ensure the ospf6 interface hello timer pops in all cases

If a end users does something like this:

int enp39s0
  ipv6 ospf6 hello-interval 65535

And then the timer pops and we send the hello and immediately
if the end user does this:

  ipv6 ospf6 hello-interval 5

The timer is not being reset and FRR waits the full 65k seconds
before sending the hello again, which then immediately sets
the next hello to go out in 5 seconds.

When FRR receives the new timer value, look at how much time
is left on the timer in seconds.  If this value is greater
than the new hello timer, stop the timer and set it too that
value.

This should fix a CI system test failure found, where the
system is testing setting timer from things like 12 seconds
to 65k seconds then back down to 12 and that the ospf6 neighbor
relationship stays up.

The code was also changed from thread_add_event to thread_add_timer
in all cases.  I am not sure what would happen if a show command
comes in for a thread timer remaining with an event instead of a timer
just make it consistent.

This was chased down because the support bundle showed this:
r0# show ipv6 ospf6 vrf all interface
r0-r1-eth0 is up, type BROADCAST
  Interface ID: 6
  Internet Address:
    inet6: fe80::a4ea:d3ff:fe35:cef1/64
    inet6: fd00::1/64
  Instance ID 0, Interface MTU 1500 (autodetect: 1500)
  MTU mismatch detection: enabled
  Area ID 0.0.0.0, Cost 10
  State DR, Transmit Delay 1 sec, Priority 1
  Timer intervals configured:
   Hello 12(65480.960), Dead 48, Retransmit 5

And looking at the test code is doing stuff like this:
2022/05/16 17:08:15 OSPF6: [M7Q4P-46WDR] vty[5]@(config)# interface r1-r0-eth0

2022/05/16 17:08:15 OSPF6: [M7Q4P-46WDR] vty[5]@(config-if)# ipv6 ospf6 hello-interval 65535

2022/05/16 17:08:15 OSPF6: [M7Q4P-46WDR] vty[5]@(config-if)# no ipv6 ospf6 hello-interval
2022/05/16 17:08:16 OSPF6: [M7Q4P-46WDR] vty[5]@(config-if)# ipv6 ospf6 hello-interval 1
2022/05/16 17:08:16 OSPF6: [M7Q4P-46WDR] vty[5]@(config-if)# ipv6 ospf6 hello-interval 12

If the old timer value pops, the hello interval is set to 65k and never reset again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11152 from donaldsharp/dscp
Donatas Abraitis [Mon, 16 May 2022 19:53:41 +0000 (22:53 +0300)]
Merge pull request #11152 from donaldsharp/dscp

bgpd: Allow bgp to control the DSCP session TOS value

2 years agozebra: new netlink parse utility for rta 11205/head
Chirag Shah [Fri, 13 May 2022 05:29:37 +0000 (22:29 -0700)]
zebra: new netlink parse utility for rta

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agozebra: add protocol name to nexthop dump
Chirag Shah [Sun, 15 May 2022 05:13:57 +0000 (22:13 -0700)]
zebra: add protocol name to nexthop dump

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agoospf6d: Give time left in hello timer for `show ipv6 ospf6 int`
Donald Sharp [Mon, 16 May 2022 15:06:29 +0000 (11:06 -0400)]
ospf6d: Give time left in hello timer for `show ipv6 ospf6 int`

When running `show ipv6 ospf6 interface` the hello timer period
is shown, but there is no indication on how much time is left
on the timer.  Add a clue:

sharpd@eva ~/frr5 (master)> vtysh -c "show ipv6 ospf6 int"
enp39s0 is up, type BROADCAST
  Interface ID: 2
  Internet Address:
    inet : 192.168.119.224/24
    inet6: 2603:6080:602:509e:9a14:998:b154:9e9/64
  Instance ID 0, Interface MTU 1500 (autodetect: 1500)
  MTU mismatch detection: enabled
  Area ID 0.0.0.0, Cost 1000
  State DR, Transmit Delay 1 sec, Priority 1
  Timer intervals configured:
   Hello 10(2.652), Dead 40, Retransmit 5
  DR: 192.168.122.1 BDR: 0.0.0.0
  Number of I/F scoped LSAs is 1
    0 Pending LSAs for LSUpdate in Time 00:00:00 [thread off]
    0 Pending LSAs for LSAck in Time 00:00:00 [thread off]
  Authentication Trailer is disabled

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11207 from anlancs/fix/zebra-remove-check-l3vni
Donald Sharp [Mon, 16 May 2022 12:02:58 +0000 (08:02 -0400)]
Merge pull request #11207 from anlancs/fix/zebra-remove-check-l3vni

zebra: remove unncecessary check for l3vni

2 years agoMerge pull request #11199 from donaldsharp/nexthop_dump
Rafael Zalamena [Mon, 16 May 2022 11:09:54 +0000 (08:09 -0300)]
Merge pull request #11199 from donaldsharp/nexthop_dump

zebra: Add encap and group type decoding to nexthop dump

2 years agotests: Fix for test_pim_dr_nondr_with_ospf_topo2 test failure 11214/head
Kuldeep Kashyap [Mon, 16 May 2022 10:28:02 +0000 (03:28 -0700)]
tests: Fix for test_pim_dr_nondr_with_ospf_topo2 test failure

This test is failing intermittently because sometimes igmp
local join is not getting deleted. I did split the joins means
trying to delete igmp local joins one by one. I tried running
tests multiple times and it seems to be working fine with
current changes.

There was an issue found during debugging this test failure,
which was raised already:
Issue# https://github.com/FRRouting/frr/issues/11105

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agozebra: remove unncecessary check for l3vni 11207/head
anlan_cs [Thu, 12 May 2022 01:29:10 +0000 (21:29 -0400)]
zebra: remove unncecessary check for l3vni

Since `l3vni` created by `zl3vni_add()` is always valid, remove the check
for it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #11201 from donaldsharp/unused_in_netlink_compiles
Donatas Abraitis [Mon, 16 May 2022 06:57:30 +0000 (09:57 +0300)]
Merge pull request #11201 from donaldsharp/unused_in_netlink_compiles

Remove some unused functions in zebra

2 years agodoc: Add RFC8538 to our supported RFC list 11183/head
Donatas Abraitis [Sat, 14 May 2022 18:46:01 +0000 (21:46 +0300)]
doc: Add RFC8538 to our supported RFC list

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Activate Graceful-Restart when receiving CEASE/HOLDTIME notifications
Donatas Abraitis [Wed, 11 May 2022 16:42:53 +0000 (19:42 +0300)]
bgpd: Activate Graceful-Restart when receiving CEASE/HOLDTIME notifications

If we receive CEASE Notification or HOLDTIME notification, retain STALE
routes if it's not a CEASE/Hard Reset.

When doing `clear ip bgp PEER`, we can control if this would be CEASE/Hard Reset
or not by using `bgp hard-administrative-reset` knob.

When `bgp graceful-restart notification` is disabled, STALE routes won't be
retained when receiving Notification message.

Co-authored-by: Biswajit Sadhu <biswajit.sadhu@gmail.com>
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11180 from fdumontet6WIND/flag_pre_post
Donatas Abraitis [Sat, 14 May 2022 18:16:19 +0000 (21:16 +0300)]
Merge pull request #11180 from fdumontet6WIND/flag_pre_post

BMP fix invalid bmp POST POLICY flag

2 years agoMerge pull request #11135 from donaldsharp/bgp_rpki_no_forms
Donatas Abraitis [Sat, 14 May 2022 18:15:54 +0000 (21:15 +0300)]
Merge pull request #11135 from donaldsharp/bgp_rpki_no_forms

bgpd: Fix no form of rpki commands to take values

2 years agoMerge pull request #11149 from donaldsharp/update_group_debugging
Donatas Abraitis [Sat, 14 May 2022 18:15:03 +0000 (21:15 +0300)]
Merge pull request #11149 from donaldsharp/update_group_debugging

Update group debugging

2 years agoMerge pull request #11202 from anlancs/fix/check_zebra_vrf_get_evpn
Donald Sharp [Sat, 14 May 2022 13:53:42 +0000 (09:53 -0400)]
Merge pull request #11202 from anlancs/fix/check_zebra_vrf_get_evpn

zebra: remove unnecessary check for "zevpn_vrf"

2 years agozebra: remove unnecessary check for "zevpn_vrf" 11202/head
anlan_cs [Sat, 14 May 2022 01:02:11 +0000 (21:02 -0400)]
zebra: remove unnecessary check for "zevpn_vrf"

The global vrf in zebra is always non-NULL. In general, it is bound to
default vrf by `zebra_vrf_init()`, at other times bound to some specific
vrf. Anyway, non-NULL.

So remove all redundant checkings for the returned value of
`zebra_vrf_get_evpn()`.

Additionally, remove the unnecessary check for `zvrf` in
`zebra_vxlan_cleanup_tables()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agozebra: Remove unused function `route_entry_copy_nexthops` 11201/head
Donald Sharp [Fri, 13 May 2022 20:11:09 +0000 (16:11 -0400)]
zebra: Remove unused function `route_entry_copy_nexthops`

This function is no longer used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Remove unused functions in netlink compiles
Donald Sharp [Fri, 13 May 2022 19:58:33 +0000 (15:58 -0400)]
zebra: Remove unused functions in netlink compiles

When compiling with netlink,  Remove the usage of these
functions.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Allow bgp to control the DSCP session TOS value 11152/head
Pavel Shirshov [Thu, 5 May 2022 18:16:27 +0000 (14:16 -0400)]
bgpd: Allow bgp to control the DSCP session TOS value

Allow BGP to control the TOS DSCP value in the tcp header
via a new command at the bgp global level `bgp session-dscp <0-63>`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Pavel Shirhov <pavelsh@microsoft.com>
2 years agoMerge pull request #11198 from opensourcerouting/fix/show_ip_bgp_l2vpn_evpn_rd_neighb...
Donald Sharp [Fri, 13 May 2022 18:01:33 +0000 (14:01 -0400)]
Merge pull request #11198 from opensourcerouting/fix/show_ip_bgp_l2vpn_evpn_rd_neighbor_routes_unint

bgpd: Initialize prd for show_ip_bgp_l2vpn_evpn_rd_neighbor_routes()

2 years agoMerge pull request #11195 from anlancs/fix/lib-qsort
Donald Sharp [Fri, 13 May 2022 15:49:51 +0000 (11:49 -0400)]
Merge pull request #11195 from anlancs/fix/lib-qsort

lib: add one check in "list_sort()"

2 years agozebra: Add encap and group type decoding to nexthop dump 11199/head
Donald Sharp [Fri, 13 May 2022 14:25:13 +0000 (10:25 -0400)]
zebra: Add encap and group type decoding to nexthop dump

Add the ability to give data about the nexthop group type
and encap type so that it is human readable.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10958 from patrasar/pim_passive
Jafar Al-Gharaibeh [Fri, 13 May 2022 13:39:12 +0000 (08:39 -0500)]
Merge pull request #10958 from patrasar/pim_passive

pimd: introduce ip pim passive command

2 years agobgpd: Add a bit of debug to give us data about how an update group is formed 11149/head
Donald Sharp [Thu, 5 May 2022 15:21:20 +0000 (11:21 -0400)]
bgpd: Add a bit of debug to give us data about how an update group is formed

The creation of the update group is a tiny bit of a black box and is hard
to figure out by hand if it is correct.  Add a bit of code so that FRR
operators/developers can determine if the update group categorization
makes us happy.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Initialize prd for show_ip_bgp_l2vpn_evpn_rd_neighbor_routes() 11198/head
Donatas Abraitis [Fri, 13 May 2022 12:41:16 +0000 (15:41 +0300)]
bgpd: Initialize prd for show_ip_bgp_l2vpn_evpn_rd_neighbor_routes()

*** CID 1517751:  Uninitialized variables  (UNINIT)
/bgpd/bgp_evpn_vty.c: 1648 in show_ip_bgp_l2vpn_evpn_rd_neighbor_routes()
1642
1643
1644            if (rd_all)
1645                    return bgp_show_ethernet_vpn(vty, NULL, bgp_show_type_neighbor,
1646                                                 peer, SHOW_DISPLAY_STANDARD, uj);
1647            else
>>>     CID 1517751:  Uninitialized variables  (UNINIT)
>>>     Using uninitialized element of array "prd.val" when calling "bgp_show_ethernet_vpn".
1648                    return bgp_show_ethernet_vpn(vty, &prd, bgp_show_type_neighbor,
1649                                                 peer, SHOW_DISPLAY_STANDARD, uj);
1650     }
1651
1652     DEFUN(show_ip_bgp_l2vpn_evpn_neighbor_advertised_routes,
1653           show_ip_bgp_l2vpn_evpn_neighbor_advertised_routes_cmd,

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Make bgp_debug.[ch] take `const struct peer *` and return bool
Donald Sharp [Thu, 5 May 2022 15:31:33 +0000 (11:31 -0400)]
bgpd: Make bgp_debug.[ch] take `const struct peer *` and return bool

Several functions in bgp_debug.[ch] take a const struct peer *
and also return a bool instead of an int.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11197 from opensourcerouting/feature/gr_notification_docs
Donald Sharp [Fri, 13 May 2022 12:36:41 +0000 (08:36 -0400)]
Merge pull request #11197 from opensourcerouting/feature/gr_notification_docs

doc: Add some more documentation about Notification support for GR

2 years agobgpd: Fix no form of rpki commands to take values 11135/head
Donald Sharp [Mon, 2 May 2022 16:36:22 +0000 (12:36 -0400)]
bgpd: Fix no form of rpki commands to take values

Fix the no forms of some rpki commands to take variable
values on the no form.  So that people cut-n-pasting while
adding a no works.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11194 from donaldsharp/untrusted
Donatas Abraitis [Fri, 13 May 2022 11:43:11 +0000 (14:43 +0300)]
Merge pull request #11194 from donaldsharp/untrusted

Some more Coverity issues solved

2 years agoMerge pull request #11177 from opensourcerouting/fix/memset_memcpy
Donald Sharp [Fri, 13 May 2022 11:40:58 +0000 (07:40 -0400)]
Merge pull request #11177 from opensourcerouting/fix/memset_memcpy

*: memcpy/memset zeroing

2 years agoMerge pull request #11188 from opensourcerouting/fix/argv_find
Donald Sharp [Fri, 13 May 2022 11:35:57 +0000 (07:35 -0400)]
Merge pull request #11188 from opensourcerouting/fix/argv_find

bgpd: Cleanup

2 years agoMerge pull request #9454 from anlancs/fix-ospf6-gr-length
Igor Ryzhov [Fri, 13 May 2022 11:25:06 +0000 (14:25 +0300)]
Merge pull request #9454 from anlancs/fix-ospf6-gr-length

ospf6d: suppress coverity warnings of insecure data handling

2 years agozebra: Add startup message and display netlink buffer size. 11192/head
Loganaden Velvindron [Thu, 12 May 2022 14:04:17 +0000 (18:04 +0400)]
zebra: Add startup message and display netlink buffer size.

Add startup message and display netlink buffer size.

Signed-off-by: Loganaden Velvindron <logan@cyberstorm.mu>
2 years agodoc: Add some more documentation about Notification support for GR 11197/head
Donatas Abraitis [Fri, 13 May 2022 09:45:25 +0000 (12:45 +0300)]
doc: Add some more documentation about Notification support for GR

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: Inroduced pim passive test cases 10958/head
sarita patra [Mon, 9 May 2022 11:03:52 +0000 (04:03 -0700)]
tests: Inroduced pim passive test cases

Co-authored-by: Vijay Kumar Gupta <vijayg@vmware.com>
Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Northbound support for pim passive enable
sarita patra [Wed, 4 May 2022 13:05:43 +0000 (06:05 -0700)]
pimd: Northbound support for pim passive enable

Added nothbound callbacks for pim-passive-enable

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving BSM on passive interface
sarita patra [Thu, 7 Apr 2022 07:09:01 +0000 (00:09 -0700)]
pimd: Disable receiving BSM on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving assert msg on passive interface
sarita patra [Thu, 7 Apr 2022 07:07:53 +0000 (00:07 -0700)]
pimd: Disable receiving assert msg on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving join/prune on passive interface
sarita patra [Thu, 7 Apr 2022 07:06:39 +0000 (00:06 -0700)]
pimd: Disable receiving join/prune on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving register-stop on passive interface
sarita patra [Thu, 7 Apr 2022 07:05:36 +0000 (00:05 -0700)]
pimd: Disable receiving register-stop on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving register msg on passive interface
sarita patra [Thu, 7 Apr 2022 07:04:21 +0000 (00:04 -0700)]
pimd: Disable receiving register msg on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable receiving hello on passive interface
sarita patra [Thu, 7 Apr 2022 07:02:52 +0000 (00:02 -0700)]
pimd: Disable receiving hello on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Handling hello send statistics for passive interface
sarita patra [Mon, 4 Apr 2022 11:14:54 +0000 (04:14 -0700)]
pimd: Handling hello send statistics for passive interface

Increment pim_ifstat_hello_sent only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Handling reg and reg_stop send statistics for passive interface
sarita patra [Mon, 4 Apr 2022 11:13:07 +0000 (04:13 -0700)]
pimd: Handling reg and reg_stop send statistics for passive interface

Increment pim_ifstat_reg_stop_send & pim_ifstat_reg_send when
interface is passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Handling Join/Prune statistics for passive interface
sarita patra [Mon, 4 Apr 2022 11:11:38 +0000 (04:11 -0700)]
pimd: Handling Join/Prune statistics for passive interface

Increment pim_ifstat_prune_send only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Handling BSM send statistics for passive interface
sarita patra [Mon, 4 Apr 2022 11:10:33 +0000 (04:10 -0700)]
pimd: Handling BSM send statistics for passive interface

Increment pim_ifstat_bsm_tx only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Handling assert send statistics for passive interface
sarita patra [Mon, 4 Apr 2022 11:08:42 +0000 (04:08 -0700)]
pimd: Handling assert send statistics for passive interface

Increment pim_ifstat_assert_send only when interface is
passive disabled.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agodoc: add ip[v6] pim passive support
sarita patra [Mon, 4 Apr 2022 11:16:10 +0000 (04:16 -0700)]
doc: add ip[v6] pim passive support

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: display passive in show ip pim interface cmd
sarita patra [Thu, 7 Apr 2022 07:43:20 +0000 (00:43 -0700)]
pimd: display passive in show ip pim interface cmd

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: show ip[v6] pim passive in show running config
sarita patra [Mon, 4 Apr 2022 11:37:18 +0000 (04:37 -0700)]
pimd: show ip[v6] pim passive in show running config

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: Disable sending of control packets on passive interface
sarita patra [Mon, 4 Apr 2022 11:37:56 +0000 (04:37 -0700)]
pimd: Disable sending of control packets on passive interface

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: introduced flags for pim_passive_enable
sarita patra [Thu, 7 Apr 2022 12:34:07 +0000 (05:34 -0700)]
pimd: introduced flags for pim_passive_enable

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopim6d: introduce ipv6 pim passive command
sarita patra [Mon, 4 Apr 2022 11:01:45 +0000 (04:01 -0700)]
pim6d: introduce ipv6 pim passive command

Added a new cli command "ip pim passive" in the interface context,
to disable sending of pim control packets on the interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agopimd: introduce ip pim passive command
sarita patra [Thu, 7 Apr 2022 07:41:14 +0000 (00:41 -0700)]
pimd: introduce ip pim passive command

Added a new cli command "ip pim passive" in the interface context,
to disable sending of pim control packets on the interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agoMerge pull request #11190 from donaldsharp/bgp_data
Donatas Abraitis [Fri, 13 May 2022 06:00:08 +0000 (09:00 +0300)]
Merge pull request #11190 from donaldsharp/bgp_data

Fix #11178 and various other cleanup

2 years agolib: add one check in "list_sort()" 11195/head
anlan_cs [Fri, 13 May 2022 02:14:11 +0000 (22:14 -0400)]
lib: add one check in "list_sort()"

Add one check in `list_sort()`:
Immediatly return if no any items in this list.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agobfdd: Prevent coverity from thinking values are uninited 11194/head
Donald Sharp [Thu, 12 May 2022 20:58:29 +0000 (16:58 -0400)]
bfdd: Prevent coverity from thinking values are uninited

Coverity is claiming that bfdd is able got have bglobal.bg_use_dplane
can be true, while dplane_addr can be uninitialized.  Not really
possible since global variables are initialized to all 0's.  In
any event.  Force it to think it can't go there.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Assign large enough data structure for coverity to be happy
Donald Sharp [Thu, 12 May 2022 20:47:05 +0000 (16:47 -0400)]
bgpd: Assign large enough data structure for coverity to be happy

When implementing the bgp_packet_mpunreach_prefix a uint8_t array
of 3 bytes was created and then assigned to a label type, which
is 4 bytes and then various pointer work is done on it.  Eventually
coverity is complaining that the 3 -vs- 4 bytes is not enough
to properly dereference it.  Just make the uint8_t 4 bytes
and be done with it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobabeld: Check that bodylen is within some bounds of usable
Donald Sharp [Thu, 12 May 2022 17:23:36 +0000 (13:23 -0400)]
babeld: Check that bodylen is within some bounds of usable

Coverity believed that the bodylen value was read directly
from the incoming packet and then used as a loop variable.
Unfortunately it missed the fact that in babel_packet_examin
the bodylen was actually checked to ensure that it was long
enough.  So instead of checking it 2 times, generate it one
time and let coverity figure it out from that.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_dump.h to our standards 11190/head
Donald Sharp [Thu, 12 May 2022 13:18:38 +0000 (09:18 -0400)]
bgpd: Align bgp_dump.h to our standards

bgp_dump.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_debug.h to our standards
Donald Sharp [Thu, 12 May 2022 13:17:07 +0000 (09:17 -0400)]
bgpd: Align bgp_debug.h to our standards

bgp_debug.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_damp.h to our standards
Donald Sharp [Thu, 12 May 2022 13:13:40 +0000 (09:13 -0400)]
bgpd: Align bgp_damp.h to our standards

bgp_damp.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_community.h to our standards
Donald Sharp [Thu, 12 May 2022 13:11:07 +0000 (09:11 -0400)]
bgpd: Align bgp_community.h to our standards

bgp_community.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_clist.h to our standards
Donald Sharp [Thu, 12 May 2022 13:08:12 +0000 (09:08 -0400)]
bgpd: Align bgp_clist.h to our standards

bgp_clist.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_attr.h to our standards
Donald Sharp [Thu, 12 May 2022 13:03:49 +0000 (09:03 -0400)]
bgpd: Align bgp_attr.h to our standards

bgp_attr.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_aspath.h to our standards
Donald Sharp [Thu, 12 May 2022 13:00:46 +0000 (09:00 -0400)]
bgpd: Align bgp_aspath.h to our standards

bgp_aspath.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_advertise.h to our standards
Donald Sharp [Thu, 12 May 2022 12:53:01 +0000 (08:53 -0400)]
bgpd: Align bgp_advertise.h to our standards

bgp_advertise.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_zebra.h to our standards
Donald Sharp [Thu, 12 May 2022 12:28:11 +0000 (08:28 -0400)]
bgpd: Align bgp_zebra.h to our standards

bgp_zebra.h has function declarations that are
not properly aligned with our standard on how
to do so.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Align bgp_mpath.h to our standards
Donald Sharp [Thu, 12 May 2022 12:11:46 +0000 (08:11 -0400)]
bgpd: Align bgp_mpath.h to our standards

The bgp_mpath.h file was missing some variable names.  Let's
add them in to align with our standard for header files.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Change single value bitfield to a bool
Donald Sharp [Thu, 12 May 2022 12:06:14 +0000 (08:06 -0400)]
bgpd: Change single value bitfield to a bool

The maxpaths same_clusterlen value was a uint16_t
with a single bit being used.  No other values are
being stored.  Let's remove the bitfield and simplify
to a bool.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Prevent crash when issuing various forms of `bgp no-rib`
Donald Sharp [Thu, 12 May 2022 13:39:27 +0000 (09:39 -0400)]
bgpd: Prevent crash when issuing various forms of `bgp no-rib`

The `bgp no-rib` command cycles through all the bgp rib tables
and removes them from zebra.  Modify the code so that FRR notices
that it is attempting to cycle through the safi's that are two level
tables.  In addition these safi's cannot just blindly remove the routes
from the rib as that there are none explicitly.

This code just prevents the crash in bgpd.  It does not properly cycle
through and remove the zebra changes made that are explicit to these afi's.
This should be handled as appropriate by the developers on these safi's when
it becomes important to them.

Fixes: #11178
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11176 from anlancs/fix/bgpd-remove-for-type2-prefix
Donatas Abraitis [Thu, 12 May 2022 10:28:51 +0000 (13:28 +0300)]
Merge pull request #11176 from anlancs/fix/bgpd-remove-for-type2-prefix

bgpd: remove unncessary check for evpn

2 years agoMerge pull request #11186 from anlancs/fix/bgpd-comment-should-es
Donatas Abraitis [Thu, 12 May 2022 08:32:25 +0000 (11:32 +0300)]
Merge pull request #11186 from anlancs/fix/bgpd-comment-should-es

bgpd,zebra: correct one debug log for evpn-mh

2 years agobgpd: Check and validate return value for str2ipaddr() 11188/head
Donatas Abraitis [Thu, 12 May 2022 07:28:06 +0000 (10:28 +0300)]
bgpd: Check and validate return value for str2ipaddr()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Check argv_find() value instead of the index
Donatas Abraitis [Thu, 12 May 2022 07:23:28 +0000 (10:23 +0300)]
bgpd: Check argv_find() value instead of the index

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotools: Catch more argv_find() when not checked properly
Donatas Abraitis [Thu, 12 May 2022 07:09:42 +0000 (10:09 +0300)]
tools: Catch more argv_find() when not checked properly

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Reuse index from argv_find only if found
Donatas Abraitis [Thu, 12 May 2022 06:57:13 +0000 (09:57 +0300)]
bgpd: Reuse index from argv_find only if found

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd,zebra: correct one debug log for evpn-mh 11186/head
anlan_cs [Thu, 12 May 2022 01:25:47 +0000 (21:25 -0400)]
bgpd,zebra: correct one debug log for evpn-mh

Correct one debug log in evpn-mh.
BTW, correct one misspelled word in comment.

Signed-off-by: anlan_cs <vic.lan@pica8.com>