]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 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

2 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

2 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

2 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

2 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

2 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

2 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

2 years agopim6d: reenable address management code
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>
2 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>
2 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>
2 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>
2 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.

2 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`

2 years agobgpd: Remove dead code for [un]register_zebra_rnh
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>
2 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

2 years agozebra: prefixlen is not afi/safi dependant in encoding nexthops
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>
2 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>
2 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

2 years agopim6d: pim6d socket changes
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>
2 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>
2 years agobgpd, lib, pimd: Remove sockopt_cork
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>
2 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

2 years agodoc/developer: remove outdated paragraph
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>
2 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>
2 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>
2 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>
2 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

2 years agopimd: Show group-type under `show ip pim rp-info`
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>
2 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

2 years agoMerge pull request #10727 from ton31337/feature/adjust_release_doc
Donald Sharp [Fri, 11 Mar 2022 19:29:46 +0000 (14:29 -0500)]
Merge pull request #10727 from ton31337/feature/adjust_release_doc

doc: Add a couple of handy commands to get some info for release notes

2 years agoMerge pull request #10774 from opensourcerouting/pim6-fixes-20220311
Donald Sharp [Fri, 11 Mar 2022 19:12:58 +0000 (14:12 -0500)]
Merge pull request #10774 from opensourcerouting/pim6-fixes-20220311

pim6d: fix a bunch of IPv6 confusion

2 years agoMerge pull request #10711 from anlancs/zebra-remove-flag
Sri Mohana Singamsetty [Fri, 11 Mar 2022 19:08:51 +0000 (11:08 -0800)]
Merge pull request #10711 from anlancs/zebra-remove-flag

zebra: remove unnecessary assignment

2 years agopimd: Fix Null pointer dereferences
Mobashshera Rasool [Fri, 11 Mar 2022 17:57:10 +0000 (09:57 -0800)]
pimd: Fix Null pointer dereferences

Fixing the below problem:
Dereferencing a pointer that might be "NULL" "group_dnode"
when calling "yang_is_last_list_dnode" in api pim_process_no_rp_cmd

Although there is no NULL pointer dereference since
yang_dnode_exists is called before using the dnode.
So removing the unnecessary yang_dnode_exists api call
and directly get the node and if node does not exists,
return.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agotests: Make all commands logged
Donald Sharp [Fri, 11 Mar 2022 16:19:29 +0000 (11:19 -0500)]
tests: Make all commands logged

Do not allow the test system to turn off the logging of commands
Some tests use the reload command that is accidently turning off
the logging.  Just force the tests to ignore it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #10776 from donaldsharp/vrrp_compile
David Lamparter [Fri, 11 Mar 2022 15:29:27 +0000 (16:29 +0100)]
Merge pull request #10776 from donaldsharp/vrrp_compile

2 years agoMerge pull request #10767 from donaldsharp/some_fixes
Jafar Al-Gharaibeh [Fri, 11 Mar 2022 14:50:28 +0000 (08:50 -0600)]
Merge pull request #10767 from donaldsharp/some_fixes

bgpd: Do not fail when going from GR mode to GR

2 years agovrrpd: Allow it to be built in directory
Donald Sharp [Fri, 11 Mar 2022 12:49:03 +0000 (07:49 -0500)]
vrrpd: Allow it to be built in directory

Looks like the bones were put in place but they
were slightly malformed.  Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: fix some format strings for IPv6
David Lamparter [Fri, 11 Mar 2022 11:13:41 +0000 (12:13 +0100)]
pim6d: fix some format strings for IPv6

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopim6d: fix some IPv6 confusion in RP code
David Lamparter [Thu, 10 Mar 2022 13:08:25 +0000 (14:08 +0100)]
pim6d: fix some IPv6 confusion in RP code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agopimd: RP code indentation adjustment
David Lamparter [Fri, 11 Mar 2022 10:32:26 +0000 (11:32 +0100)]
pimd: RP code indentation adjustment

Need to fix some bits here and running into the "80-ch wall".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: add `%pFXh` to print prefix w/o prefixlen
David Lamparter [Fri, 11 Mar 2022 10:59:38 +0000 (11:59 +0100)]
lib: add `%pFXh` to print prefix w/o prefixlen

Mostly for pimd, for the time being.  May be removed again if unused.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: add JSON printfrr dict-key helper
David Lamparter [Fri, 11 Mar 2022 10:42:17 +0000 (11:42 +0100)]
lib: add JSON printfrr dict-key helper

`json_object_object_add()` adds keys/items to objects/dictionaries.
Useful to have a printfrr based variant for the key there.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agoMerge pull request #10743 from donaldsharp/bgp_no_ll
David Lamparter [Fri, 11 Mar 2022 09:43:58 +0000 (10:43 +0100)]
Merge pull request #10743 from donaldsharp/bgp_no_ll

2 years agoMerge pull request #10480 from mobash-rasool/pimv6-doc
David Lamparter [Fri, 11 Mar 2022 09:41:40 +0000 (10:41 +0100)]
Merge pull request #10480 from mobash-rasool/pimv6-doc

2 years agoMerge pull request #10749 from opensourcerouting/live-log-polish
Donald Sharp [Fri, 11 Mar 2022 00:41:48 +0000 (19:41 -0500)]
Merge pull request #10749 from opensourcerouting/live-log-polish

lib, vtysh: apply some polish to live-log feature

2 years agoMerge pull request #10764 from ton31337/fix/add_missing_new_line_for_cli
Donald Sharp [Fri, 11 Mar 2022 00:33:02 +0000 (19:33 -0500)]
Merge pull request #10764 from ton31337/fix/add_missing_new_line_for_cli

ospfd,ospf6d: Add missing newline for `graceful-restart prepare` CLI

2 years agoMerge pull request #10707 from mobash-rasool/pimv6-register-recv
David Lamparter [Thu, 10 Mar 2022 18:00:45 +0000 (19:00 +0100)]
Merge pull request #10707 from mobash-rasool/pimv6-register-recv

2 years agobgpd: Do not fail when going from GR mode to GR
Donald Sharp [Thu, 10 Mar 2022 14:33:57 +0000 (09:33 -0500)]
bgpd: Do not fail when going from GR mode to GR

If you enter:

router bgp 325
  bgp graceful-restart
  bgp graceful-restart
!

The second command entered will fail.  This is not
something that should be failing as that it's a no-op.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: Replace pim_br_unknown with PIMADDR_ANY
Mobashshera Rasool [Wed, 2 Mar 2022 10:47:17 +0000 (02:47 -0800)]
pim6d: Replace pim_br_unknown with PIMADDR_ANY

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Handle B bit changes for IPv6
Mobashshera Rasool [Wed, 2 Mar 2022 10:45:23 +0000 (02:45 -0800)]
pim6d: Handle B bit changes for IPv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Parsing pimv6 register msg
Mobashshera Rasool [Mon, 28 Feb 2022 17:50:58 +0000 (09:50 -0800)]
pim6d: Parsing pimv6 register msg

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Abstract api to get src and dst from ip hdr
Mobashshera Rasool [Wed, 2 Mar 2022 07:10:39 +0000 (23:10 -0800)]
pim6d: Abstract api to get src and dst from ip hdr

IPv4 uses "struct ip" and IPv6 uses "struct ip6_hdr" as
headers. Get the src and dst in pim_sgaddr.
Added api pim_sgaddr_from_iphdr to do so.

Signed-off-by: Mobashshera Rasool <mrasool@vmwaer.com>
2 years agodoc: Add the document for PIMv6
Mobashshera Rasool [Wed, 2 Feb 2022 16:48:21 +0000 (08:48 -0800)]
doc: Add the document for PIMv6

This PR is raised to add the documentation for MLD and PIMv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #10662 from chiragshah6/evpn_dev1
Russ White [Wed, 9 Mar 2022 21:37:30 +0000 (16:37 -0500)]
Merge pull request #10662 from chiragshah6/evpn_dev1

zebra: netlink protodown event handling for vxlan device

2 years agoospfd,ospf6d: Add missing newline for `graceful-restart prepare` CLI
Donatas Abraitis [Wed, 9 Mar 2022 20:56:53 +0000 (22:56 +0200)]
ospfd,ospf6d: Add missing newline for `graceful-restart prepare` CLI

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #10694 from opensourcerouting/pim6-nht-reenable
Donald Sharp [Wed, 9 Mar 2022 16:51:18 +0000 (11:51 -0500)]
Merge pull request #10694 from opensourcerouting/pim6-nht-reenable

pim6d: reenable NHT code

2 years agoMerge pull request #10635 from anlancs/staticd-cross
Mark Stapp [Wed, 9 Mar 2022 16:05:59 +0000 (11:05 -0500)]
Merge pull request #10635 from anlancs/staticd-cross

zebra: let same host route cross VRF

2 years agoMerge pull request #10079 from mjstapp/fix_intf_del_nhgs
David Lamparter [Wed, 9 Mar 2022 09:15:00 +0000 (10:15 +0100)]
Merge pull request #10079 from mjstapp/fix_intf_del_nhgs

2 years agozebra: let /32 host route with same IP cross VRF
anlan_cs [Mon, 31 Jan 2022 00:44:35 +0000 (19:44 -0500)]
zebra: let /32 host route with same IP cross VRF

Contraints of host routes are too strict in current code:
Host routes with same destination address and nexthop address are forbidden
even when cross VRFs.

Currently host routes with different destination and nexthop address can cross
VRFs, it is ok. But host routes with same addresses are forbidden to cross VRFs,
it is wrong.

Since different VRFs can have the same addresses, leak specific host route with
the same nexthop address ( it means destination address is same to nexthop
address ) to other VRFs is a normal case.

This commit relaxes that contraints. Host routes with same destination address
and nexthop address are forbidden only when not cross VRFs.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agozebra: shutdown doesn't uninstall zebra's NHGs
Mark Stapp [Tue, 16 Nov 2021 18:38:31 +0000 (13:38 -0500)]
zebra: shutdown doesn't uninstall zebra's NHGs

When an interface goes down, it signals any related NHGs to
re-validate themselves. During zebra shutdown, ensure we remove
any NHGs we've installed.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agopimd: Add IGMP total groups and total source groups to statistics
Donatas Abraitis [Tue, 8 Mar 2022 16:34:34 +0000 (18:34 +0200)]
pimd: Add IGMP total groups and total source groups to statistics

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #10701 from rampxxxx/feat_isis_json_show_cmds
Russ White [Tue, 8 Mar 2022 16:15:25 +0000 (11:15 -0500)]
Merge pull request #10701 from rampxxxx/feat_isis_json_show_cmds

Feat isis json show cmds

2 years agoMerge pull request #10722 from chiragshah6/evpn_dev3
Russ White [Tue, 8 Mar 2022 16:00:29 +0000 (11:00 -0500)]
Merge pull request #10722 from chiragshah6/evpn_dev3

zebra: fix crash in evpn neigh cleanup all

2 years agozebra: remove unnecessary assignment
anlan_cs [Mon, 7 Feb 2022 04:53:45 +0000 (23:53 -0500)]
zebra: remove unnecessary assignment

In `zebra_evpn_neigh_gw_macip_add()`, it sets `mac->flags` to "ZEBRA_MAC_DEF_GW"
for "advertise-default-gw" mode. But this set is redundant because this "mac"
is already set by `zebra_evpn_mac_gw_macip_add()`.

So remove this redundant assignment.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #10646 from mobash-rasool/pim-rp-changes-new
David Lamparter [Tue, 8 Mar 2022 11:26:37 +0000 (12:26 +0100)]
Merge pull request #10646 from mobash-rasool/pim-rp-changes-new

2 years agoMerge pull request #10754 from mobash-rasool/yang-fix
David Lamparter [Tue, 8 Mar 2022 11:24:16 +0000 (12:24 +0100)]
Merge pull request #10754 from mobash-rasool/yang-fix

2 years agopim6d: Modify apis in pim_rpf.c for PIMv4/PIMv6
Mobashshera Rasool [Mon, 21 Feb 2022 18:20:05 +0000 (10:20 -0800)]
pim6d: Modify apis in pim_rpf.c for PIMv4/PIMv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_find_exact and pim_rp_find_match_group
Mobashshera Rasool [Mon, 21 Feb 2022 13:47:08 +0000 (05:47 -0800)]
pim6d: Modify pim_rp_find_exact and pim_rp_find_match_group

Modify the apis to accomodate IPv4 and IPv6 addreses for RP.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_del for PIMv4/PIMv6
Mobashshera Rasool [Mon, 21 Feb 2022 13:44:04 +0000 (05:44 -0800)]
pim6d: Modify pim_rp_del for PIMv4/PIMv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_find_prefix_list for PIMv6
Mobashshera Rasool [Mon, 21 Feb 2022 13:23:15 +0000 (05:23 -0800)]
pim6d: Modify pim_rp_find_prefix_list for PIMv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_g for PIMv4/PIMv6
Mobashshera Rasool [Mon, 21 Feb 2022 11:27:35 +0000 (03:27 -0800)]
pim6d: Modify pim_rp_g for PIMv4/PIMv6

Modify pim_rp_g to support PIMv6.
Remove it from stub.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_i_am_rp for PIMv4/PIMv6
Mobashshera Rasool [Mon, 21 Feb 2022 11:21:48 +0000 (03:21 -0800)]
pim6d: Modify pim_rp_i_am_rp for PIMv4/PIMv6

Remove pim_rp_i_am_rp from stub for PIMv6.
Modify pim_rp_i_am_rp for both the daemons.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_set_upstream_addr for PIMv4/PIMv6
Mobashshera Rasool [Thu, 17 Feb 2022 18:54:47 +0000 (10:54 -0800)]
pim6d: Modify pim_rp_set_upstream_addr for PIMv4/PIMv6

Modify pim_rp_set_upstream_addr for supporting PIMv4 and PIMv6.
Removed the stub api for PIMv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Add pim_get_all_mcast_group api
Mobashshera Rasool [Thu, 17 Feb 2022 11:56:20 +0000 (03:56 -0800)]
pim6d: Add pim_get_all_mcast_group api

Added this api to fill all multicast group address based on IP version.
For PIMv4 its 224.0.0.0/4, for PIMv6 its FF00::0/8.
Changed the code where its being used currently.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_change api for pimv6
Mobashshera Rasool [Thu, 3 Feb 2022 11:31:54 +0000 (03:31 -0800)]
pim6d: Modify pim_rp_change api for pimv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Convert %s to %pPA for RP Addresses
Mobashshera Rasool [Wed, 16 Feb 2022 08:04:13 +0000 (00:04 -0800)]
pim6d: Convert %s to %pPA for RP Addresses

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_*_cmd_worker api passing pim_addr parameter
Mobashshera Rasool [Thu, 3 Feb 2022 09:38:54 +0000 (01:38 -0800)]
pim6d: Modify pim_*_cmd_worker api passing pim_addr parameter

Pass pim_addr as parameter for rp address to accomodate ipv6.
Modifying pim_rp_cmd_worker and pim_no_rp_cmd_worker function
parameters from in_addr to pim_addr.
Changes in the caller functions are done as well to make it work
for IPv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify pim_rp_new for pimv6
Mobashshera Rasool [Wed, 2 Feb 2022 15:00:50 +0000 (07:00 -0800)]
pim6d: Modify pim_rp_new for pimv6

Modify the api pim_rp_new to accomodate pimv6 changes.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Return type and parameter changes for api pim_rp_del_config
Mobashshera Rasool [Wed, 2 Feb 2022 15:36:47 +0000 (07:36 -0800)]
pim6d: Return type and parameter changes for api pim_rp_del_config

1. Return value of this function pim_rp_del_config is nowhere used.
So made it as a void function.
2. Paramater const char *rp is first converted to string from prefix
in the caller and then back to prefix in this api pim_rp_del_config.
Fixed it by directly passing the address instead of string.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Stub BSM related APIs for compilation
Mobashshera Rasool [Mon, 28 Feb 2022 19:12:03 +0000 (11:12 -0800)]
pim6d: Stub BSM related APIs for compilation

Have stubbed few of the BSM related APIs to keep
PIMv6 compiling.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Add northbound changes for static rp
Mobashshera Rasool [Tue, 25 Jan 2022 11:19:22 +0000 (03:19 -0800)]
pim6d: Add northbound changes for static rp

Parsing the inputs for static RP configuration.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Adding the rp clis to show-running
Mobashshera Rasool [Mon, 7 Mar 2022 07:34:19 +0000 (23:34 -0800)]
pim6d: Adding the rp clis to show-running

Modify the pim_rp_config_write api for pimv4/pimv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Adding "ipv6 pim rp <> prefix-list <>" cli to pimv6
Mobashshera Rasool [Mon, 7 Mar 2022 07:26:53 +0000 (23:26 -0800)]
pim6d: Adding "ipv6 pim rp <> prefix-list <>" cli to pimv6

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Add static RP CLI for PIMv6
Mobashshera Rasool [Tue, 25 Jan 2022 10:49:10 +0000 (02:49 -0800)]
pim6d: Add static RP CLI for PIMv6

Added the CLI to configure static RP configuration.
[no] ipv6 pim rp <rp-addr> [<group-addr/M>]

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopimd: Modify "ip pim rp <> prefix-list <>" command
Mobashshera Rasool [Mon, 7 Mar 2022 07:18:47 +0000 (23:18 -0800)]
pimd: Modify "ip pim rp <> prefix-list <>" command

1. Moving the processing of the above command to an api.
2. Change DEFUN to DEPFY
3. Make the api common for pimv4 and pimv6 processing.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Modify apis pim_process_rp_cmd for common processing
Mobashshera Rasool [Mon, 7 Mar 2022 06:46:10 +0000 (22:46 -0800)]
pim6d: Modify apis pim_process_rp_cmd for common processing

Modify the apis pim_process_rp_cmd and pim_process_no_rp_cmd
to accomodate ipv4 as well as ipv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopimd: Moving processing of "ip pim rp <grp>" cmd to a common api
Mobashshera Rasool [Mon, 7 Mar 2022 06:02:10 +0000 (22:02 -0800)]
pimd: Moving processing of "ip pim rp <grp>" cmd to a common api

1. Moving the processing of the command to a common api.
2. Changing the DEFUN to DEFPY.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #10393 from patrasar/master_pimv6_cli
David Lamparter [Tue, 8 Mar 2022 08:46:31 +0000 (09:46 +0100)]
Merge pull request #10393 from patrasar/master_pimv6_cli

2 years agoMerge pull request #10753 from mobash-rasool/pimv6-fixes
David Lamparter [Tue, 8 Mar 2022 08:42:28 +0000 (09:42 +0100)]
Merge pull request #10753 from mobash-rasool/pimv6-fixes

2 years agoyang: Fix the ipv6 multicast pattern in frr-route-types
Mobashshera Rasool [Tue, 8 Mar 2022 07:40:02 +0000 (23:40 -0800)]
yang: Fix the ipv6 multicast pattern in frr-route-types

The pattern defined for ipv6-multicast-group-prefix is wrong.
This is leading to mismatch for all the valid ipv6 multicast
addresses.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Initialise VRF related stuffs in Northbound
Mobashshera Rasool [Tue, 8 Mar 2022 05:18:53 +0000 (21:18 -0800)]
pim6d: Initialise VRF related stuffs in Northbound

Not initialising it will lead to crash in nb_running_get_entry_worker.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Remove duplicate if_cmd_init
Mobashshera Rasool [Tue, 8 Mar 2022 05:17:20 +0000 (21:17 -0800)]
pim6d: Remove duplicate if_cmd_init

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #10748 from opensourcerouting/unused-20220307
Donald Sharp [Tue, 8 Mar 2022 00:33:26 +0000 (19:33 -0500)]
Merge pull request #10748 from opensourcerouting/unused-20220307

zebra: remove unused variable

2 years agoMerge pull request #10747 from donaldsharp/reported_code_indentation
Jafar Al-Gharaibeh [Mon, 7 Mar 2022 19:21:33 +0000 (13:21 -0600)]
Merge pull request #10747 from donaldsharp/reported_code_indentation

bgpd: Fix continue/break change from old commit

2 years agolib, vtysh: report lost messages on live log
David Lamparter [Mon, 7 Mar 2022 16:34:17 +0000 (17:34 +0100)]
lib, vtysh: report lost messages on live log

The vtysh live logs don't try to buffer messages when vtysh isn't
reading them fast enough.  Either the kernel has space and can accept
messages without delay, or it doesn't and we continue on.

While this is intentional (otherwise slow vtysh could block a routing
daemon), at least give the user an indication if messages were dropped.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: add `monitor:<fd>` command line log target
David Lamparter [Sat, 5 Mar 2022 18:43:44 +0000 (19:43 +0100)]
lib: add `monitor:<fd>` command line log target

This provides direct raw log output with full metadata directly at
startup regardless of configuration details.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: add a few more bits to live log header
David Lamparter [Mon, 7 Mar 2022 10:30:09 +0000 (11:30 +0100)]
lib: add a few more bits to live log header

... and add some comments explaining the individual fields.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: support multiple `--log` options
David Lamparter [Fri, 4 Mar 2022 20:48:35 +0000 (21:48 +0100)]
lib: support multiple `--log` options

Allow simultaneously enabling syslog, stdout and/or file logs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: make live log sockets non-blocking
David Lamparter [Sat, 5 Mar 2022 18:43:05 +0000 (19:43 +0100)]
lib: make live log sockets non-blocking

This was the intent here to begin with, not sure where I managed to
forget this along the way...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2 years agolib: fix live log fields for crashlog
David Lamparter [Mon, 7 Mar 2022 14:03:53 +0000 (15:03 +0100)]
lib: fix live log fields for crashlog

The timestamps used for the live log are wallclock, not monotonic.  Also
some fields were left uninitialized.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>