Commit Graph

27618 Commits

Author SHA1 Message Date
Mark Stapp
bc5302b1b1
Merge pull request #10635 from anlancs/staticd-cross
zebra: let same host route cross VRF
2022-03-09 11:05:59 -05:00
David Lamparter
e3c54a9383
Merge pull request #10079 from mjstapp/fix_intf_del_nhgs 2022-03-09 10:15:00 +01:00
anlan_cs
3f04f9cf24 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>
2022-03-09 07:22:11 +08:00
Mark Stapp
2472d3e876 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>
2022-03-08 16:16:55 -05:00
Donatas Abraitis
1e02f2f9ab pimd: Add IGMP total groups and total source groups to statistics
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-08 19:07:57 +02:00
Russ White
82934a6a32
Merge pull request #10701 from rampxxxx/feat_isis_json_show_cmds
Feat isis json show cmds
2022-03-08 11:15:25 -05:00
Russ White
5e412c5e73
Merge pull request #10722 from chiragshah6/evpn_dev3
zebra: fix crash in evpn neigh cleanup all
2022-03-08 11:00:29 -05:00
anlan_cs
c2fd85a854 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>
2022-03-08 22:58:22 +08:00
David Lamparter
838a8858d1
Merge pull request #10646 from mobash-rasool/pim-rp-changes-new 2022-03-08 12:26:37 +01:00
David Lamparter
578f7f5473
Merge pull request #10754 from mobash-rasool/yang-fix 2022-03-08 12:24:16 +01:00
Mobashshera Rasool
ded5024af4 pim6d: Modify apis in pim_rpf.c for PIMv4/PIMv6
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
fd5540ead6 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
9dca52b924 pim6d: Modify pim_rp_del for PIMv4/PIMv6
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
1db07606ff pim6d: Modify pim_rp_find_prefix_list for PIMv6
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
8eb5ad6c4a 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
131ded0891 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
b1e132ac61 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
c6ced47492 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
49b7b2c4a8 pim6d: Modify pim_rp_change api for pimv6
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
cafbb61955 pim6d: Convert %s to %pPA for RP Addresses
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
119fcc3def 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
6ed1cea1dc 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
99384c6e4d 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
4fc1f59ea7 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
e1a7c58ce2 pim6d: Add northbound changes for static rp
Parsing the inputs for static RP configuration.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
0c3182a08d 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>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
8663adc490 pim6d: Adding "ipv6 pim rp <> prefix-list <>" cli to pimv6
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-08 00:57:51 -08:00
Mobashshera Rasool
34b403cf8b 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>
2022-03-08 00:57:49 -08:00
Mobashshera Rasool
f39f349719 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>
2022-03-08 00:54:49 -08:00
Mobashshera Rasool
a96942ca3e 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>
2022-03-08 00:54:49 -08:00
Mobashshera Rasool
13ddf7cf74 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>
2022-03-08 00:54:44 -08:00
David Lamparter
f4d8394b01
Merge pull request #10393 from patrasar/master_pimv6_cli 2022-03-08 09:46:31 +01:00
David Lamparter
4d55602624
Merge pull request #10753 from mobash-rasool/pimv6-fixes 2022-03-08 09:42:28 +01:00
Mobashshera Rasool
3a7ef7a7b6 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>
2022-03-07 23:40:02 -08:00
Mobashshera Rasool
ac529e18d4 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>
2022-03-07 21:18:53 -08:00
Mobashshera Rasool
19ef44597d pim6d: Remove duplicate if_cmd_init
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2022-03-07 21:17:20 -08:00
Donald Sharp
ab06d92642
Merge pull request #10748 from opensourcerouting/unused-20220307
zebra: remove unused variable
2022-03-07 19:33:26 -05:00
Jafar Al-Gharaibeh
7816130cca
Merge pull request #10747 from donaldsharp/reported_code_indentation
bgpd: Fix continue/break change from old commit
2022-03-07 13:21:33 -06:00
David Lamparter
a4af82ee2b 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>
2022-03-07 18:03:16 +01:00
David Lamparter
3bcdae106e 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>
2022-03-07 18:03:16 +01:00
David Lamparter
834585bdb9 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>
2022-03-07 18:03:16 +01:00
David Lamparter
da2fc19187 lib: support multiple --log options
Allow simultaneously enabling syslog, stdout and/or file logs.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-07 18:03:15 +01:00
David Lamparter
2eda953a2a 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>
2022-03-07 18:03:15 +01:00
David Lamparter
1609a9d636 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>
2022-03-07 18:03:13 +01:00
Donald Sharp
db0a45d0d6
Merge pull request #10741 from LabNConsulting/chopps/critfixgrpc
critical fixes for grpc
2022-03-07 11:49:48 -05:00
David Lamparter
378260fb65 zebra: remove unused variable
clang complains "variable 'curr_length' set but not used".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-07 17:37:27 +01:00
Donald Sharp
e3015d915b bgpd: Fix continue/break change from old commit
Commit: ea47320b1d

Modified the bgp_clear_stale_route function to have
better indentation, but in the process changed some
`continue;` statements to `break;` which modified
the looping and caused stale paths to not always be
removed upon an update.

To reproduce:  A ---- B, setup with addpath and GR
One side has a prefix with nhop1 and nhop2, kill one
side and then resend the same prefix with nhop3,
paths nhop1 and 2 become stale and never removed.

Code inspection clearly shows that that `continue`
statements became `break` statements causing the
loop over all paths to stop prematurely.

The fix is to change the break back to continue
statements so the loop can continue instead of
stopping.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-07 11:28:28 -05:00
David Lamparter
d03440cab7 lib: fix log target removal when singlethreaded
While running singlethreaded, the RCU code is "dormant" and rcu_free is
an immediate operation.  This results in the log target loop accessing
free'd memory if a log target removes itself while a message is printed
(which is likely to happen on e.g. error conditions.)

Just use frr_each_safe to avoid this issue.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-07 17:23:12 +01:00
Donatas Abraitis
404e53da28
Merge pull request #10745 from mjstapp/fix_doc_star_again
doc: fix another doc typo
2022-03-07 17:37:35 +02:00
Mark Stapp
bdbdd2a75c doc: fix another doc typo
Fix another typo that mis-uses the asterisk character.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2022-03-07 08:34:09 -05:00