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

3 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

3 years agopim6d: Initialise VRF related stuffs in Northbound 10753/head
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>
3 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>
3 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

3 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

3 years agoMerge pull request #10741 from LabNConsulting/chopps/critfixgrpc
Donald Sharp [Mon, 7 Mar 2022 16:49:48 +0000 (11:49 -0500)]
Merge pull request #10741 from LabNConsulting/chopps/critfixgrpc

critical fixes for grpc

3 years agozebra: remove unused variable 10748/head
David Lamparter [Mon, 7 Mar 2022 16:36:00 +0000 (17:36 +0100)]
zebra: remove unused variable

clang complains "variable 'curr_length' set but not used".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agobgpd: Fix continue/break change from old commit 10747/head
Donald Sharp [Mon, 7 Mar 2022 16:28:28 +0000 (11:28 -0500)]
bgpd: Fix continue/break change from old commit

Commit: ea47320b1d0eeaa56f945fa356da7e4ca7f2b0b2

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>
3 years agoMerge pull request #10745 from mjstapp/fix_doc_star_again
Donatas Abraitis [Mon, 7 Mar 2022 15:37:35 +0000 (17:37 +0200)]
Merge pull request #10745 from mjstapp/fix_doc_star_again

doc: fix another doc typo

3 years agodoc: fix another doc typo 10745/head
Mark Stapp [Mon, 7 Mar 2022 13:34:09 +0000 (08:34 -0500)]
doc: fix another doc typo

Fix another typo that mis-uses the asterisk character.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agoMerge pull request #10732 from anlancs/zebra-minor-move
Donatas Abraitis [Mon, 7 Mar 2022 10:15:43 +0000 (12:15 +0200)]
Merge pull request #10732 from anlancs/zebra-minor-move

zebra: Delay the usage of one variable

3 years agolib: grpc: fix handling of "empty" yang type 10741/head
Christian Hopps [Sun, 6 Mar 2022 16:58:26 +0000 (11:58 -0500)]
lib: grpc: fix handling of "empty" yang type

- rather than coerce `const char *` to std:string&, just pass the
C ptr, as that's what is used anyway.

fixes #10578

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: grpc: fix shutdown code
Christian Hopps [Sat, 5 Mar 2022 16:04:43 +0000 (11:04 -0500)]
lib: grpc: fix shutdown code

fixes #9732

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: grpc: initialize uninitialized member variables
Christian Hopps [Sat, 26 Feb 2022 12:55:32 +0000 (07:55 -0500)]
lib: grpc: initialize uninitialized member variables

fixes #9732, fixes #10578

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: grpc: do not remove candidate entry too soon
Christian Hopps [Sun, 6 Mar 2022 11:58:22 +0000 (06:58 -0500)]
lib: grpc: do not remove candidate entry too soon

Fix from Rafael Zalamena <rzalamena@opensourcerouting.org>

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agolib: tweak northbound gRPC default timeout
Rafael Zalamena [Mon, 21 Feb 2022 11:28:11 +0000 (06:28 -0500)]
lib: tweak northbound gRPC default timeout

Don't let open sockets hang for too long. This will fix an issue where a
improperly coded client (e.g. socat) could exaust the amount of open
file descriptors.

Documentation:
https://grpc.github.io/grpc/cpp/md_doc_keepalive.html

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #10734 from ton31337/fix/rpki_read
Jafar Al-Gharaibeh [Sat, 5 Mar 2022 07:55:53 +0000 (01:55 -0600)]
Merge pull request #10734 from ton31337/fix/rpki_read

bgpd: Fix while(read()) for RPKI sync callback

3 years agozebra: Delay the usage of one variable until need 10732/head
anlan_cs [Mon, 7 Feb 2022 04:47:49 +0000 (23:47 -0500)]
zebra: Delay the usage of one variable until need

In the loop, local variable `ip` is always set even if the check condition
is not satisfied.

Avoid the redundant set, move this set exactly after the check condition is
satisfied. Set `ip` only if the check condition is met, otherwise needn't.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agobgpd: Fix while(read()) for RPKI sync callback 10734/head
Donatas Abraitis [Fri, 4 Mar 2022 21:36:34 +0000 (23:36 +0200)]
bgpd: Fix while(read()) for RPKI sync callback

Bad formatting applied and it worked with small amount of prefixes (lurking).

With full BGP feed and full RPKI table, this causes infinity loop.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
3 years agoMerge pull request #10730 from mobash-rasool/fixes
Donald Sharp [Fri, 4 Mar 2022 13:27:11 +0000 (08:27 -0500)]
Merge pull request #10730 from mobash-rasool/fixes

lib: Route-map failed for OSPF routes even for matching prefixes

3 years agolib: Route-map failed for OSPF routes even for matching prefixes 10730/head
Mobashshera Rasool [Fri, 4 Mar 2022 09:21:48 +0000 (01:21 -0800)]
lib: Route-map failed for OSPF routes even for matching prefixes

This issue is applicable to other protocols as well.
When user has used route-map, even though the prefixes are falling
under the permit rule, the prefixes were denied and were shown
as inactive route in zebra.

Reason being the parameter which is of type enum was passed to the api
route_map_get_index and was typecasted to uint8_t *.
This problem is visible in case of Big Endian systems because we are
accessing the most significant byte.

'match_ret' field is an enum in the caller and so it is of 4 bytes,
the typecasting it to 1 byte and passing it to the api made
the api to put the value in the most significant byte
which was already zero previously. Therefore the actual value
RMAP_NOMATCH which was 1 never gets reset in this case.
Therefore the api always returns 'RMAP_NOMATCH' and hence
the prefixes are always denied.

Fixes: #9782
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #10723 from opensourcerouting/bgpd-show-flow-detail
Jafar Al-Gharaibeh [Fri, 4 Mar 2022 05:11:32 +0000 (23:11 -0600)]
Merge pull request #10723 from opensourcerouting/bgpd-show-flow-detail

bgpd: fix 'show bgp detail json' output

3 years agobgpd: fix 'show bgp detail json' output 10723/head
Rafael Zalamena [Tue, 23 Nov 2021 16:28:28 +0000 (13:28 -0300)]
bgpd: fix 'show bgp detail json' output

Include the BGP_SHOW_OPT_DETAIL flag in the 'detail' version of the
command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #10713 from donaldsharp/enum_fixup
Jafar Al-Gharaibeh [Wed, 2 Mar 2022 22:29:46 +0000 (16:29 -0600)]
Merge pull request #10713 from donaldsharp/enum_fixup

lib, ospfd: Enum fixup

3 years agolib: Fix zclient.c `enum event` to `enum zclient_event` 10713/head
Donald Sharp [Wed, 2 Mar 2022 14:19:05 +0000 (09:19 -0500)]
lib: Fix zclient.c `enum event` to `enum zclient_event`

zclient.c is using `enum event` let's rename it to a better
named data structure `enum zclient_event`.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: Convert `enum event` to `enum ospf_apiserver_event`
Donald Sharp [Tue, 1 Mar 2022 22:12:25 +0000 (17:12 -0500)]
ospfd: Convert `enum event` to `enum ospf_apiserver_event`

Let's name this something more appropriate to
what is being done.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agolib: Rename `enum event` to `enum vty_event`
Donald Sharp [Mon, 28 Feb 2022 16:49:43 +0000 (11:49 -0500)]
lib: Rename `enum event` to `enum vty_event`

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10657 from patrasar/pim_remove_in_addr_none
David Lamparter [Wed, 2 Mar 2022 09:42:17 +0000 (10:42 +0100)]
Merge pull request #10657 from patrasar/pim_remove_in_addr_none

[manual merge to edit comment, didn't want to incur another cycle]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopimd: fix stray comment referencing INADDR_NONE
David Lamparter [Wed, 2 Mar 2022 09:41:22 +0000 (10:41 +0100)]
pimd: fix stray comment referencing INADDR_NONE

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10684 from mobash-rasool/join-prune
David Lamparter [Wed, 2 Mar 2022 08:29:02 +0000 (09:29 +0100)]
Merge pull request #10684 from mobash-rasool/join-prune

3 years agoMerge pull request #10652 from mobash-rasool/fixes
Jafar Al-Gharaibeh [Tue, 1 Mar 2022 19:31:49 +0000 (13:31 -0600)]
Merge pull request #10652 from mobash-rasool/fixes

pimd: FRR drops IGMP packets for TOS value other than 0XC0

3 years agoMerge pull request #10697 from donaldsharp/free_bsd_clock_gettime
Jafar Al-Gharaibeh [Tue, 1 Mar 2022 18:48:47 +0000 (12:48 -0600)]
Merge pull request #10697 from donaldsharp/free_bsd_clock_gettime

lib: Fix FreeBSD clock_gettime(CLOCK_THREAD_CPUTIME_ID,..) going back…

3 years agopimd: replace inaddr_none with PIMADDR_ANY 10657/head
sarita patra [Fri, 25 Feb 2022 13:17:08 +0000 (05:17 -0800)]
pimd: replace inaddr_none with PIMADDR_ANY

We can use PIMADDR_ANY instead of INADDR_NONE to initalize rp->rpf_addr
when there is no rp configured for group_all.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agoMerge pull request #10699 from opensourcerouting/vtysh-live-log-coverity
Mark Stapp [Tue, 1 Mar 2022 17:07:08 +0000 (12:07 -0500)]
Merge pull request #10699 from opensourcerouting/vtysh-live-log-coverity

vtysh: fix coverity issues in live-log code

3 years agopim6d: Adding ipv6 mroute INTERFACE X:X::X:X [X:X::X:X]" cli 10393/head
sarita patra [Tue, 1 Mar 2022 02:30:14 +0000 (18:30 -0800)]
pim6d: Adding ipv6 mroute INTERFACE X:X::X:X [X:X::X:X]" cli

This cli is used to add multicast route on interface

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "ipv6 multicast boundary oil WORD" cli
sarita patra [Tue, 1 Mar 2022 02:27:52 +0000 (18:27 -0800)]
pim6d: Adding "ipv6 multicast boundary oil WORD" cli

This cli is used to define multicast boundary on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "ipv6 pim sm" cli
sarita patra [Tue, 1 Mar 2022 02:26:43 +0000 (18:26 -0800)]
pim6d: Adding "ipv6 pim sm" cli

This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "ipv6 pim ssm" cli
sarita patra [Tue, 1 Mar 2022 02:25:29 +0000 (18:25 -0800)]
pim6d: Adding "ipv6 pim ssm" cli

This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "[no] ipv6 pim active-active" cli
sarita patra [Tue, 1 Mar 2022 02:22:19 +0000 (18:22 -0800)]
pim6d: Adding "[no] ipv6 pim active-active" cli

This cli used to mark the interface as active-active.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agovtysh: fix coverity issues in live-log code 10699/head
David Lamparter [Tue, 1 Mar 2022 15:00:40 +0000 (16:00 +0100)]
vtysh: fix coverity issues in live-log code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopim6d: Adding "ipv6 pim hello (1-65535) [(1-65535)]" CLI
sarita patra [Tue, 1 Mar 2022 02:18:42 +0000 (18:18 -0800)]
pim6d: Adding "ipv6 pim hello (1-65535) [(1-65535)]" CLI

This cli used to configure PIMV6 hello and hold timer on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "ipv6 pim dr-priority" CLI
sarita patra [Tue, 1 Mar 2022 02:16:32 +0000 (18:16 -0800)]
pim6d: Adding "ipv6 pim dr-priority" CLI

This cli used to configure PIMV6 dr-priority on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: Adding "ipv6 pim" CLI
sarita patra [Tue, 1 Mar 2022 02:12:22 +0000 (18:12 -0800)]
pim6d: Adding "ipv6 pim" CLI

This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agoMerge pull request #10690 from opensourcerouting/snap-fix-libelf
Donald Sharp [Tue, 1 Mar 2022 14:12:36 +0000 (09:12 -0500)]
Merge pull request #10690 from opensourcerouting/snap-fix-libelf

snapcraft: Add missing libelf-dev build package

3 years agolib: Fix FreeBSD clock_gettime(CLOCK_THREAD_CPUTIME_ID,..) going backwards 10697/head
Donald Sharp [Tue, 1 Mar 2022 14:02:33 +0000 (09:02 -0500)]
lib: Fix FreeBSD clock_gettime(CLOCK_THREAD_CPUTIME_ID,..) going backwards

On FreeBSD I have noticed that subsuquent calls to clock_gettime(..)
can return an after time that is before first calls value.
This in turn is generating CPU_HOG's because the subtraction
is wrapping into very very large numbers:

2022/02/28 20:12:58 SHARP: [PTDQA-70FG5]     start: 35.741981000  now: 35.740581000
2022/02/28 20:12:58 SHARP: [XK9YH-ZD8FA][EC 100663313] CPU HOG: task zclient_read (800744240) ran for 0ms (cpu time 18446744073709550ms)

(Please note I added the first line of debug to figure this issue out).

I have been asked to open a FreeBSD bug report and have done so.
In the mean time I think that it is important that FRR does
not generate bogus CPU HOG's on FreeBSD ( especially since
this may or may not be easily fixed and FRR has no control
over what version of the operating system, operators are
going to be running with FRR.

So, add a bit of specialized code that checks to see if
the after time in FreeBSD is before the now time in
thread_consumed_time and do some quick manipulations
to not have this issue.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10640 from donaldsharp/thread_timers
David Lamparter [Tue, 1 Mar 2022 10:45:36 +0000 (11:45 +0100)]
Merge pull request #10640 from donaldsharp/thread_timers

3 years agoMerge pull request #10584 from donaldsharp/workflow_modification
David Lamparter [Tue, 1 Mar 2022 10:44:57 +0000 (11:44 +0100)]
Merge pull request #10584 from donaldsharp/workflow_modification

3 years agoMerge pull request #10634 from patrasar/master_pimv6_last_lookup
David Lamparter [Tue, 1 Mar 2022 08:39:52 +0000 (09:39 +0100)]
Merge pull request #10634 from patrasar/master_pimv6_last_lookup

3 years agopim6d: Handling pim_rpf for IPV6 10634/head
sarita patra [Wed, 23 Feb 2022 13:03:15 +0000 (05:03 -0800)]
pim6d: Handling pim_rpf for IPV6

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agoMerge pull request #10691 from anlancs/bgp-evpn-check
Donatas Abraitis [Tue, 1 Mar 2022 08:13:15 +0000 (10:13 +0200)]
Merge pull request #10691 from anlancs/bgp-evpn-check

bgpd: fix missing name of default vrf

3 years agopim6d: Handling last_lookup in pim_nexthop for IPV6
sarita patra [Thu, 17 Feb 2022 08:08:31 +0000 (00:08 -0800)]
pim6d: Handling last_lookup in pim_nexthop for IPV6

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agopim6d: moving FRR_PIM_AF_XPATH_VAL into pim_nb.h
sarita patra [Mon, 28 Feb 2022 23:57:47 +0000 (15:57 -0800)]
pim6d: moving FRR_PIM_AF_XPATH_VAL into pim_nb.h

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agosnapcraft: Add missing libelf-dev build package 10690/head
Martin Winter [Mon, 28 Feb 2022 23:41:29 +0000 (00:41 +0100)]
snapcraft: Add missing libelf-dev build package

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #10672 from donaldsharp/bsd_zebra_graceful_restart_cleanup
Jafar Al-Gharaibeh [Mon, 28 Feb 2022 20:57:35 +0000 (14:57 -0600)]
Merge pull request #10672 from donaldsharp/bsd_zebra_graceful_restart_cleanup

Bsd zebra graceful restart cleanup

3 years agoMerge pull request #10683 from donaldsharp/correct_vrf
Jafar Al-Gharaibeh [Mon, 28 Feb 2022 20:47:16 +0000 (14:47 -0600)]
Merge pull request #10683 from donaldsharp/correct_vrf

zebra: Use the routes vrf not the nexthop vrf for route-map application

3 years agoMerge pull request #10682 from mjstapp/fix_zebra_doc
Sri Mohana Singamsetty [Mon, 28 Feb 2022 18:54:31 +0000 (10:54 -0800)]
Merge pull request #10682 from mjstapp/fix_zebra_doc

doc: fix typo in zebra doc

3 years agopimd: Handle pim join/prune recv flow for ipv6 10684/head
Mobashshera Rasool [Mon, 17 Jan 2022 10:07:39 +0000 (02:07 -0800)]
pimd: Handle pim join/prune recv flow for ipv6

Making the code changes to handle both ipv4 and ipv6 in the same code

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agozebra: Use the routes vrf not the vrf of the nexthop for route-map application 10683/head
Donald Sharp [Mon, 28 Feb 2022 18:08:01 +0000 (13:08 -0500)]
zebra: Use the routes vrf not the vrf of the nexthop for route-map application

When a end operator is doing cross vrf imports in bgp:

router bgp 3239 vrf FOO
  address-family ipv4 uni
    import vrf BAR
!

and zebra has this configuration:

vrf FOO
  ip protocol bgp route-map EVA
!

The current code in zebra_nhg.c was looking up the vrf of the
nexthop and attempting to apply the ip protocol route-map.

For most people the nexthop vrf and the re vrf are one and the
same so they never see a problem.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10424 from patrasar/master_pimv6_nht
David Lamparter [Mon, 28 Feb 2022 16:50:42 +0000 (17:50 +0100)]
Merge pull request #10424 from patrasar/master_pimv6_nht

3 years agopim6d: pim_nht changes for pimv6 10424/head
sarita patra [Wed, 16 Feb 2022 12:51:42 +0000 (04:51 -0800)]
pim6d: pim_nht changes for pimv6

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agodoc: fix typo in zebra doc 10682/head
Mark Stapp [Mon, 28 Feb 2022 16:28:25 +0000 (11:28 -0500)]
doc: fix typo in zebra doc

Fix a typo in the zebra doc file that triggers a warning.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agoMerge pull request #10678 from donaldsharp/staticd_make_check_fix
Jafar Al-Gharaibeh [Mon, 28 Feb 2022 15:40:12 +0000 (09:40 -0600)]
Merge pull request #10678 from donaldsharp/staticd_make_check_fix

staticd: Fix `make check` failures

3 years agoMerge pull request #10668 from Jafaral/frr-conf-topotest
Donald Sharp [Mon, 28 Feb 2022 15:28:10 +0000 (10:28 -0500)]
Merge pull request #10668 from Jafaral/frr-conf-topotest

topotests: add support for frr.conf as a unified config

3 years agoMerge pull request #10667 from donaldsharp/bufsize
David Lamparter [Mon, 28 Feb 2022 14:56:51 +0000 (15:56 +0100)]
Merge pull request #10667 from donaldsharp/bufsize

3 years agoMerge pull request #10627 from ton31337/fix/enforce_using_documentation_prefixes
Russ White [Mon, 28 Feb 2022 14:54:09 +0000 (09:54 -0500)]
Merge pull request #10627 from ton31337/fix/enforce_using_documentation_prefixes

doc: Enforce using IPv4/IPv6 reserved ranges for documentation

3 years agoMerge pull request #10636 from ton31337/fix/use_get_set_for_communities
Russ White [Mon, 28 Feb 2022 14:52:50 +0000 (09:52 -0500)]
Merge pull request #10636 from ton31337/fix/use_get_set_for_communities

bgpd: Reuse get/set helpers for attr->community

3 years agodoc: Update documentation to indicate *BSD struggles 10672/head
Donald Sharp [Sun, 27 Feb 2022 19:18:09 +0000 (14:18 -0500)]
doc: Update documentation to indicate *BSD struggles

*BSD has some special struggles associated with the graceful
restart code in zebra.  Add a bit of documentation to outline
this problem and how it is solved.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Get zebra graceful restart working when restarting on *BSD
Donald Sharp [Sun, 27 Feb 2022 19:11:13 +0000 (14:11 -0500)]
zebra: Get zebra graceful restart working when restarting on *BSD

Upon restart zebra reads in the kernel state.  Under linux
there is a mechanism to read the route and convert the protocol
to the correct internal FRR protocol to allow the zebra graceful
restart efforts to work properly.

Under *BSD I do not see a mechanism to convey the original FRR
protocol into the kernel and thus back out of it.  Thus when
zebra crashes ( or restarts ) the routes read back in are kernel
routes and are effectively lost to the system and FRR cannot
remove them properly.  Why?  Because FRR see's kernel routes
as routes that it should not own and in general the admin
distance for those routes will be a better one than the
admin distance from a routing protocol.  This is even
worse because when the graceful restart timer pops and rib_sweep
is run, FRR becomes out of sync with the state of the kernel forwarding
on *BSD.

On restart, notice that the route is a self route that there
is no way to know it's originating protocol.  In this case
let's set the protocol to ZEBRA_ROUTE_STATIC and set the admin
distance to 255.

This way when an upper level protocol reinstalls it's route
the general zebra graceful restart code still works.  The
high admin distance allows the code to just work in a way
that is graceful( HA! )

The drawback here is that the route shows up as a static
route for the time the system is doing it's work.  FRR
could introduce *another* route type but this seems like
a bad idea and the STATIC route type is loosely analagous
to the type of route it has become.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: Prevent crash if ZEBRA_ROUTE_ALL is used for a route type
Donald Sharp [Sun, 27 Feb 2022 19:00:41 +0000 (14:00 -0500)]
zebra: Prevent crash if ZEBRA_ROUTE_ALL is used for a route type

FRR will crash when the re->type is a ZEBRA_ROUTE_ALL and it
is inserted into the meta-queue.  Let's just put some basic
code in place to prevent a crash from happening.  No routing
protocol should be using ZEBRA_ROUTE_ALL as a value but
bugs do happen.  Let's just accept the weird route type
gracefully and move on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10566 from whichbug/master
Russ White [Mon, 28 Feb 2022 14:44:47 +0000 (09:44 -0500)]
Merge pull request #10566 from whichbug/master

isisd: use base64 to encode the binary data.

3 years agoMerge pull request #10353 from opensourcerouting/vtysh-live-log
Donald Sharp [Mon, 28 Feb 2022 14:43:29 +0000 (09:43 -0500)]
Merge pull request #10353 from opensourcerouting/vtysh-live-log

lib & vtysh: RFC5424 syslog + vtysh live log display

3 years agoMerge pull request #9674 from leonshaw/fix/staticd-nht-reg
Donald Sharp [Mon, 28 Feb 2022 14:05:44 +0000 (09:05 -0500)]
Merge pull request #9674 from leonshaw/fix/staticd-nht-reg

staticd: Don't register existing nexthop to zebra

3 years agostaticd: Fix `make check` failures 10678/head
Donald Sharp [Mon, 28 Feb 2022 13:18:55 +0000 (08:18 -0500)]
staticd: Fix `make check` failures

Recent commit:
abc246e19345cbd2bc74c7dc50dac0b9cf2addf8

Has broken `make check` with recently new compilers:

/usr/bin/ld: staticd/libstatic.a(static_nb_config.o): warning: relocation against `zebra_ecmp_count' in read-only section `.text'
  CCLD     tests/bgpd/test_peer_attr
  CCLD     tests/bgpd/test_packet
/usr/bin/ld: staticd/libstatic.a(static_zebra.o): in function `static_zebra_capabilities':
/home/sharpd/frr5/staticd/static_zebra.c:208: undefined reference to `zebra_ecmp_count'
/usr/bin/ld: staticd/libstatic.a(static_zebra.o): in function `static_zebra_route_add':
/home/sharpd/frr5/staticd/static_zebra.c:418: undefined reference to `zebra_ecmp_count'
/usr/bin/ld: staticd/libstatic.a(static_nb_config.o): in function `static_nexthop_create':
/home/sharpd/frr5/staticd/static_nb_config.c:174: undefined reference to `zebra_ecmp_count'
/usr/bin/ld: /home/sharpd/frr5/staticd/static_nb_config.c:175: undefined reference to `zebra_ecmp_count'
/usr/bin/ld: warning: creating DT_TEXTREL in a PIE
collect2: error: ld returned 1 exit status
make: *** [Makefile:8679: tests/lib/test_grpc] Error 1
make: *** Waiting for unfinished jobs....

Essentially the newly introduced variable zebra_ecmp_count is not available in the
libstatic.a compiled and make check has code that compiles against it.

The fix is to just move the variable to the library.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #10639 from patrasar/master_pimv6_upstream
David Lamparter [Mon, 28 Feb 2022 13:10:44 +0000 (14:10 +0100)]
Merge pull request #10639 from patrasar/master_pimv6_upstream

3 years agopim6d: Handling IPV6 in pim_upstream 10639/head
sarita patra [Wed, 23 Feb 2022 13:58:23 +0000 (05:58 -0800)]
pim6d: Handling IPV6 in pim_upstream

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agovtysh: show live log messages 10353/head
David Lamparter [Fri, 6 Dec 2019 12:48:06 +0000 (13:48 +0100)]
vtysh: show live log messages

https://www.youtube.com/watch?v=8psFQCEgA18

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10664 from opensourcerouting/checksum-iov
Donald Sharp [Mon, 28 Feb 2022 12:28:49 +0000 (07:28 -0500)]
Merge pull request #10664 from opensourcerouting/checksum-iov

lib: make checksum code take iovec for input

3 years agovtysh: use poll/callback-driven readline interface
David Lamparter [Wed, 4 Dec 2019 07:10:42 +0000 (08:10 +0100)]
vtysh: use poll/callback-driven readline interface

Create a thread_master and funnel readline terminal I/O through it.
This allows processing other input in parallel, e.g. log messages.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agovtysh: receive file descriptors from daemons
David Lamparter [Tue, 3 Dec 2019 23:17:50 +0000 (00:17 +0100)]
vtysh: receive file descriptors from daemons

The other half of yielding back a file descriptor from a daemon to
vtysh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agopython: improve clippy/clidef macro processing
David Lamparter [Sun, 16 Jan 2022 20:43:55 +0000 (21:43 +0100)]
python: improve clippy/clidef macro processing

Process macros from the current file, and warn if something is
redefined (to a different value).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: implement `terminal monitor` for vtysh
David Lamparter [Wed, 4 Dec 2019 07:10:42 +0000 (08:10 +0100)]
lib: implement `terminal monitor` for vtysh

Adds a new logging target that sends log messages to vtysh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: allow returning a file descriptor over vtysh
David Lamparter [Tue, 3 Dec 2019 23:17:50 +0000 (00:17 +0100)]
lib: allow returning a file descriptor over vtysh

This adds the plumbing necessary to yield back a file descriptor to
vtysh.  The fd is passed on the command status code bytes through
AF_UNIX SCM_RIGHTS.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: add accessor for raw timestamp in zlog
David Lamparter [Sun, 16 Jan 2022 12:20:50 +0000 (13:20 +0100)]
lib: add accessor for raw timestamp in zlog

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #10387 from mobash-rasool/pim-cli-top
David Lamparter [Mon, 28 Feb 2022 12:22:06 +0000 (13:22 +0100)]
Merge pull request #10387 from mobash-rasool/pim-cli-top

3 years agozebra: Limit speed lookup to at most 4 minutes 10640/head
Donald Sharp [Wed, 23 Feb 2022 15:32:23 +0000 (10:32 -0500)]
zebra: Limit speed lookup to at most 4 minutes

There exists some interface types that are slow on startup
to fully register their link speed.  Especially those that
are working with an asic backend.  The speed_update timer
associated with each interface would keep trying if the
system returned a MAX_UINT32 as the speed.  This speed
means both unknown or there is none under linux.

Since some interface types are slow on startup let's modify
FRR to try for at most 4 minutes and give up trying on those
interfaces where we never get any useful data.

Why 4 minutes?  I wanted to balance the time associated with
slow interfaces coming up with those that will never give us
a value.  So I choose 4 minutes as a good ballpark of time
to keep trying

Why not track all those interfaces and just not attempt to
do the speed lookup?  I would prefer to not keep track of these
as that I do not know all the interface types, nor do I wish
to keep programming as new ones come in.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>