]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
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 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 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 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

3 years agoMerge pull request #10803 from anlancs/bgpd-remove-dead-l2vpn
Donald Sharp [Wed, 16 Mar 2022 18:29:42 +0000 (14:29 -0400)]
Merge pull request #10803 from anlancs/bgpd-remove-dead-l2vpn

bgpd: remove dead code

3 years agoMerge pull request #10804 from LabNConsulting/chopps/coverity-1
Donald Sharp [Wed, 16 Mar 2022 18:29:18 +0000 (14:29 -0400)]
Merge pull request #10804 from LabNConsulting/chopps/coverity-1

lib: grpc: fix covevrity warnings

3 years agoMerge pull request #9262 from gpnaveen/ospfv3_basic_tests
Jafar Al-Gharaibeh [Wed, 16 Mar 2022 16:06:19 +0000 (11:06 -0500)]
Merge pull request #9262 from gpnaveen/ospfv3_basic_tests

tests: adding ospfv3 base cases.

3 years agolib: grpc: fix covevrity warnings 10804/head
Christian Hopps [Wed, 16 Mar 2022 14:11:19 +0000 (10:11 -0400)]
lib: grpc: fix covevrity warnings

One uninit warning and one missing lock warning, both were OK but
let's make the tool happy.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #10755 from patrasar/enable_pimv6
David Lamparter [Wed, 16 Mar 2022 15:13:56 +0000 (16:13 +0100)]
Merge pull request #10755 from patrasar/enable_pimv6

3 years agoMerge pull request #10798 from Jafaral/topo-detect-pim
Donald Sharp [Wed, 16 Mar 2022 14:28:56 +0000 (10:28 -0400)]
Merge pull request #10798 from Jafaral/topo-detect-pim

topotest: enable pim when detecting `ip pim` using unified config

3 years agobgpd: remove dead code 10803/head
anlan_cs [Wed, 16 Mar 2022 13:05:37 +0000 (21:05 +0800)]
bgpd: remove dead code

`bgp_evpn_import_route_in_vrfs()` is special ( l2vpn ) form of
`install_uninstall_evpn_route() with `AFI_L2VPN` and `SAFI_EVPN` family.

No caller, just remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10653 from g-balaji1/pimv6-ssm
Donald Sharp [Wed, 16 Mar 2022 12:40:29 +0000 (08:40 -0400)]
Merge pull request #10653 from g-balaji1/pimv6-ssm

pim6d: pim_ssmpingd changes to support PIMv6

3 years agoMerge pull request #10763 from donaldsharp/plist_speedup
Donatas Abraitis [Wed, 16 Mar 2022 11:42:18 +0000 (13:42 +0200)]
Merge pull request #10763 from donaldsharp/plist_speedup

lib: Convert prefix_master->str to a RB Tree

3 years agoMerge pull request #10799 from Jafaral/ospf-not-running
Donald Sharp [Wed, 16 Mar 2022 11:38:28 +0000 (07:38 -0400)]
Merge pull request #10799 from Jafaral/ospf-not-running

ospfd: better error messages when not enabled in a vrf

3 years agopim6d: Changes done in pim_ssmpingd to support v6 10653/head
Balaji Gurudoss [Fri, 25 Feb 2022 10:29:03 +0000 (15:59 +0530)]
pim6d: Changes done in pim_ssmpingd to support v6

Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
3 years agopim6d: Enable protocol as VTYSH_PIM6D for pim6_cmd.c 10755/head
sarita patra [Tue, 8 Mar 2022 09:59:14 +0000 (01:59 -0800)]
pim6d: Enable protocol as VTYSH_PIM6D for pim6_cmd.c

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agoospfd: better error messages when not enabled in a vrf 10799/head
Jafar Al-Gharaibeh [Wed, 16 Mar 2022 04:28:31 +0000 (23:28 -0500)]
ospfd: better error messages when not enabled in a vrf

before:
```
r1# show ip ospf vrf blue
% OSPF instance not found

r1# show ip ospf vrf default
% OSPF instance not found

r1# show ip ospf
% OSPF instance not found
```

after:
```
r1# show ip ospf vrf blue
% OSPF is not enabled in vrf blue

r1# show ip ospf vrf default
% OSPF is not enabled in vrf default

r1# show ip ospf
% OSPF is not enabled in vrf default
```

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agotopotest: enable pim when detecting pim using unified config 10798/head
Jafar Al-Gharaibeh [Tue, 15 Mar 2022 05:28:44 +0000 (00:28 -0500)]
topotest: enable pim when detecting pim using unified config

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agotests: adding ospfv3 base cases. 9262/head
nguggarigoud [Tue, 3 Aug 2021 01:18:29 +0000 (18:18 -0700)]
tests: adding ospfv3 base cases.

Covers basic test case like route map, rte calc.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
3 years agoMerge pull request #10427 from sworleys/Protodown-Reason-Upstream
Russ White [Tue, 15 Mar 2022 23:58:16 +0000 (19:58 -0400)]
Merge pull request #10427 from sworleys/Protodown-Reason-Upstream

Add Support for Setting Protodown Reason Code

3 years agoMerge pull request #10643 from Jafaral/ospf-multi-vrf
Donald Sharp [Tue, 15 Mar 2022 22:58:03 +0000 (18:58 -0400)]
Merge pull request #10643 from Jafaral/ospf-multi-vrf

tests: add a topotest for ospf, mutli vrf, and route leaking

3 years agotopotests: pytest mark bgpd 10643/head
Jafar Al-Gharaibeh [Tue, 15 Mar 2022 20:54:37 +0000 (15:54 -0500)]
topotests: pytest mark bgpd

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
3 years agoMerge pull request #10770 from chiragshah6/evpn_dev3
Sri Mohana Singamsetty [Tue, 15 Mar 2022 19:32:22 +0000 (12:32 -0700)]
Merge pull request #10770 from chiragshah6/evpn_dev3

zebra: evpn disable remove l2vni from l3vni list

3 years agoMerge pull request #10580 from leonshaw/fix/link-ns
Donald Sharp [Tue, 15 Mar 2022 19:23:18 +0000 (15:23 -0400)]
Merge pull request #10580 from leonshaw/fix/link-ns

zebra: Lookup linked interface in link netns

3 years agoMerge pull request #10791 from opensourcerouting/feature/igmp_stats_total_received_me...
Donald Sharp [Tue, 15 Mar 2022 19:14:37 +0000 (15:14 -0400)]
Merge pull request #10791 from opensourcerouting/feature/igmp_stats_total_received_message

pimd: Add additional IGMP stats (peak number of groups)

3 years agoMerge pull request #10794 from opensourcerouting/fix/do_not_print_empty_stats_for_non...
Donald Sharp [Tue, 15 Mar 2022 19:13:23 +0000 (15:13 -0400)]
Merge pull request #10794 from opensourcerouting/fix/do_not_print_empty_stats_for_non_existing_interface

pimd: Return empty JSON if we query non existing interface for IGMP s…

3 years agolib: support to sysrepo-2.0.41 10797/head
Fabio Antonini [Tue, 15 Mar 2022 11:11:32 +0000 (12:11 +0100)]
lib: support to sysrepo-2.0.41

northbound_sysrepo.c fixed to use the newer APIs from sysrepo 2.0.41

Signed-off-by: Fabio Antonini <f.antonini@tiesse.com>
3 years agopimd: Return empty JSON if we query non existing interface for IGMP stats 10794/head
Donatas Abraitis [Mon, 14 Mar 2022 21:06:16 +0000 (23:06 +0200)]
pimd: Return empty JSON if we query non existing interface for IGMP stats

Now we return all zeroed stats, which seems wrong. Handle the same way, as
with PIM interfaces. Return empty JSON and a warning for VTYSH.

```
exit1-debian-11# sh ip igmp statistics interface belekas
% No such interface
exit1-debian-11# sh ip igmp statistics interface belekas json
{
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10792 from donaldsharp/pim_blargle
Donatas Abraitis [Tue, 15 Mar 2022 14:22:37 +0000 (16:22 +0200)]
Merge pull request #10792 from donaldsharp/pim_blargle

Fix up #6058

3 years agoMerge pull request #10796 from anlancs/bgpd-zebra-newline
Donald Sharp [Tue, 15 Mar 2022 13:40:44 +0000 (09:40 -0400)]
Merge pull request #10796 from anlancs/bgpd-zebra-newline

bgpd: add new line for prompt of "no router bgp"

3 years agobgpd: add new line for prompt of "no router bgp" 10796/head
anlan_cs [Sun, 20 Feb 2022 01:02:46 +0000 (20:02 -0500)]
bgpd: add new line for prompt of "no router bgp"

Simple prompt issue.
"no router bgp <ASN>" is ok, but "no router bgp" without <ASN> missed "\n".

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10739 from LabNConsulting/chopps/fixgrpc-reorg
Donald Sharp [Tue, 15 Mar 2022 13:10:03 +0000 (09:10 -0400)]
Merge pull request #10739 from LabNConsulting/chopps/fixgrpc-reorg

grpc, lib: grpc cleanup/reorg

3 years agoMerge pull request #10565 from lyq140/patch-thread
Donald Sharp [Tue, 15 Mar 2022 12:40:41 +0000 (08:40 -0400)]
Merge pull request #10565 from lyq140/patch-thread

lib: not thread off when schedule

3 years agoMerge pull request #10583 from donaldsharp/pim_upstream_timers
Donatas Abraitis [Tue, 15 Mar 2022 12:35:30 +0000 (14:35 +0200)]
Merge pull request #10583 from donaldsharp/pim_upstream_timers

pimd: Ensure timers are stopped on instance shutdown

3 years agoMerge pull request #10693 from anlancs/bgpd-add-check-ns
Donald Sharp [Tue, 15 Mar 2022 12:27:44 +0000 (08:27 -0400)]
Merge pull request #10693 from anlancs/bgpd-add-check-ns

zebra: use "assert" instead of unnecessary check

3 years agopimd: Add additional IGMP stats (peak number of groups) 10791/head
Donatas Abraitis [Mon, 14 Mar 2022 15:33:11 +0000 (17:33 +0200)]
pimd: Add additional IGMP stats (peak number of groups)

```
exit1-debian-11# sh ip igmp statistics interface eth2
IGMP statistics
Interface            : eth2
V1 query             : 0
V2 query             : 0
V3 query             : 25
V2 leave             : 0
V1 report            : 0
V2 report            : 0
V3 report            : 34
mtrace response      : 0
mtrace request       : 0
unsupported          : 0
joins failed         : 0
joins sent           : 13
general queries sent : 2
group queries sent   : 24
peak groups          : 9
total groups         : 4
total source groups  : 1
exit1-debian-11# sh ip igmp statistics interface eth2 json
{
  "eth2":{
    "name":"eth2",
    "queryV1":0,
    "queryV2":0,
    "queryV3":25,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":34,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "peakGroups":9,
    "totalGroups":4,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":13,
    "generalQueriesSent":2,
    "groupQueriesSent":24
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10793 from opensourcerouting/feature/igmp_stats_total_received_me...
Donald Sharp [Tue, 15 Mar 2022 11:56:00 +0000 (07:56 -0400)]
Merge pull request #10793 from opensourcerouting/feature/igmp_stats_total_received_messages

pimd: Show total received messages IGMP stats

3 years agoMerge pull request #10012 from AbhishekNR/upstream
Donald Sharp [Tue, 15 Mar 2022 11:54:04 +0000 (07:54 -0400)]
Merge pull request #10012 from AbhishekNR/upstream

pimd : Handling of Exclude mode IGMPv3 report messages for SSM aware group.

3 years agopimd: Show total received messages IGMP stats 10793/head
Donatas Abraitis [Mon, 14 Mar 2022 20:45:28 +0000 (22:45 +0200)]
pimd: Show total received messages IGMP stats

```
exit1-debian-11# do sh ip igmp statistics
IGMP statistics
Interface               : global
V1 query                : 0
V2 query                : 0
V3 query                : 3
V2 leave                : 0
V1 report               : 0
V2 report               : 0
V3 report               : 18
mtrace response         : 0
mtrace request          : 0
unsupported             : 0
total received messages : 21
joins failed            : 0
joins sent              : 16
general queries sent    : 6
group queries sent      : 3
total groups            : 4
total source groups     : 1
exit1-debian-11# do sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":4,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":18,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalReceivedMessage":22,
    "totalGroups":3,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":16,
    "generalQueriesSent":6,
    "groupQueriesSent":4
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agolib: grpc: rework RPC handlers improve code clarity 10739/head
Christian Hopps [Mon, 21 Feb 2022 01:30:52 +0000 (20:30 -0500)]
lib: grpc: rework RPC handlers improve code clarity

- split NewRpcState object into 2, a Unary and a Streaming variant, which
  then allows for the next.
- move all state machine details inside these new state objects
  - use a template arg to allow for Streaming state tracking object
    creation and deletion w/o requiring this in each specific RPC
    hander.
- Code is more rugged by design now.

Thanks to Rafael Zalamena <rzalamena@opensourcerouting.org> for the cleanup
ideas/motivation.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agopimd: A wrong address family means the register-stop receive fails 10792/head
Donald Sharp [Mon, 14 Mar 2022 19:51:13 +0000 (15:51 -0400)]
pimd: A wrong address family means the register-stop receive fails

The current code in pim_register_stop_recv would never fail as
that the code was always returning 0 in all cases, but
if the code parses an incorrect afi then it has failed and
should return as much

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agopimd: FRR-PIM sending register packet even after receiving (*,G) register stop
saravanank [Fri, 20 Mar 2020 03:08:55 +0000 (20:08 -0700)]
pimd: FRR-PIM sending register packet even after receiving (*,G) register stop

RCA: (*,G) register stop was not handled

Fix: Loop through all (S,G) under the (*,G) and apply reg stop

Authored-by- Saravanan K <saravanank@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10738 from LabNConsulting/chopps/fixgrpc
Donald Sharp [Mon, 14 Mar 2022 18:57:59 +0000 (14:57 -0400)]
Merge pull request #10738 from LabNConsulting/chopps/fixgrpc

fixes for grpc module

3 years agolib: grpc: use candiate ID to delete rather than pointer to candiate 10738/head
Christian Hopps [Sun, 6 Mar 2022 11:59:50 +0000 (06:59 -0500)]
lib: grpc: use candiate ID to delete rather than pointer to candiate

- also be consistent in candidate IDs being uint64_t

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: call protobuf clean up on exit
Rafael Zalamena [Sat, 5 Mar 2022 15:34:28 +0000 (10:34 -0500)]
lib: call protobuf clean up on exit

Let's clean up the valgrind output even more by calling the protobuf
shutdown function that deallocates all library used memory.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agotests: new grpc topotest
Christian Hopps [Sat, 26 Feb 2022 18:44:33 +0000 (13:44 -0500)]
tests: new grpc topotest

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: analyze should also check /tmp/topotests/topotests.xml
Christian Hopps [Thu, 24 Feb 2022 00:20:31 +0000 (19:20 -0500)]
tests: analyze should also check /tmp/topotests/topotests.xml

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agotests: lib: fix grpc unit-test
Christian Hopps [Mon, 7 Mar 2022 19:29:19 +0000 (14:29 -0500)]
tests: lib: fix grpc unit-test

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agoMerge pull request #10786 from opensourcerouting/pim6-pim-prep
Donald Sharp [Mon, 14 Mar 2022 13:35:37 +0000 (09:35 -0400)]
Merge pull request #10786 from opensourcerouting/pim6-pim-prep

pim6d: prepare for sending & receiving actual PIM packets

3 years agoMerge pull request #10788 from opensourcerouting/feature/igmp_stats_queries_sent
Donald Sharp [Mon, 14 Mar 2022 12:28:29 +0000 (08:28 -0400)]
Merge pull request #10788 from opensourcerouting/feature/igmp_stats_queries_sent

pimd: Add additional IGMP stats (generic/group specific queries sent)

3 years agoMerge pull request #10725 from opensourcerouting/zebra-fpm-crash-fix
Donald Sharp [Mon, 14 Mar 2022 12:27:10 +0000 (08:27 -0400)]
Merge pull request #10725 from opensourcerouting/zebra-fpm-crash-fix

zebra: don't enqueue data with FPM socket closed

3 years agoMerge pull request #10731 from donaldsharp/multipath_output_in_zebra
Donatas Abraitis [Mon, 14 Mar 2022 11:38:08 +0000 (13:38 +0200)]
Merge pull request #10731 from donaldsharp/multipath_output_in_zebra

zebra: Multipath output

3 years agozebra: don't enqueue data with FPM socket closed 10725/head
Rafael Zalamena [Wed, 9 Feb 2022 22:16:32 +0000 (19:16 -0300)]
zebra: don't enqueue data with FPM socket closed

It will trigger an assert while trying to schedule the next write.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agopimd: Add additional IGMP stats (generic/group specific queries sent) 10788/head
Donatas Abraitis [Mon, 14 Mar 2022 07:26:22 +0000 (09:26 +0200)]
pimd: Add additional IGMP stats (generic/group specific queries sent)

```
exit1-debian-11# sh ip igmp statistics
IGMP statistics
Interface            : global
V1 query             : 0
V2 query             : 0
V3 query             : 6
V2 leave             : 0
V1 report            : 0
V2 report            : 0
V3 report            : 14
mtrace response      : 0
mtrace request       : 0
unsupported          : 0
joins failed         : 0
joins sent           : 16
general queries sent : 6
group queries sent   : 4
total groups         : 5
total source groups  : 1
exit1-debian-11# sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":6,
    "leaveV2":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":18,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalGroups":5,
    "totalSourceGroups":1,
    "joinsFailed":0,
    "joinsSent":16,
    "generalQueriesSent":6,
    "groupQueriesSent":4
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agopimd: Fix indentation for struct igmp_stats
Donatas Abraitis [Mon, 14 Mar 2022 07:24:49 +0000 (09:24 +0200)]
pimd: Fix indentation for struct igmp_stats

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10447 from ton31337/fix/json_with_whitespaces
Donald Sharp [Sun, 13 Mar 2022 22:19:33 +0000 (18:19 -0400)]
Merge pull request #10447 from ton31337/fix/json_with_whitespaces

*: Fix JSON keys with whitespaces and PascalCase

3 years agoMerge pull request #10768 from opensourcerouting/feature/add_join_stats_per_interface...
Donald Sharp [Sun, 13 Mar 2022 22:17:57 +0000 (18:17 -0400)]
Merge pull request #10768 from opensourcerouting/feature/add_join_stats_per_interface_for_igmp

pimd: Add IGMP join sent/failed statistics

3 years agopimd: Add IGMP join sent/failed statistics 10768/head
Donatas Abraitis [Thu, 10 Mar 2022 16:10:43 +0000 (18:10 +0200)]
pimd: Add IGMP join sent/failed statistics

```
exit1-debian-11# sh ip igmp statistics
IGMP statistics
Interface           : global
V1 query            : 0
V2 query            : 0
V3 query            : 0
V2 leave            : 0
V1 report           : 0
V2 report           : 0
V3 report           : 16
mtrace response     : 0
mtrace request      : 0
unsupported         : 0
joins failed        : 0
joins sent          : 11
total groups        : 4
total source groups : 0
exit1-debian-11# sh ip igmp statistics json
{
  "global":{
    "name":"global",
    "queryV1":0,
    "queryV2":0,
    "queryV3":0,
    "leaveV3":0,
    "reportV1":0,
    "reportV2":0,
    "reportV3":16,
    "mtraceResponse":0,
    "mtraceRequest":0,
    "unsupported":0,
    "totalGroups":4,
    "totalSourceGroups":0,
    "joinsFailed":0,
    "joinsSent":11
  }
}
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10704 from anlancs/zebra-remove-check
Donald Sharp [Sun, 13 Mar 2022 14:17:13 +0000 (10:17 -0400)]
Merge pull request #10704 from anlancs/zebra-remove-check

zebra: Remove unnecessary check

3 years agoMerge pull request #10724 from opensourcerouting/lib-rotate-logs
Donald Sharp [Sun, 13 Mar 2022 14:09:48 +0000 (10:09 -0400)]
Merge pull request #10724 from opensourcerouting/lib-rotate-logs

lib: rotate log file supplied by command line

3 years agoMerge pull request #10716 from donaldsharp/routemap_rbtree_nonuniq
David Lamparter [Sun, 13 Mar 2022 14:08:36 +0000 (15:08 +0100)]
Merge pull request #10716 from donaldsharp/routemap_rbtree_nonuniq

3 years agoMerge pull request #10729 from scop/build/include-frr@-in-deb
Donald Sharp [Sun, 13 Mar 2022 14:04:42 +0000 (10:04 -0400)]
Merge pull request #10729 from scop/build/include-frr@-in-deb

debian: include frr@.service in deb

3 years agoMerge pull request #10399 from g-balaji1/pimv6-sock
Donald Sharp [Sun, 13 Mar 2022 14:03:45 +0000 (10:03 -0400)]
Merge pull request #10399 from g-balaji1/pimv6-sock

pim6d: PIMv6 socket related changes

3 years agoMerge pull request #10779 from opensourcerouting/typesafe-backflip
Donald Sharp [Sun, 13 Mar 2022 13:26:26 +0000 (09:26 -0400)]
Merge pull request #10779 from opensourcerouting/typesafe-backflip

lib: typesafe container reverse iterators

3 years agoMerge pull request #10772 from opensourcerouting/pim6-mld-prep
Donald Sharp [Sun, 13 Mar 2022 13:09:09 +0000 (09:09 -0400)]
Merge pull request #10772 from opensourcerouting/pim6-mld-prep

pim6d: address management & MLD preparation

3 years agoMerge pull request #10785 from ton31337/fix/remove_dead_code
Donald Sharp [Sun, 13 Mar 2022 00:40:52 +0000 (19:40 -0500)]
Merge pull request #10785 from ton31337/fix/remove_dead_code

bgpd: Remove dead code for [un]register_zebra_rnh

3 years agopim6d: decode IPv6 source addresses 10786/head
David Lamparter [Sat, 12 Mar 2022 21:43:29 +0000 (22:43 +0100)]
pim6d: decode IPv6 source addresses

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: encode PIM joins correctly
David Lamparter [Sat, 12 Mar 2022 21:33:23 +0000 (22:33 +0100)]
pim6d: encode PIM joins correctly

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

... so we have `qpim_all_pim_routers_addr` initialized.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: be more informative about missing neighbors
David Lamparter [Sat, 12 Mar 2022 21:09:36 +0000 (22:09 +0100)]
pimd: be more informative about missing neighbors

Much more useful to know what we were trying to find a neighbor for.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: log interface name for send errors
David Lamparter [Sat, 12 Mar 2022 21:41:41 +0000 (22:41 +0100)]
pimd: log interface name for send errors

Not very helpful to be told only the fd number.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: reenable address management code 10772/head
David Lamparter [Thu, 10 Mar 2022 12:10:37 +0000 (13:10 +0100)]
pim6d: reenable address management code

A few more pieces that should now work reasonably well for IPv6.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: rework interface address tracking/selection
David Lamparter [Thu, 10 Mar 2022 10:22:32 +0000 (11:22 +0100)]
pim6d: rework interface address tracking/selection

We only care about link-local addresses for IPv6 operation.  Also, MLD
needs the lowest while PIM needs the highest...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: refactor/split IGMP integration
David Lamparter [Mon, 28 Feb 2022 10:42:48 +0000 (11:42 +0100)]
pimd: refactor/split IGMP integration

Try to untangle some spaghetti...

This is an 1:1 change that should not result in any functional
difference.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: add safety check to OIL add/del
David Lamparter [Thu, 10 Mar 2022 10:22:48 +0000 (11:22 +0100)]
pimd: add safety check to OIL add/del

These will corrupt memory if mroute_vif_index is -1 (e.g. interface not
operating.)  That shouldn't happen, but it does while doing development
work, so trip an assert rather than corrupting memory.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10744 from opensourcerouting/igmp-json-leave-typo
Donald Sharp [Sat, 12 Mar 2022 21:09:58 +0000 (16:09 -0500)]
Merge pull request #10744 from opensourcerouting/igmp-json-leave-typo

pimd: fix typo in IGMP interface statistics JSON output.

3 years agoMerge pull request #10746 from ton31337/feature/show_group_type_under_rp_info_cli
Donald Sharp [Sat, 12 Mar 2022 20:28:28 +0000 (15:28 -0500)]
Merge pull request #10746 from ton31337/feature/show_group_type_under_rp_info_cli

pimd: Show group-type under `show ip pim rp-info`

3 years agobgpd: Remove dead code for [un]register_zebra_rnh 10785/head
Donatas Abraitis [Sat, 12 Mar 2022 19:48:18 +0000 (21:48 +0200)]
bgpd: Remove dead code for [un]register_zebra_rnh

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10783 from donaldsharp/bgp_zebra_nht
Donatas Abraitis [Sat, 12 Mar 2022 19:46:13 +0000 (21:46 +0200)]
Merge pull request #10783 from donaldsharp/bgp_zebra_nht

Bgp zebra nht

3 years agozebra: prefixlen is not afi/safi dependant in encoding nexthops 10783/head
Donald Sharp [Sat, 12 Mar 2022 16:05:23 +0000 (11:05 -0500)]
zebra: prefixlen is not afi/safi dependant in encoding nexthops

When encoding a response to the upper level protocol the
prefixlen is not something that needs to be part of the
switch statement for handling of a prefix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years ago*: When matching against a nexthop send and process what it matched against
Donald Sharp [Sat, 12 Mar 2022 15:47:16 +0000 (10:47 -0500)]
*: When matching against a nexthop send and process what it matched against

Currently the nexthop tracking code is only sending to the requestor
what it was requested to match against.  When the nexthop tracking
code was simplified to not need an import check and a nexthop check
in b8210849b8ac1abe2d5d9a5ab2459abfde65efa5 for bgpd.  It was not
noticed that a longer prefix could match but it would be seen
as a match because FRR was not sending up both the resolved
route prefix and the route FRR was asked to match against.

This code change causes the nexthop tracking code to pass
back up the matched requested route (so that the calling
protocol can figure out which one it is being told about )
as well as the actual prefix that was matched to.

Fixes: #10766
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10781 from donaldsharp/remove_unused_function
David Lamparter [Sat, 12 Mar 2022 15:40:48 +0000 (16:40 +0100)]
Merge pull request #10781 from donaldsharp/remove_unused_function

3 years agopim6d: pim6d socket changes 10399/head
Balaji Gurudoss [Thu, 3 Mar 2022 06:54:19 +0000 (12:24 +0530)]
pim6d: pim6d socket changes

socket changes to support IPv6 PIM

Signed-off-by: Balaji Gurudoss <G_Balaji1@dell.com>
[DL: cleaned up & refactored a whole bunch more.]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agozebra: Remove unused ZEBRA_NHT_EXACT_MATCH
Donald Sharp [Sat, 12 Mar 2022 13:27:22 +0000 (08:27 -0500)]
zebra: Remove unused ZEBRA_NHT_EXACT_MATCH

This usage was removed in an earlier bit of code
do some final cleanup

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd, lib, pimd: Remove sockopt_cork 10781/head
Donald Sharp [Sat, 12 Mar 2022 13:21:16 +0000 (08:21 -0500)]
bgpd, lib, pimd: Remove sockopt_cork

sockopt_cork is a no-op function that was cleaned up
in 2017.  Since then it's still not being used.  At
this point in time there is little point in keeping a
dead function that will not be used because of vagaries
between platforms

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10780 from mobash-rasool/fixes
Donald Sharp [Sat, 12 Mar 2022 13:07:50 +0000 (08:07 -0500)]
Merge pull request #10780 from mobash-rasool/fixes

pimd: Fix Null pointer dereference

3 years agodoc/developer: remove outdated paragraph 10779/head
David Lamparter [Fri, 11 Mar 2022 16:53:40 +0000 (17:53 +0100)]
doc/developer: remove outdated paragraph

We have `_anywhere` and `_member` now, so this has become outdated.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/developer: reword list -> container
David Lamparter [Fri, 11 Mar 2022 16:52:39 +0000 (17:52 +0100)]
doc/developer: reword list -> container

For some reason I couldn't think of the word "container" back when I
wrote most of this.  It is the proper term most developers wil
understand correctly, so let's use it.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: add `_last` and `_prev` on typesafe RB/DLIST
David Lamparter [Wed, 9 Mar 2022 13:26:05 +0000 (14:26 +0100)]
lib: add `_last` and `_prev` on typesafe RB/DLIST

RB-tree and double-linked-list easily support backwards iteration, and
an use case seems to have popped up.  Let's make it accessible.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: drop printing IP_MULTICAST_LOOP sockopt
David Lamparter [Sat, 12 Mar 2022 11:52:34 +0000 (12:52 +0100)]
pimd: drop printing IP_MULTICAST_LOOP sockopt

This isn't a system or interface setting, it's a socket behavior.  It is
both irrelevant and confusing to the user since it doesn't affect any
system behavior (but it sounds like it does).  Whether it is enabled or
not is solely relevant to how the code is designed to work.

So, remove it from output.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10778 from donaldsharp/command_logging
Donatas Abraitis [Sat, 12 Mar 2022 08:43:57 +0000 (10:43 +0200)]
Merge pull request #10778 from donaldsharp/command_logging

tests: Make all commands logged

3 years agopimd: Show group-type under `show ip pim rp-info` 10746/head
Donatas Abraitis [Wed, 2 Mar 2022 11:30:51 +0000 (13:30 +0200)]
pimd: Show group-type under `show ip pim rp-info`

And filter by group for PIM.

```
exit1-debian-11# show ip pim rp-info
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.17    238.0.0.0/24        eth2              no         Static   ASM
192.168.10.110   232.0.0.0/24        eth2              no         Static   SSM
exit1-debian-11# show ip pim rp-info 238.0.0.0/24
RP address       group/prefix-list   OIF               I am RP    Source   Group-Type
192.168.10.17    238.0.0.0/24        eth2              no         Static   ASM
exit1-debian-11# show ip pim rp-info 238.0.0.0/24 json
{
  "192.168.10.17":[
    {
      "rpAddress":"192.168.10.17",
      "outboundInterface":"eth2",
      "iAmRP":false,
      "group":"238.0.0.0/24",
      "source":"Static",
      "groupType":"ASM"
    }
  ]
}
exit1-debian-11#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agozebra: use "assert" instead of unnecessary check 10693/head
anlan_cs [Sun, 6 Feb 2022 03:59:09 +0000 (22:59 -0500)]
zebra: use "assert" instead of unnecessary check

Since `zvni_map_to_svi_ns()` is used to find and return one specific interface
based on passed attributes of SVI, so the two parameters `in_param` and `p_ifp`
must not be NULL.

Passing NULL `p_ifp` makes no sense, so the check `if (p_ifp)` is
unnecessary.

So use `assert` to ensure the two parameters, and remove that unnecessary check.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10759 from opensourcerouting/feature/add_more_stats_for_igmp
Donald Sharp [Fri, 11 Mar 2022 19:32:05 +0000 (14:32 -0500)]
Merge pull request #10759 from opensourcerouting/feature/add_more_stats_for_igmp

pimd: Add IGMP total groups and total source groups to statistics