]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoMerge pull request #10882 from opensourcerouting/pim6-txrx
mobash-rasool [Tue, 29 Mar 2022 13:00:10 +0000 (18:30 +0530)]
Merge pull request #10882 from opensourcerouting/pim6-txrx

pim6d: send IPv6 PIM packets

3 years agoMerge pull request #10158 from ckishimo/ospf6d_norefresh
Russ White [Tue, 29 Mar 2022 12:36:05 +0000 (08:36 -0400)]
Merge pull request #10158 from ckishimo/ospf6d_norefresh

ospf6d: stop refreshing type-5 from NSSA

3 years agoMerge pull request #10904 from mobash-rasool/fixes
Donatas Abraitis [Tue, 29 Mar 2022 05:53:44 +0000 (08:53 +0300)]
Merge pull request #10904 from mobash-rasool/fixes

pim6d: Correct the show ip prefix-list display for pim6d

3 years agoospf6d: fix topotest
ckishimo [Wed, 5 Jan 2022 22:46:24 +0000 (23:46 +0100)]
ospf6d: fix topotest

The routes in the test_nssa_range() are E2

  "routes":{
    "2001:db8:1000::2/128":{
      "destinationType":"Network",
      "installedTimeSince":"00:06:29",
      "changedTimeSince":"00:06:29",
      "numberOfLock":2,
      "flags":"BA--",
      "associatedArea":"0.0.0.2",
      "pathType":"External-2",
      "lsOriginRoutePathType":"NSSA",
      "lsId":"0.0.0.3",
      "lsAdvertisingRouter":"10.254.254.4",
      "options":"--|-|-|--|-|--",
      "routerBits":"--------",
      "prefixOptions":"--|P|--|--|--",
      "metricType":2,
      "metricCost":10,
      "metricCostE2":20,
      "pathsCount":1,
      "nextHopCount":1,
      "nextHops":[
        {
          "nextHop":"::",
          "interfaceName":"r2-eth2"
        }
      ]
    }

This PR fixes the key from `metricCost` to `metricCostE2`

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospf6d: fix NSSA area-range command
ckishimo [Wed, 5 Jan 2022 19:27:55 +0000 (20:27 +0100)]
ospf6d: fix NSSA area-range command

When an area-range command is applied in an ABR, the more specific prefixes
need to be removed.

r2# sh ipv6 ospf database

        AS Scoped Link State Database

Type LSId           AdvRouter       Age   SeqNum                        Payload
ASE  0.0.0.1        10.254.254.2     53 80000001                             ::
ASE  0.0.0.2        10.254.254.2     51 80000001                2001:db8:1::/64
ASE  0.0.0.3        10.254.254.2     51 80000001                2001:db8:3::/64
ASE  0.0.0.4        10.254.254.2     51 80000001                2001:db8:2::/64
ASE  0.0.0.5        10.254.254.2     46 80000001                2001:db8:1::/64
ASE  0.0.0.6        10.254.254.2     46 80000001                2001:db8:3::/64
ASE  0.0.0.7        10.254.254.2     46 80000001                2001:db8:2::/64
ASE  0.0.0.8        10.254.254.2     41 80000001                2001:db8:3::/64
ASE  0.0.0.9        10.254.254.2     41 80000001           2001:db8:1000::1/128  <-- **
ASE  0.0.0.10       10.254.254.2     41 80000001           2001:db8:1000::2/128  <-- **
ASE  0.0.0.12       10.254.254.2     24 80000001             2001:db8:1000::/64
ASE  0.0.0.1        10.254.254.3     52 80000001                2001:db8:2::/64

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agopim6d: box out IPv4 fragmentation code
David Lamparter [Mon, 28 Mar 2022 15:57:50 +0000 (17:57 +0200)]
pim6d: box out IPv4 fragmentation code

... this shouldn't run for IPv6.  (We'll switch to not using
IPV6_HDRINCL later, so the kernel will handle it, but for the time being
let's just stop trying to use the IPv4 code for IPv6.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10878 from ton31337/fix/bgp_crash_vrf_all_all
Donald Sharp [Mon, 28 Mar 2022 12:27:19 +0000 (08:27 -0400)]
Merge pull request #10878 from ton31337/fix/bgp_crash_vrf_all_all

bgpd: Fix crash for `show ip bgp vrf all all`

3 years agoMerge pull request #10897 from opensourcerouting/safi-nht
Donald Sharp [Mon, 28 Mar 2022 12:23:36 +0000 (08:23 -0400)]
Merge pull request #10897 from opensourcerouting/safi-nht

zebra,staticd,*: SAFI_MULTICAST NHT groundwork

3 years agopim6d: include IPv6 pseudoheader in RX checksums
David Lamparter [Sun, 27 Mar 2022 10:04:39 +0000 (12:04 +0200)]
pim6d: include IPv6 pseudoheader in RX checksums

A lot simpler than the TX code.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: include IPv6 pseudoheader in TX checksums
David Lamparter [Sun, 27 Mar 2022 09:50:40 +0000 (11:50 +0200)]
pim6d: include IPv6 pseudoheader in TX checksums

Lots of passing src/dst around, but it is what it is.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: reenable socket functions
David Lamparter [Sat, 12 Mar 2022 21:08:35 +0000 (22:08 +0100)]
pim6d: reenable socket functions

pim_sock_*() functions are adapted for IPv6 now, reenable calling them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: send PIM packets
David Lamparter [Sat, 12 Mar 2022 21:43:05 +0000 (22:43 +0100)]
pim6d: send PIM packets

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10661 from plsaranya/pim6_msg
David Lamparter [Mon, 28 Mar 2022 12:04:44 +0000 (14:04 +0200)]
Merge pull request #10661 from plsaranya/pim6_msg

3 years agopim6d: Correct the show ip prefix-list display for pim6d
Mobashshera Rasool [Mon, 28 Mar 2022 06:58:48 +0000 (23:58 -0700)]
pim6d: Correct the show ip prefix-list display for pim6d

Currently the PIM6d component is getting displayed under
"show ip prefix-list" instead of "show ipv6 prefix-list".
Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10905 from opensourcerouting/fix/BGP_PREFIX_SID_SRV6_L3_SERVICE_S...
mobash-rasool [Mon, 28 Mar 2022 10:22:30 +0000 (15:52 +0530)]
Merge pull request #10905 from opensourcerouting/fix/BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_STRUCTURE_LENGTH

bgpd: Fix mixed print types for BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_ST…

3 years agobgpd: Fix mixed print types for BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_STRUCTURE_LENGTH
Donatas Abraitis [Mon, 28 Mar 2022 08:08:33 +0000 (11:08 +0300)]
bgpd: Fix mixed print types for BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_STRUCTURE_LENGTH

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10366 from AbhishekNR/mld_cli
David Lamparter [Mon, 28 Mar 2022 07:18:36 +0000 (09:18 +0200)]
Merge pull request #10366 from AbhishekNR/mld_cli

3 years agoMerge pull request #10883 from donaldsharp/bgp_evpn_stream_read
Donatas Abraitis [Mon, 28 Mar 2022 06:04:55 +0000 (09:04 +0300)]
Merge pull request #10883 from donaldsharp/bgp_evpn_stream_read

bgpd: Fix possible insufficient stream data

3 years agoMerge pull request #10887 from donaldsharp/dump_it
Donatas Abraitis [Mon, 28 Mar 2022 06:02:24 +0000 (09:02 +0300)]
Merge pull request #10887 from donaldsharp/dump_it

zebra: Note when the netlink DUMP command is interrupted

3 years agopim6d: fix string constant size
David Lamparter [Sun, 27 Mar 2022 14:18:59 +0000 (16:18 +0200)]
pim6d: fix string constant size

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: track nexthops per-SAFI
David Lamparter [Mon, 4 Oct 2021 11:05:18 +0000 (13:05 +0200)]
staticd: track nexthops per-SAFI

This stops intermixing SAFI_UNICAST NHT into SAFI_MULTICAST static
routes.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: use inline prefix in NHT data
David Lamparter [Mon, 4 Oct 2021 10:54:57 +0000 (12:54 +0200)]
staticd: use inline prefix in NHT data

No need to waste malloc overhead on this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agostaticd: use typesafe static_nht_hash
David Lamparter [Mon, 4 Oct 2021 10:52:05 +0000 (12:52 +0200)]
staticd: use typesafe static_nht_hash

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: add a few `const` in RNH code
David Lamparter [Fri, 11 Mar 2022 11:47:46 +0000 (12:47 +0100)]
zebra: add a few `const` in RNH code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years ago*: add SAFI argument to zclient_send_rnh
David Lamparter [Mon, 4 Oct 2021 10:21:45 +0000 (12:21 +0200)]
*: add SAFI argument to zclient_send_rnh

Just pushing that SAFI_UNICAST up 1 level to the caller.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: `show ip nht mrib`
David Lamparter [Thu, 21 Oct 2021 13:17:41 +0000 (15:17 +0200)]
zebra: `show ip nht mrib`

Prints the SAFI_MULTICAST NHT state in zebra.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: register NHT nexthops with proper SAFI
David Lamparter [Thu, 21 Oct 2021 13:16:21 +0000 (15:16 +0200)]
zebra: register NHT nexthops with proper SAFI

Just a small puzzle piece missing in zebra SAFI NHT support.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: check other SAFIs when removing gone client
David Lamparter [Thu, 21 Oct 2021 13:17:12 +0000 (15:17 +0200)]
zebra: check other SAFIs when removing gone client

When a client disconnects, we need to check & remove NHT entries for
other SAFIs too.  Otherwise we crash later trying to access stale data.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10889 from anlancs/bgpd-cleanup-4
Donald Sharp [Sun, 27 Mar 2022 12:15:15 +0000 (08:15 -0400)]
Merge pull request #10889 from anlancs/bgpd-cleanup-4

bgpd: remove dead code for evpn

3 years agoMerge pull request #10891 from opensourcerouting/feature/autocomplate_for_bmptagets
Donald Sharp [Sun, 27 Mar 2022 11:29:21 +0000 (07:29 -0400)]
Merge pull request #10891 from opensourcerouting/feature/autocomplate_for_bmptagets

bgpd: Add autocomplete for BMP targets

3 years agoMerge pull request #10894 from donaldsharp/babel_down_up
David Lamparter [Sun, 27 Mar 2022 08:56:31 +0000 (10:56 +0200)]
Merge pull request #10894 from donaldsharp/babel_down_up

3 years agoMerge pull request #10892 from donaldsharp/seconds
David Lamparter [Sun, 27 Mar 2022 08:51:38 +0000 (10:51 +0200)]
Merge pull request #10892 from donaldsharp/seconds

3 years agobabeld: Rehook up interface up events
Donald Sharp [Sun, 27 Mar 2022 00:46:36 +0000 (20:46 -0400)]
babeld: Rehook up interface up events

When babeld was switched over to the zapi
interface up/down callbacks the interface up
event was not properly put back in.

Fixes: #10893
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Ensure order of operations is expected with SECONDS
Donald Sharp [Sat, 26 Mar 2022 20:20:53 +0000 (16:20 -0400)]
lib: Ensure order of operations is expected with SECONDS

These 3 values:
ONE_DAY_SECOND
ONE_WEEK_SECOND
ONE_YEAR_SECOND

Are defined based upon the number of seconds.  Unfortunately doing math
on these values say something like:

days = t->tv_sec / ONE_DAY_SECOND;

Once you go over about a day causes the order of operations to cause the multiplication
to get messed up:

204 if (!t)
(gdb) n
207 w = d = h = m = ms = 0;
(gdb) set t->tv_sec = ONE_DAY_SECOND + 30
(gdb) n
208 memset(buf, 0, size);
(gdb)
210 us = t->tv_usec;
(gdb)
211 if (us >= 1000) {
(gdb)
212 ms = us / 1000;
(gdb)
213 us %= 1000;
(gdb)
217 if (ms >= 1000) {
(gdb)
222 if (t->tv_sec > ONE_WEEK_SECOND) {
(gdb)
227 if (t->tv_sec > ONE_DAY_SECOND) {
(gdb)
228 d = t->tv_sec / ONE_DAY_SECOND;
(gdb) n
229 t->tv_sec -= d * ONE_DAY_SECOND;
(gdb) n
232 if (t->tv_sec >= HOUR_IN_SECONDS) {
(gdb) p d
$6 = 2073600
(gdb) p t->tv_sec
$7 = -179158953570
(gdb)

Converting to adding paranthesis around around the ONE_DAY_SECOND causes
the order of operations to work as expected.

Fixes: #10880
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: Add autocomplete for BMP targets
Donatas Abraitis [Sat, 26 Mar 2022 16:37:14 +0000 (18:37 +0200)]
bgpd: Add autocomplete for BMP targets

```
spine1-debian-11(config-router)# bmp targets ?
  BMPTARGETS  Name of the BMP target group
     ok test1
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: remove dead code for evpn
anlan_cs [Sat, 26 Mar 2022 11:32:13 +0000 (19:32 +0800)]
bgpd: remove dead code for evpn

`is_vni_param_configured()` is used to check whether RD/RT
configured for specific evpn vni.

There seems to be no need for this mixed check. No caller for
about 5 years, just remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agozebra: Note when the netlink DUMP command is interrupted
Donald Sharp [Fri, 25 Mar 2022 23:08:14 +0000 (19:08 -0400)]
zebra: Note when the netlink DUMP command is interrupted

There exists code paths in the linux kernel where a dump command
will be interrupted( I am not sure I understand what this really
means ) and the data sent back from the kernel is wrong or incomplete.

At this point in time I am not 100% certain what should be done, but
let's start noticing that this has happened so we can formulate a plan
or allow the end operator to know bad stuff is a foot at the circle K.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10677 from mobash-rasool/pimv6-receive-pkt
Donald Sharp [Fri, 25 Mar 2022 18:09:20 +0000 (14:09 -0400)]
Merge pull request #10677 from mobash-rasool/pimv6-receive-pkt

pim6d: Handling of receiving of PIMv6 packets

3 years agoMerge pull request #10861 from opensourcerouting/fix/replace_strings_to_tr
Donald Sharp [Fri, 25 Mar 2022 14:10:24 +0000 (10:10 -0400)]
Merge pull request #10861 from opensourcerouting/fix/replace_strings_to_tr

tools: Replace `strings` to `tr` for frrinit.sh

3 years agoMerge pull request #10862 from anlancs/zebra-mh-svi-add
Donald Sharp [Fri, 25 Mar 2022 14:09:59 +0000 (10:09 -0400)]
Merge pull request #10862 from anlancs/zebra-mh-svi-add

zebra: optimization on the mac addition for evpn-mh

3 years agoMerge pull request #10881 from opensourcerouting/pim6-ssmpingd-formats
Donald Sharp [Fri, 25 Mar 2022 14:06:42 +0000 (10:06 -0400)]
Merge pull request #10881 from opensourcerouting/pim6-ssmpingd-formats

pim6d: fix format string mistakes in ssmpingd

3 years agoMerge pull request #10879 from ton31337/fix/bgp_crash_vrf_all_neighbor_advertise
Donald Sharp [Fri, 25 Mar 2022 13:58:08 +0000 (09:58 -0400)]
Merge pull request #10879 from ton31337/fix/bgp_crash_vrf_all_neighbor_advertise

bgpd: Fix crash for `show ip bgp vrf all all neighbors 192.168.0.1 ...`

3 years agobgpd: Fix possible insufficient stream data
Donald Sharp [Fri, 25 Mar 2022 11:44:55 +0000 (07:44 -0400)]
bgpd: Fix possible insufficient stream data

When reading the BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_STRUCTURE
it is possible that the length read in the packet is insufficiently
large enough to read a BGP_PREFIX_SID_SRV6_L3_SERVICE_SID_STRUCTURE.
Let's ensure that it is.

Fixes: #10860
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopim6d: IPv6 headers are always stripped on receive
David Lamparter [Fri, 25 Mar 2022 10:30:13 +0000 (11:30 +0100)]
pim6d: IPv6 headers are always stripped on receive

IPV6_HDRINCL is a TX-only option (unlike IP_HDRINCL), so on RX there
never are IPv6 headers to be looked at / skipped over.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: Adjust pim_pkt_dst_addr_ok for PIMv6
Mobashshera Rasool [Mon, 28 Feb 2022 16:21:48 +0000 (08:21 -0800)]
pim6d: Adjust pim_pkt_dst_addr_ok for PIMv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agopimd: Modify pim_pim_packet api for receiving v6 packets
Mobashshera Rasool [Mon, 28 Feb 2022 06:58:15 +0000 (22:58 -0800)]
pimd: Modify pim_pim_packet api for receiving v6 packets

Modified the pim_pim_packet api for pimv4/v6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agopim6d: Parse BSM packet for PIMv6
Mobashshera Rasool [Mon, 28 Feb 2022 07:06:18 +0000 (23:06 -0800)]
pim6d: Parse BSM packet for PIMv6

Modify pim_bsm_process to accomodate v4 and v6 address
for parsing the received packet.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agopim6d: fix format string mistakes in ssmpingd
David Lamparter [Fri, 25 Mar 2022 10:35:32 +0000 (11:35 +0100)]
pim6d: fix format string mistakes in ssmpingd

PR #10653 forgot to update a bunch of format specifiers.  Fix.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobgpd: Fix crash for `show ip bgp vrf all all neighbors 192.168.0.1 ...`
Donatas Abraitis [Fri, 25 Mar 2022 09:53:47 +0000 (11:53 +0200)]
bgpd: Fix crash for `show ip bgp vrf all all neighbors 192.168.0.1 ...`

When `all` is specified BGP pointer is always NULL, we need to iterate over
all instances separately.

```
Received signal 11 at 1648199394 (si_addr 0x30, PC 0x562e96597090); aborting...
 /usr/local/lib/libfrr.so.0(zlog_backtrace_sigsafe+0x5e) [0x7f378a57ff6e]
 /usr/local/lib/libfrr.so.0(zlog_signal+0xe6) [0x7f378a580146]
 /usr/local/lib/libfrr.so.0(+0xcd4c2) [0x7f378a5aa4c2]
 /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7f378a33e140]
 /usr/lib/frr/bgpd(bgp_afi_safi_peer_exists+0) [0x562e96597090]
 /usr/lib/frr/bgpd(+0x15c3b8) [0x562e9654a3b8]
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Fix crash for `show ip bgp vrf all all`
Donatas Abraitis [Fri, 25 Mar 2022 09:35:39 +0000 (11:35 +0200)]
bgpd: Fix crash for `show ip bgp vrf all all`

When `all` is specified BGP pointer is always NULL, we need to iterate over
all instances separately.

```
BGP[170822]: Received signal 11 at 1648199394 (si_addr 0x30, PC 0x562e96597090); aborting...
BGP[170822]: /usr/local/lib/libfrr.so.0(zlog_backtrace_sigsafe+0x5e) [0x7f378a57ff6e]
BGP[170822]: /usr/local/lib/libfrr.so.0(zlog_signal+0xe6) [0x7f378a580146]
BGP[170822]: /usr/local/lib/libfrr.so.0(+0xcd4c2) [0x7f378a5aa4c2]
BGP[170822]: /lib/x86_64-linux-gnu/libpthread.so.0(+0x14140) [0x7f378a33e140]
BGP[170822]: /usr/lib/frr/bgpd(bgp_afi_safi_peer_exists+0) [0x562e96597090]
BGP[170822]: /usr/lib/frr/bgpd(+0x15c3b8) [0x562e9654a3b8]
BGP[170822]: /usr/local/lib/libfrr.so.0(+0x75a9e) [0x7f378a552a9e]
BGP[170822]: /usr/local/lib/libfrr.so.0(cmd_execute_command+0x5d) [0x7f378a552e2d]
BGP[170822]: /usr/local/lib/libfrr.so.0(cmd_execute+0xc0) [0x7f378a553070]
BGP[170822]: /usr/local/lib/libfrr.so.0(+0xe3697) [0x7f378a5c0697]
BGP[170822]: /usr/local/lib/libfrr.so.0(+0xe3db1) [0x7f378a5c0db1]
BGP[170822]: /usr/local/lib/libfrr.so.0(+0xe6c30) [0x7f378a5c3c30]
BGP[170822]: /usr/local/lib/libfrr.so.0(thread_call+0x73) [0x7f378a5bb743]
BGP[170822]: /usr/local/lib/libfrr.so.0(frr_run+0xd0) [0x7f378a578750]
BGP[170822]: /usr/lib/frr/bgpd(main+0x344) [0x562e964cf3f4]
BGP[170822]: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xea) [0x7f378a18bd0a]
BGP[170822]: /usr/lib/frr/bgpd(_start+0x2a) [0x562e964d10ea]
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10867 from donaldsharp/ifp_use_after_free
David Lamparter [Fri, 25 Mar 2022 05:55:37 +0000 (06:55 +0100)]
Merge pull request #10867 from donaldsharp/ifp_use_after_free

3 years agoMerge pull request #10868 from donaldsharp/zlog_backtrace_uninited
David Lamparter [Fri, 25 Mar 2022 05:25:39 +0000 (06:25 +0100)]
Merge pull request #10868 from donaldsharp/zlog_backtrace_uninited

3 years agoMerge pull request #10852 from mjstapp/fix_lib_distclean
David Lamparter [Fri, 25 Mar 2022 05:03:10 +0000 (06:03 +0100)]
Merge pull request #10852 from mjstapp/fix_lib_distclean

3 years agoMerge pull request #10865 from donaldsharp/freebsd_terminal_monitor
David Lamparter [Fri, 25 Mar 2022 03:22:04 +0000 (04:22 +0100)]
Merge pull request #10865 from donaldsharp/freebsd_terminal_monitor

3 years agoMerge pull request #10866 from donaldsharp/freebsd_unknown_type2str
David Lamparter [Fri, 25 Mar 2022 03:20:19 +0000 (04:20 +0100)]
Merge pull request #10866 from donaldsharp/freebsd_unknown_type2str

3 years agozebra: Fix use after deletion event in freebsd
Donald Sharp [Fri, 25 Mar 2022 00:02:33 +0000 (20:02 -0400)]
zebra: Fix use after deletion event in freebsd

In the FreeBSD code if you delete the interface
and it has no configuration, the ifp pointer will
be deleted from the system *but* zebra continues
to dereference the just freed pointer.

==58624== Invalid read of size 1
==58624==    at 0x48539F3: strlcpy (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==58624==    by 0x2B0565: ifreq_set_name (ioctl.c:48)
==58624==    by 0x2B0565: if_get_flags (ioctl.c:416)
==58624==    by 0x2B2D9E: ifan_read (kernel_socket.c:455)
==58624==    by 0x2B2D9E: kernel_read (kernel_socket.c:1403)
==58624==    by 0x499F46E: thread_call (thread.c:2002)
==58624==    by 0x495D2B7: frr_run (libfrr.c:1196)
==58624==    by 0x2B40B8: main (main.c:471)
==58624==  Address 0x6baa7f0 is 64 bytes inside a block of size 432 free'd
==58624==    at 0x484ECDC: free (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==58624==    by 0x4953A64: if_delete (if.c:283)
==58624==    by 0x2A93C1: if_delete_update (interface.c:874)
==58624==    by 0x2B2DF3: ifan_read (kernel_socket.c:453)
==58624==    by 0x2B2DF3: kernel_read (kernel_socket.c:1403)
==58624==    by 0x499F46E: thread_call (thread.c:2002)
==58624==    by 0x495D2B7: frr_run (libfrr.c:1196)
==58624==    by 0x2B40B8: main (main.c:471)
==58624==  Block was alloc'd at
==58624==    at 0x4851381: calloc (in /usr/local/libexec/valgrind/vgpreload_memcheck-amd64-freebsd.so)
==58624==    by 0x496A022: qcalloc (memory.c:116)
==58624==    by 0x49546BC: if_new (if.c:164)
==58624==    by 0x49546BC: if_create_name (if.c:218)
==58624==    by 0x49546BC: if_get_by_name (if.c:603)
==58624==    by 0x2B1295: ifm_read (kernel_socket.c:628)
==58624==    by 0x2A7FB6: interface_list (if_sysctl.c:129)
==58624==    by 0x2E99C8: zebra_ns_enable (zebra_ns.c:127)
==58624==    by 0x2E99C8: zebra_ns_init (zebra_ns.c:214)
==58624==    by 0x2B3FF2: main (main.c:401)
==58624==

Zebra needs to pass back whether or not the ifp pointer
was freed when if_delete_update is called and it should
then check in ifan_read as well as ifm_read that the
ifp pointer is still valid for use.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10864 from donaldsharp/free_bsd_uninit_values
David Lamparter [Fri, 25 Mar 2022 00:43:27 +0000 (01:43 +0100)]
Merge pull request #10864 from donaldsharp/free_bsd_uninit_values

3 years agolib: Prevent uninitialized bytes
Donald Sharp [Fri, 25 Mar 2022 00:37:44 +0000 (20:37 -0400)]
lib: Prevent uninitialized bytes

When using zlog_backtrace I am seeing this:

==66286== Syscall param write(buf) points to uninitialised byte(s)
==66286==    at 0x4CDF48A: syscall (in /lib/libc.so.7)
==66286==    by 0x4A0D409: ??? (in /usr/local/lib/libunwind.so.8.0.1)
==66286==    by 0x4A0D694: ??? (in /usr/local/lib/libunwind.so.8.0.1)
==66286==    by 0x4A0E2F4: _ULx86_64_step (in /usr/local/lib/libunwind.so.8.0.1)
==66286==    by 0x49662DB: zlog_backtrace (log.c:250)
==66286==    by 0x2AFFA6: if_get_mtu (ioctl.c:163)
==66286==    by 0x2B2D9D: ifan_read (kernel_socket.c:457)
==66286==    by 0x2B2D9D: kernel_read (kernel_socket.c:1406)
==66286==    by 0x499F46E: thread_call (thread.c:2002)
==66286==    by 0x495D2B7: frr_run (libfrr.c:1196)
==66286==    by 0x2B4098: main (main.c:471)
==66286==  Address 0x7fc000000 is on thread 1's stack
==66286==  in frame #4, created by zlog_backtrace (log.c:239)
==66286==

Let's initialize some data

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10857 from ton31337/fix/bmp_stats_crash
Donald Sharp [Fri, 25 Mar 2022 00:17:58 +0000 (20:17 -0400)]
Merge pull request #10857 from ton31337/fix/bmp_stats_crash

bgpd: Turn off thread when running `no bmp targets X`

3 years agozebra: When handling unprocessed messages from kernel print usable string
Donald Sharp [Thu, 24 Mar 2022 22:31:23 +0000 (18:31 -0400)]
zebra: When handling unprocessed messages from kernel print usable string

Add new debug output to show the string of the message type that
is currently unhandled:

2022-03-24 18:30:15.284 [DEBG] zebra: [V3NSB-BPKBD] Kernel:
2022-03-24 18:30:15.284 [DEBG] zebra: [HDTM1-ENZNM] Kernel: message seq 792
2022-03-24 18:30:15.284 [DEBG] zebra: [MJD4M-0AAAR] Kernel: pid 594488, rtm_addrs {DST,GENMASK}
2022-03-24 18:30:15.285 [DEBG] zebra: [GRDRZ-0N92S] Unprocessed RTM_type: RTM_NEWMADDR(d)

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Fix `terminal monitor` uninited memory usage on freebsd
Donald Sharp [Thu, 24 Mar 2022 22:08:29 +0000 (18:08 -0400)]
lib: Fix `terminal monitor` uninited memory usage on freebsd

When `terminal monitor` is issued I am seeing this for valgrind on freebsd:

2022/03/24 18:07:45 ZEBRA: [RHJDG-5FNSK][EC 100663304] can't open configuration file [/usr/local/etc/frr/zebra.conf]
==52993== Syscall param sendmsg(sendmsg.msg_control) points to uninitialised byte(s)
==52993==    at 0x4CE268A: _sendmsg (in /lib/libc.so.7)
==52993==    by 0x4B96245: ??? (in /lib/libthr.so.3)
==52993==    by 0x4CDF329: sendmsg (in /lib/libc.so.7)
==52993==    by 0x49A9994: vtysh_do_pass_fd (vty.c:2041)
==52993==    by 0x49A9994: vtysh_flush (vty.c:2070)
==52993==    by 0x499F4CE: thread_call (thread.c:2002)
==52993==    by 0x495D317: frr_run (libfrr.c:1196)
==52993==    by 0x2B4068: main (main.c:471)
==52993==  Address 0x7fc000864 is on thread 1's stack
==52993==  in frame #3, created by vtysh_flush (vty.c:2065)

Fix by initializing the memory to `0`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Don't send uninited data to kernel on FreeBSD
Donald Sharp [Thu, 24 Mar 2022 16:57:01 +0000 (12:57 -0400)]
zebra: Don't send uninited data to kernel on FreeBSD

When running zebra w/ valgrind, it was noticed that there
was a bunch of passing uninitialized data to the kernel:

==38194== Syscall param ioctl(generic) points to uninitialised byte(s)
==38194==    at 0x4CDF88A: ioctl (in /lib/libc.so.7)
==38194==    by 0x49A4031: vrf_ioctl (vrf.c:860)
==38194==    by 0x2AFE29: vrf_if_ioctl (ioctl.c:91)
==38194==    by 0x2AFF39: if_get_mtu (ioctl.c:161)
==38194==    by 0x2B12C3: ifm_read (kernel_socket.c:653)
==38194==    by 0x2A7F76: interface_list (if_sysctl.c:129)
==38194==    by 0x2E9958: zebra_ns_enable (zebra_ns.c:127)
==38194==    by 0x2E9958: zebra_ns_init (zebra_ns.c:214)
==38194==    by 0x2B3F82: main (main.c:401)
==38194==  Address 0x7fc000967 is on thread 1's stack
==38194==  in frame #3, created by if_get_mtu (ioctl.c:155)
==38194==
==38194== Syscall param ioctl(generic) points to uninitialised byte(s)
==38194==    at 0x4CDF88A: ioctl (in /lib/libc.so.7)
==38194==    by 0x49A4031: vrf_ioctl (vrf.c:860)
==38194==    by 0x2AFE29: vrf_if_ioctl (ioctl.c:91)
==38194==    by 0x2AFED9: if_get_metric (ioctl.c:143)
==38194==    by 0x2B12CB: ifm_read (kernel_socket.c:655)
==38194==    by 0x2A7F76: interface_list (if_sysctl.c:129)
==38194==    by 0x2E9958: zebra_ns_enable (zebra_ns.c:127)
==38194==    by 0x2E9958: zebra_ns_init (zebra_ns.c:214)
==38194==    by 0x2B3F82: main (main.c:401)
==38194==  Address 0x7fc000967 is on thread 1's stack
==38194==  in frame #3, created by if_get_metric (ioctl.c:137)
==38194==
==38194== Syscall param ioctl(generic) points to uninitialised byte(s)
==38194==    at 0x4CDF88A: ioctl (in /lib/libc.so.7)
==38194==    by 0x49A4031: vrf_ioctl (vrf.c:860)
==38194==    by 0x2AFE29: vrf_if_ioctl (ioctl.c:91)
==38194==    by 0x2B052D: if_get_flags (ioctl.c:419)
==38194==    by 0x2B1CF1: ifam_read (kernel_socket.c:930)
==38194==    by 0x2A7F57: interface_list (if_sysctl.c:132)
==38194==    by 0x2E9958: zebra_ns_enable (zebra_ns.c:127)
==38194==    by 0x2E9958: zebra_ns_init (zebra_ns.c:214)
==38194==    by 0x2B3F82: main (main.c:401)
==38194==  Address 0x7fc000707 is on thread 1's stack
==38194==  in frame #3, created by if_get_flags (ioctl.c:411)

Valgrind is no longer reporting these issues.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: optimization on the mac addition for evpn-mh
anlan_cs [Thu, 24 Mar 2022 12:42:43 +0000 (20:42 +0800)]
zebra: optimization on the mac addition for evpn-mh

When `zebra_evpn_mac_svi_add()` adds one found mac by
`zebra_evpn_mac_lookup()` and the found mac is without
svi flag, then call `zebra_evpn_mac_svi_add()` to create
one appropriate mac, but it will call `zebra_evpn_mac_lookup()`
the second time. So lookup twice, the procedure is redundant.

Just an optimization for it, make sure only lookup once.

Modify `zebra_evpn_mac_gw_macip_add()` to check the `macp`
parameter passed by caller, so it can distinguish whether
really need lookup or not.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10859 from opensourcerouting/fix/link_to_participate
Mark Stapp [Thu, 24 Mar 2022 14:13:48 +0000 (10:13 -0400)]
Merge pull request #10859 from opensourcerouting/fix/link_to_participate

doc: Fix the link that points to Slack invitation in README

3 years agotools: Replace `strings` to `tr` for frrinit.sh
Donatas Abraitis [Thu, 24 Mar 2022 13:26:26 +0000 (15:26 +0200)]
tools: Replace `strings` to `tr` for frrinit.sh

dc3bae68a2422ead82a12fa8480417fd4e351cdd added strings command, which is wrong.

It requires additional package to be installed on the system (binutils).

Let's just get use `tr`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agopim6d: fix remaining IPv6 mroute nits
David Lamparter [Sat, 12 Mar 2022 21:09:05 +0000 (22:09 +0100)]
pim6d: fix remaining IPv6 mroute nits

- im6_src/dst are in6_addr, not pim_addr, so `%pI6` should be used
- the sockopt is IPV6_RECVPKTINFO not IPV6_PKTINFO

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc: Fix the link that points to Slack invitation in README
Donatas Abraitis [Thu, 24 Mar 2022 11:13:37 +0000 (13:13 +0200)]
doc: Fix the link that points to Slack invitation in README

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agobgpd: Turn off thread when running `no bmp targets X`
Donatas Abraitis [Thu, 24 Mar 2022 10:00:57 +0000 (12:00 +0200)]
bgpd: Turn off thread when running `no bmp targets X`

Avoid use-after-free and prevent from crashing:

```
(gdb) bt
0  raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
1  0x00007f2a15c2c30d in core_handler (signo=11, siginfo=0x7fffb915e630, context=<optimized out>) at lib/sigevent.c:261
2  <signal handler called>
3  0x00007f2a156201e4 in bmp_stats (thread=<optimized out>) at bgpd/bgp_bmp.c:1330
4  0x00007f2a15c3d553 in thread_call (thread=thread@entry=0x7fffb915ebf0) at lib/thread.c:2001
5  0x00007f2a15bfa570 in frr_run (master=0x55c43a393ae0) at lib/libfrr.c:1196
6  0x000055c43930627c in main (argc=<optimized out>, argv=<optimized out>) at bgpd/bgp_main.c:519
(gdb)
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10843 from pguibert6WIND/isis_extreme_debug
Donatas Abraitis [Thu, 24 Mar 2022 06:59:21 +0000 (08:59 +0200)]
Merge pull request #10843 from pguibert6WIND/isis_extreme_debug

isisd: add guard debug when compiling with EXTREME_DEBUG

3 years agoMerge pull request #10854 from pguibert6WIND/order_nai_ipv6
Igor Ryzhov [Wed, 23 Mar 2022 22:42:10 +0000 (01:42 +0300)]
Merge pull request #10854 from pguibert6WIND/order_nai_ipv6

pathd: bad order of nai adjacencies for ipv6

3 years agoisisd: add guard debug when compiling with EXTREME_DEBUG
Philippe Guibert [Wed, 16 Feb 2022 14:35:40 +0000 (15:35 +0100)]
isisd: add guard debug when compiling with EXTREME_DEBUG

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #10851 from mobash-rasool/fixes2
Jafar Al-Gharaibeh [Wed, 23 Mar 2022 18:44:08 +0000 (13:44 -0500)]
Merge pull request #10851 from mobash-rasool/fixes2

tests: Add the show database for ospfv3 before checking for ospf route

3 years agoMerge pull request #10844 from mobash-rasool/fixes
Jafar Al-Gharaibeh [Wed, 23 Mar 2022 17:17:27 +0000 (12:17 -0500)]
Merge pull request #10844 from mobash-rasool/fixes

pimd: correct prefix-list ssm range update for exclude mode

3 years agopathd: bad order of nai adjacencies for ipv6
Philippe Guibert [Wed, 23 Mar 2022 16:03:53 +0000 (17:03 +0100)]
pathd: bad order of nai adjacencies for ipv6

The order of nai adjacencies ipv6 addresses was wrong.
The src and the destination addresses were swapped.
Change it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agopim6d: Mroute changes
plsaranya [Thu, 3 Mar 2022 16:25:50 +0000 (21:55 +0530)]
pim6d: Mroute changes

Mroute and supporting changes

Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
3 years agobuild: remove generated lib files during distclean
Mark Stapp [Wed, 23 Mar 2022 13:03:14 +0000 (09:03 -0400)]
build: remove generated lib files during distclean

Remove a couple of lex/yacc output files in lib/
during 'distclean'.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agotests: Add the show database for ospfv3 before checking for ospf route
Mobashshera Rasool [Wed, 23 Mar 2022 11:08:14 +0000 (04:08 -0700)]
tests: Add the show database for ospfv3 before checking for ospf route

Moved the database dump for ospfv3 before ospf route check.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10726 from chiragshah6/fdev2
Sri Mohana Singamsetty [Wed, 23 Mar 2022 05:05:47 +0000 (22:05 -0700)]
Merge pull request #10726 from chiragshah6/fdev2

zebra: evpn revamp l3vni routermac db

3 years agopimd: correct prefix-list ssm range update for exclude mode
Mobashshera Rasool [Tue, 22 Mar 2022 17:48:01 +0000 (10:48 -0700)]
pimd: correct prefix-list ssm range update for exclude mode

Modifying the code as per RFC 4604 section 2.2.1
EXCLUDE mode does not apply to SSM addresses, and an SSM-aware router
will ignore MODE_IS_EXCLUDE and CHANGE_TO_EXCLUDE_MODE requests in
the SSM range.

Issue is observed when a group in exclude mode was in ASM range
as per the prefix-list and then prefix-list is modified to make
it fall under SSM range. The (*,G) entry remains there.

So when the group moves to ssm range and it is exclude mode,
delete the group from the IGMP table.

Co-authored-by: Vishal Dhingra <rac.vishaldhingra@gmail.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10842 from anlancs/bgpd-cleanup-1
Sri Mohana Singamsetty [Tue, 22 Mar 2022 13:30:15 +0000 (06:30 -0700)]
Merge pull request #10842 from anlancs/bgpd-cleanup-1

bgpd: remove unnecessary checkings for the returned value

3 years agobgpd: remove unnecessary checkings for the returned value
anlan_cs [Tue, 22 Mar 2022 08:49:40 +0000 (04:49 -0400)]
bgpd: remove unnecessary checkings for the returned value

Since the returned value MUST be valid, remove unnecessary checkings.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #8803 from kuldeepkash/dynamic_route_leak2
Donatas Abraitis [Tue, 22 Mar 2022 06:58:02 +0000 (08:58 +0200)]
Merge pull request #8803 from kuldeepkash/dynamic_route_leak2

tests: Adding new tests to bgp_vrf_dynamic_route_leak suite

3 years agoMerge pull request #10814 from manojvn/2896483
Jafar Al-Gharaibeh [Tue, 22 Mar 2022 03:45:01 +0000 (22:45 -0500)]
Merge pull request #10814 from manojvn/2896483

ospf6d: observed crash in ospf6_decrement_retrans_count.

3 years agoMerge pull request #10809 from donaldsharp/pim_igmp_query
Jafar Al-Gharaibeh [Tue, 22 Mar 2022 03:37:26 +0000 (22:37 -0500)]
Merge pull request #10809 from donaldsharp/pim_igmp_query

Pim igmp query

3 years agoMerge pull request #10815 from pguibert6WIND/pim_debug_vxlan
Donatas Abraitis [Mon, 21 Mar 2022 13:47:49 +0000 (15:47 +0200)]
Merge pull request #10815 from pguibert6WIND/pim_debug_vxlan

pimd: add 'debug pim vxlan' when 'debug pim' is used

3 years agoMerge pull request #10832 from patrasar/2520720
Donatas Abraitis [Mon, 21 Mar 2022 11:38:14 +0000 (13:38 +0200)]
Merge pull request #10832 from patrasar/2520720

pimd: add source and group information in mroute json

3 years agoMerge pull request #8967 from anlancs/fix-startup-error-info
Donatas Abraitis [Mon, 21 Mar 2022 07:52:52 +0000 (09:52 +0200)]
Merge pull request #8967 from anlancs/fix-startup-error-info

tools: suppress unuseful warnings during restarting frr

3 years agopimd: source/group information now added for pruned entry
sarita patra [Mon, 21 Mar 2022 06:41:24 +0000 (23:41 -0700)]
pimd: source/group information now added for pruned entry

show ip mroute json command displays the source, group info
per oil, so for pruned group since the OIL is empty, it is not
showing.

Fix: Added the above information per source.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agotests: Adding bgp_vrf_dynamic_route_leak_topo4 suite
Kuldeep Kashyap [Mon, 14 Feb 2022 00:28:29 +0000 (05:58 +0530)]
tests: Adding bgp_vrf_dynamic_route_leak_topo4 suite

1. Added 3 test cases to veirfy bgp vrf dynamic route leak functionality
Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agotests: Adding bgp_vrf_dynamic_route_leak_topo3 test suite
Kuldeep Kashyap [Mon, 14 Feb 2022 00:26:06 +0000 (05:56 +0530)]
tests: Adding bgp_vrf_dynamic_route_leak_topo3 test suite

1. Added 4 test cases to verify bgp vrf dynamic route leak functionlality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agotests: Framework changes to support bgp vrf dynamic route leak automation
Kuldeep Kashyap [Tue, 14 Sep 2021 11:26:37 +0000 (16:56 +0530)]
tests: Framework changes to support bgp vrf dynamic route leak automation

1. Enhance framework to support bgp vrf dynamic route leak automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #9953 from donaldsharp/system_route_replace
Donatas Abraitis [Sun, 20 Mar 2022 21:25:52 +0000 (23:25 +0200)]
Merge pull request #9953 from donaldsharp/system_route_replace

zebra: Better handle replacing our route by a system route

3 years agoMerge pull request #9476 from SaiGomathiN/pim-nht
Donatas Abraitis [Sun, 20 Mar 2022 21:14:08 +0000 (23:14 +0200)]
Merge pull request #9476 from SaiGomathiN/pim-nht

pimd: Added new option "detail" in the "debug pim nht" CLI

3 years agoMerge pull request #10820 from donaldsharp/evpn_route_frag
Russ White [Sun, 20 Mar 2022 19:49:16 +0000 (15:49 -0400)]
Merge pull request #10820 from donaldsharp/evpn_route_frag

Evpn route frag

3 years agoMerge pull request #10830 from anlancs/zebra-rb-remove
Donald Sharp [Sun, 20 Mar 2022 18:32:49 +0000 (14:32 -0400)]
Merge pull request #10830 from anlancs/zebra-rb-remove

zebra, bgpd: remove check returning value of RB_INSERT()

3 years agobgpd: remove check returning value of RB_INSERT()
anlan_cs [Sat, 19 Mar 2022 05:15:09 +0000 (13:15 +0800)]
bgpd: remove check returning value of RB_INSERT()

Since the `RB_INSERT()` is called after not found in RB tree, it MUST be ok and
and return zero. The check of returning value of `RB_INSERT()` is redundant,
just remove them.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10816 from anlancs/fix-bgdp-local-es-rt
Russ White [Sat, 19 Mar 2022 19:04:58 +0000 (15:04 -0400)]
Merge pull request #10816 from anlancs/fix-bgdp-local-es-rt

bgpd: fix wrong check on local es routes

3 years agoMerge pull request #10829 from donaldsharp/rtm_delete
Russ White [Sat, 19 Mar 2022 19:03:25 +0000 (15:03 -0400)]
Merge pull request #10829 from donaldsharp/rtm_delete

zebra: Do not complain if deletion fails

3 years agozebra: Do not complain if deletion fails
Donald Sharp [Sat, 19 Mar 2022 11:44:54 +0000 (07:44 -0400)]
zebra: Do not complain if deletion fails

When issuing a RTM_DELETE operation and the kernel tells
us that the route is already deleted, let's not complain
about the situation:

2022/03/19 02:40:34 ZEBRA: [EC 100663303] kernel_rtm: 2a10:cc42:1d51::/48: rtm_write() unexpectedly returned -4 for command RTM_DELETE

I can recreate this issue on freebsd by doing this:
a) create a route using sharpd
b) shutdown the nexthop's interface
c) remove the route using sharpd

This would also be true of pretty much any routing protocol's behavior.
Let's just not complain about the situation if a RTM_DELETE
operation is issued and FRR is told that the route does not
exist to delete.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: remove check returning value of RB_INSERT()
anlan_cs [Sat, 19 Mar 2022 05:04:43 +0000 (13:04 +0800)]
zebra: remove check returning value of RB_INSERT()

Since the `RB_INSERT()` is called after not found in RB tree, it MUST be ok and
and return zero. The check of returning value of `RB_INSERT()` is redundant,
just remove them.

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