]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agopim6d: Correct the show ip prefix-list display for pim6d 10904/head
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 10905/head
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 10366/head
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 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 10894/head
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 10892/head
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 10891/head
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 10889/head
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 10887/head
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 10883/head
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 10677/head
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 10881/head
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 ...` 10879/head
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 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 10867/head
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 10868/head
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 10866/head
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 10865/head
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 10864/head
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 10862/head
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 10861/head
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 agodoc: Fix the link that points to Slack invitation in README 10859/head
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` 10857/head
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 10843/head
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 10854/head
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 agobuild: remove generated lib files during distclean 10852/head
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 10851/head
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 10844/head
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 10847/head
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 10842/head
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 10832/head
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 8803/head
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() 10830/head
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 10829/head
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>
3 years agoMerge pull request #10817 from kuldeepkash/micronet_fixes
Christian Hopps [Fri, 18 Mar 2022 16:21:02 +0000 (12:21 -0400)]
Merge pull request #10817 from kuldeepkash/micronet_fixes

tests: Fix topotests crash when KeyError found

3 years agodoc: add notes for ead-es-frag fragmentation 10820/head
Anuradha Karuppiah [Fri, 13 Aug 2021 14:52:07 +0000 (07:52 -0700)]
doc: add notes for ead-es-frag fragmentation

Config for -
1. Preventing fragmentation via user configured EAD RTs
2. Limiting the number of EVIs per-fragment if EAD fragmentation is needed

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agobgpd: add cli for configuring the EVI limit per-ES-frag
Anuradha Karuppiah [Thu, 12 Aug 2021 19:08:14 +0000 (12:08 -0700)]
bgpd: add cli for configuring the EVI limit per-ES-frag

The EAD-per-ES route can be fragmented to fit the EVIs on the switch. This
command allows the EVI limit to be configured -

!
router bgp 5556
 !
 address-family l2vpn evpn
  ead-es-frag evi-limit 200
 exit-address-family
 !
!

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agolib, bgpd: changes for EAD-per-ES fragmentation
Anuradha Karuppiah [Fri, 4 Jun 2021 00:28:43 +0000 (17:28 -0700)]
lib, bgpd: changes for EAD-per-ES fragmentation

The EAD-per-ES route carries ECs for all the ES-EVI RTs. As the number of VNIs
increase all RTs do not fit into a standard BGP UPDATE (4K) so the route needs
to be fragmented.

Each fragment is associated with a separate RD and frag-id -
1. Local ES-per-EAD -
ES route table - {ES-frag-ID, ESI, ET=0xffffffff, VTEP-IP}
global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff}
2. Remote ES-per-EAD -
VNI route table - {ESI, ET=0xffffffff, VTEP-IP}
global route table - {RD-=ES-frag-RD, ESI, ET=0xffffffff}

Note: The fragment ID is abandoned in the per-VNI routing table. At this
point that is acceptable as we dont expect more than one-ES-per-EAD fragment
to be imported into the per-VNI routing table. But that may need to be
re-worked at a later point.

CLI changes (sample with 4 VNIs per-fragment for experimental pruposes) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es 03:44:38:39:ff:ff:01:00:00:01"
ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: LR
 RD: 27.0.0.21:3
 Originator-IP: 27.0.0.21
 Local ES DF preference: 50000
 VNI Count: 10
 Remote VNI Count: 10
 VRF Count: 3
 MACIP EVI Path Count: 33
 MACIP Global Path Count: 198
 Inconsistent VNI VTEP Count: 0
 Inconsistencies: -
 Fragments: >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
  27.0.0.21:3 EVIs: 4
  27.0.0.21:13 EVIs: 4
  27.0.0.21:22 EVIs: 2
 VTEPs:
  27.0.0.22 flags: EA df_alg: preference df_pref: 32767
  27.0.0.23 flags: EA df_alg: preference df_pref: 32767

root@torm-11:mgmt:~# vtysh -c "show bgp l2vpn evpn es-evi vni 1002 detail"
VNI: 1002 ESI: 03:44:38:39:ff:ff:01:00:00:01
 Type: LR
 ES fragment RD: 27.0.0.21:13 >>>>>>>>>>>>>>>>>>>>>>>>>
 Inconsistencies: -
 VTEPs: 27.0.0.22(EV),27.0.0.23(EV)

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

PS: The number of EVIs per-fragment has been set to 128 and may need further
tuning.

Ticket: #2632967

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agobgpd: evpn mh changes to advertise EAD routes with user configured export-rt
Anuradha Karuppiah [Tue, 11 May 2021 23:45:55 +0000 (16:45 -0700)]
bgpd: evpn mh changes to advertise EAD routes with user configured export-rt

This is an alternate to EAD route fragmenation and allows the user to limit
the route to a single UPDATE (<4K) independent of the number of EVIs.

Sample config (add one l2-vni RT from each VRF) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
!
router bgp 5556
 !
 address-family l2vpn evpn
  ead-es-route-target export 5556:1001
  ead-es-route-target export 5556:1004
  ead-es-route-target export 5556:1008
 exit-address-family
!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Sample route
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
   Network          Next Hop            Metric LocPrf Weight Path
*> [1]:[4294967295]:[03:44:38:39:ff:ff:01:00:00:01]:[32]:[27.0.0.21]
                    27.0.0.21                          32768 i
                    ET:8 ESI-label-Rt:AA RT:5556:1001 RT:5556:1004 RT:5556:1008
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

When configured, the ead-es-route-target is used instead of
the auto-generated version that includes all associated EVI's RTs.

Ticket: #2632967

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
3 years agoMerge pull request #10705 from kuldeepkash/cut_execution_time
Martin Winter [Thu, 17 Mar 2022 23:33:59 +0000 (16:33 -0700)]
Merge pull request #10705 from kuldeepkash/cut_execution_time

tests: Adding EVPN-GR scenario to evpn_type5 suite

3 years agoMerge pull request #10813 from opensourcerouting/fix/include_prune_stats_for_pim_traf...
mobash-rasool [Thu, 17 Mar 2022 18:06:30 +0000 (23:36 +0530)]
Merge pull request #10813 from opensourcerouting/fix/include_prune_stats_for_pim_traffic_interface

pimd: Include pruneTx/pruneRx for `show ip pim interface traffic WORD…

3 years agoMerge pull request #10801 from mobash-rasool/fixes
Donald Sharp [Thu, 17 Mar 2022 13:50:03 +0000 (09:50 -0400)]
Merge pull request #10801 from mobash-rasool/fixes

tests: Adding database info in the script to ease debug

3 years agobgpd: fix wrong check on local es routes 10816/head
anlan_cs [Wed, 16 Mar 2022 13:38:17 +0000 (21:38 +0800)]
bgpd: fix wrong check on local es routes

Importing local es routes should be skipped. But the check of it is a bit wrong.
It is ok that local es routes can't be imported, but importing local es will
wrongly enter `uninstall` procedure.

Just adjust this check to make it clear. Immediately return in the case
of importing local es routes.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agopimd: add 'debug pim vxlan' when 'debug pim' is used 10815/head
Philippe Guibert [Thu, 17 Mar 2022 13:35:00 +0000 (14:35 +0100)]
pimd: add 'debug pim vxlan' when 'debug pim' is used

Reversely, negating 'debug pim' will disable vxlan debugging.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #10812 from opensourcerouting/fix/pim_igmp_statistics_per_group
Donald Sharp [Thu, 17 Mar 2022 12:21:10 +0000 (08:21 -0400)]
Merge pull request #10812 from opensourcerouting/fix/pim_igmp_statistics_per_group

pimd: Show all groups matched by an arbitrary prefix for `pim rp-info`

3 years agotests: Fix topotests crash when KeyError found 10817/head
Kuldeep Kashyap [Thu, 17 Mar 2022 08:28:29 +0000 (13:58 +0530)]
tests: Fix topotests crash when KeyError found

1. Handle KeyError
2. logger object is defined in main function and its not not accessible
   in other functions so defined it in local functions.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoospf6d: crash in ospf6_decrement_retrans_count. 10814/head
Manoj Naragund [Thu, 17 Mar 2022 11:28:02 +0000 (16:58 +0530)]
ospf6d: crash in ospf6_decrement_retrans_count.

Problem:
ospf6d crash is observed when lsack is received from the neighbour for
AS External LSA.

RCA:
The crash is observed in ospf6_decrement_retrans_count while decrementing
retransmit counter for the LSA when lsack is recived. This is because in
ospf6_flood_interace when new LSA is being added to the neighbour's list
the incrementing is happening on the received LSA instead of the already
present LSA in scope DB which is already carrying counters.

when this new LSA replaces the old one, the already present counters are
not copied on the new LSA this creates counter mismatch which results in
a crash when lsack is recevied due to counter going to negative.

Fix:
The fix involves following changes.
   1. In ospf6_flood_interace when LSA is being added to retrans list
      check if there is alreday lsa in the scoped db and increment
      the counter on that if present.
   2. In ospf6_lsdb_add copy the retrans counter from old to new lsa
      when its being replaced.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
3 years agopimd: Include pruneTx/pruneRx for `show ip pim interface traffic WORD json` 10813/head
Donatas Abraitis [Thu, 17 Mar 2022 08:00:02 +0000 (10:00 +0200)]
pimd: Include pruneTx/pruneRx for `show ip pim interface traffic WORD json`

```
exit1-debian-11# sh ip pim interface traffic eth2 json
{
  "eth2":{
    "name":"eth2",
    "state":"up",
    "address":"192.168.10.123",
    "index":4,
    "flagMulticast":true,
    "flagBroadcast":true,
    "lanDelayEnabled":true,
    "helloRx":2,
    "helloTx":2,
    "joinRx":0,
    "joinTx":1,
    "pruneRx":0,
    "pruneTx":0,
    "registerRx":0,
    "registerTx":0,
    "registerStopRx":0,
    "registerStopTx":0,
    "assertRx":0,
    "assertTx":0,
    "bsmRx":0,
    "bsmTx":0
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agopimd: Show all groups matched by an arbitrary prefix for `pim rp-info` 10812/head
Donatas Abraitis [Thu, 17 Mar 2022 07:31:05 +0000 (09:31 +0200)]
pimd: Show all groups matched by an arbitrary prefix for `pim rp-info`

```
r1# show ip pim rp-info
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.123   225.0.0.0/24        eth2              yes        Static   ASM
192.168.10.123   239.0.0.0/8         eth2              yes        Static   ASM
192.168.10.123   239.4.0.0/24        eth2              yes        Static   SSM

r1# show ip pim rp-info 239.4.0.0/25
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.123   239.0.0.0/8         eth2              yes        Static   ASM
192.168.10.123   239.4.0.0/24        eth2              yes        Static   SSM
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agotests: Adding database information in ospfv3 testcase 10801/head
Mobashshera Rasool [Wed, 16 Mar 2022 12:47:01 +0000 (05:47 -0700)]
tests: Adding database information in ospfv3 testcase

Improving the test case to show database info as well
to help narrow down whether its a LSA origination problem or
route calculation problem in case of failures.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10807 from donaldsharp/wheel_typo
Jafar Al-Gharaibeh [Thu, 17 Mar 2022 01:40:18 +0000 (20:40 -0500)]
Merge pull request #10807 from donaldsharp/wheel_typo

lib: wheel's typo fix

3 years agoMerge pull request #10806 from donaldsharp/dplane_fixup_for_lua
Jafar Al-Gharaibeh [Wed, 16 Mar 2022 21:38:01 +0000 (16:38 -0500)]
Merge pull request #10806 from donaldsharp/dplane_fixup_for_lua

zebra: Fixup lua with new dplane ops

3 years agoMerge pull request #10790 from anlancs/zebra-adjust-flag
Donald Sharp [Wed, 16 Mar 2022 20:25:24 +0000 (16:25 -0400)]
Merge pull request #10790 from anlancs/zebra-adjust-flag

zebra: minor changes on "zebra_evpn_mac_gw_macip_add" function

3 years agopimd: fix igmp packet check 10809/head
ron [Wed, 19 Jan 2022 09:37:28 +0000 (17:37 +0800)]
pimd: fix igmp packet check

ip source 0.0.0.0 is OK (RFC 3376: 4.2.13.).

Signed-off-by: ron <lyq140hf2006@163.com>
3 years agopimd: fix igmp query packet
ron [Wed, 19 Jan 2022 09:35:30 +0000 (17:35 +0800)]
pimd: fix igmp query packet

'Max Resp Time' in v2 query needs no encode (RFC 2236: 2.2.).

Signed-off-by: ron <lyq140hf2006@163.com>
3 years agolib: wheel's typo fix 10807/head
ron [Thu, 10 Feb 2022 11:26:53 +0000 (19:26 +0800)]
lib: wheel's typo fix

The wheel data structure is a array of list pointers
but the alloc for it is using the sizeof (struct listnode *)
as the amount to allocate.  Even though the (struct listnode *)
and (struct list *) sizes are the same, let's list the correct
values.

Signed-off-by: ron <lyq140hf2006@163.com>
3 years agozebra: Fixup lua with new dplane ops 10806/head
Donald Sharp [Wed, 16 Mar 2022 19:10:54 +0000 (15:10 -0400)]
zebra: Fixup lua with new dplane ops

Commit: 5d41413833 added 3 new dplane ops:

DPLANE_OP_INTF_INSTALL
DPLANE_OP_INTF_UPDATE
DPLANE_OP_INTF_DELETE

The build system does not build lua so zebra_script.c
was not updated.  Update of course!

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10797 from fabioantonini/sysrepo-2.0.41-support
Donald Sharp [Wed, 16 Mar 2022 18:33:53 +0000 (14:33 -0400)]
Merge pull request #10797 from fabioantonini/sysrepo-2.0.41-support

support to sysrepo-2.0.41