Commit Graph

28014 Commits

Author SHA1 Message Date
Ville Skyttä
79cf42e53a debian: include frr@.service in deb
Signed-off-by: Ville Skyttä <ville.skytta@upcloud.com>
2022-03-04 13:10:08 +02:00
Donatas Abraitis
cd16c68376 doc: Drop unnecessary sentence about index.html changes for releases
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-04 09:53:16 +02:00
Donatas Abraitis
5c1d285012 doc: Add a couple of handy commands to get some info for release notes
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2022-03-04 09:46:25 +02:00
Sai Gomathi
6d733f0dbc pimd: Added new option "detail" in the "debug pim nht" CLI
Problem Statement:
=================
PIM Logs are coming at interval of 1 minute although pim
is not enabled.

Root Cause Analysis:
====================
By default, RCPM configures the PIM debugs when router comes up
via script. The product cannot disable PIM even though it is not required.
Hence moving these logs under a new debug option which will not be
enabled by default.

Fix:
====
Added a new option "detail" in the cli:
debug pim nht detail

Co-author: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Sai Gomathi <nsaigomathi@vmware.com>
2022-03-03 22:33:20 -08:00
Jafar Al-Gharaibeh
7469f084f3
Merge pull request #10723 from opensourcerouting/bgpd-show-flow-detail
bgpd: fix 'show bgp detail json' output
2022-03-03 23:11:32 -06:00
Jafar Al-Gharaibeh
f73b0cc825 tests: add a topotest for ospf, mutli vrf, and route leaking
Test ospf running with 3 vrfs: default, neno, ray
Route leaking is setup via bgp between default and neno vrfs
Leaked routes include connected and ospf

Included test:
 1- OSPF convergnce
 2- zebra/kernel routes

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2022-03-03 23:09:15 -06:00
Chirag Shah
d5fdae8f45 zebra: fix crash in evpn neigh cleanup all
zebra crash is seen during shutdown (frr restart).

During shutdown, remote neigh and remote mac clean up
is triggered first, followed by per vni all neigh
(including local) and macs cleanup is triggered.

The crash occurs when a remote mac is cleaned up first
and its reference is remained in local neigh.
When local neigh attempt removes itself from its associated
mac's neigh_list it triggers inaccessible memory crash.

The fix is during mac deletion if its neigh_list is non-empty
then retain the MAC in AUTO state.
This can arise when MAC and neigh duo are in different state
(remote/local). Otherwise, the order of cleanup operation
is neighs followed by macs.

The auto mac will be cleaned up when per vni all neighs and macs
are cleaned up.

Ticket:CM-29826
Reviewed By:CCR-10369
Testing Done:

Configure evpn symmetric config where
MAC is in remote state and neigh is in local state.
Perform frr restart then crash is not seen.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-03-03 14:59:56 -08:00
Rafael Zalamena
3c1f92018b lib: rotate log file supplied by command line
Call `zlog_file_rotate` for command file lines as well otherwise on
`SIGUSR1` the old descriptor will still be used and no new log file will
be created for the rotation.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-03-03 18:28:08 -03:00
Rafael Zalamena
5be6fa9bf0 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>
2022-03-03 18:26:03 -03:00
Donald Sharp
8b48cdb913 zebra: Prevent installation of connected multiple times
With recent changes to interface up mechanics in if_netlink.c
FRR was receiving as many as 4 up events for an interface
on ifdown/ifup events.  This was causing timing issues
in FRR based upon some fun timings.  Remove this from
happening.

Ticket: CM-31623
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-02 18:34:32 -08:00
Chirag Shah
d78fa57195 zebra: protodown-up event trigger interface up
Vxlan interfaces flap (protodown/up) event,
non ptm operative interfaces do not come up
as protodown up event do not trigger "if_up()"
event.

Ticket:CM-30477
Reviewed By:CCR-10681
Testing Done:

validated interfaces flaps, ip link down, ifdown
and protodown followed by UP event. all Vxlan interfaces
come up in bgpd post flap.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-03-02 18:16:56 -08:00
Chirag Shah
2d04bd98ac zebra: handle protodown netlink for vxlan device
Frr need to handle protocol down event for vxlan
interface.
In MLAG scenario, one of the pair switch can put
vxlan port to protodown state, followed by
tunnel-ip change from anycast IP to individual IP.

In absence of protodown handling, evpn end up
advertising locally learn EVPN (MAC-IP) routes
with individual IP as nexthop.
This leads an issue of overwriting locally learn
entries as remote on MLAG pair.

Ticket:CM-24545
Reviewed By:CCR-10310
Testing Done:

In EVPN deployment, restart one of the MLAG
daemon, which puts vxlan interfaces in protodown state.
FRR treats protodown as oper down for vxlan interfaces.
VNI down cleans up/withdraws locally learn routes.
Followed by vxlan device UP event, re-advertise
locally learn routes.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2022-03-02 17:40:44 -08:00
Jafar Al-Gharaibeh
4190587a3f
Merge pull request #10713 from donaldsharp/enum_fixup
lib, ospfd: Enum fixup
2022-03-02 16:29:46 -06:00
Donald Sharp
5f503e5f5a lib: Fix corruption when routemap delete/add sequence happens
If a operator issues a series of route-map deletions and
then re-adds, *and* this triggers the hash table to realloc
to grow to a larger size, then subsuquent route-map operations
will be against a corrupted hash table.

Why?

Effectively the route-map code was inserting each
route-map <NAME> into a hash for storage.  Upon
deletion there is this concept of delayed processing
so the routemap code sets a bit `to-be-processed`
and marks the route-map for deletion.  This is
1 entry in the hash table.  Then if the operator
recreates the hash, FRR would add another hash
entry.  If another deletion happens then there
now are 2 deletion entries that are indistinguishable
from a hash perspective.

FRR stores the deleted name of the route-map so that
any delayed processing can lookup the name and only process
those peers that are related to that route-map name.
This is good as that if in say BGP, we do not want
to reprocess all the peers that don't use the route-map.

Solution:
The whole purpose of the delay of deletion and the
storage of the route-map is to allow the using protocol
the ability to process the route-map at a later time
while still retaining the route-map name( for more efficient
reprocessing ).  The problem exists because we are keeping
multiple copies of deletion events that are indistinguishable
from each other causing hash havoc.

The truth is that we only need to keep 1 copy of the
routemap in the table.  If the series of events is:
a) delete ( schedule processing )
b) add ( reschedule processing )

Current code ends up processing the route-map two times
and in this event we really just need to reprocess everything
with the new route-map.

If the series of events is:
a) delete (schedule processing )
b) add (reschedule)
c) delete (reschedule)
d) add (reschedule)

All this really points to is that FRR just needs to keep the last
in the series of maps and ensuring that FRR knows that we need
to continue processing the route-map.  So in the creation processing
if the hash has an entry for this map, the routemap code knows that
this is a deletion event.  Mark this route-map for later processing
if it was marked so.  Also in the lookup function do not return
a map if the map found was deleted.

Fixes: #10708
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-02 15:41:54 -05:00
Rafael Zalamena
54aeec5ef0 lib,vtysh: show operational data with config
Add option to merge configuration data in the operational data show
command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-03-02 16:37:43 -03:00
Renato Westphal
9b40fa1eae lib: fix iteration over YANG presence containers
State-only and configuration presence-containers need to be treated
differently when iterating over YANG operational data. Currently the
get_elem() callback is used to know when a state-only p-container
exists or not, and configuration p-containers are assumed to always
exist, which is clearly wrong. Fix this by checking the running
configuration to know whether a rw p-container exists or not.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2022-03-02 16:32:05 -03:00
Rafael Zalamena
852dfb3013 lib: fix show yang operational state output
Don't show default configuration values for state nodes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2022-03-02 16:31:47 -03:00
Javier Garcia
432f143212 topotest: Add test for isis json cmds.
Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
2022-03-02 16:21:29 +01:00
Javier Garcia
a2cac12a63 isisd: Add json to show isis database command.
Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
2022-03-02 16:20:44 +01:00
Donald Sharp
91f2045d53 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>
2022-03-02 09:19:05 -05:00
Donald Sharp
14416b1f33 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>
2022-03-02 09:17:57 -05:00
Donald Sharp
55a70ffb78 lib: Rename enum event to enum vty_event
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2022-03-02 09:17:47 -05:00
David Lamparter
0455229c5d pim6d: reenable NHT code
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-02 11:01:47 +01:00
David Lamparter
bc97f40dff pim6d: fixup NHT code for IPv6
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-02 11:01:46 +01:00
David Lamparter
6564f5e5a5 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>
2022-03-02 10:42:17 +01:00
David Lamparter
b369d0cc40 pimd: fix stray comment referencing INADDR_NONE
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-02 10:41:22 +01:00
David Lamparter
f2ec36de77
Merge pull request #10684 from mobash-rasool/join-prune 2022-03-02 09:29:02 +01:00
Jafar Al-Gharaibeh
5aad2b6a82
Merge pull request #10652 from mobash-rasool/fixes
pimd: FRR drops IGMP packets for TOS value other than 0XC0
2022-03-01 13:31:49 -06:00
Jafar Al-Gharaibeh
ec616c97ba
Merge pull request #10697 from donaldsharp/free_bsd_clock_gettime
lib: Fix FreeBSD clock_gettime(CLOCK_THREAD_CPUTIME_ID,..) going back…
2022-03-01 12:48:47 -06:00
sarita patra
cc144e8b6b 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>
2022-03-01 09:45:56 -08:00
Mark Stapp
33fec964f7
Merge pull request #10699 from opensourcerouting/vtysh-live-log-coverity
vtysh: fix coverity issues in live-log code
2022-03-01 12:07:08 -05:00
Javier Garcia
a21177f280 isisd: Add json to show isis neighbor command.
Signed-off-by: Javier Garcia <javier.martin.garcia@ibm.com>
2022-03-01 17:57:21 +01:00
sarita patra
63ee25c0ba 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>
2022-03-01 07:23:45 -08:00
sarita patra
52c52d7806 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>
2022-03-01 07:23:45 -08:00
sarita patra
2b16b40fc7 pim6d: Adding "ipv6 pim sm" cli
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:44 -08:00
sarita patra
dab0ac2955 pim6d: Adding "ipv6 pim ssm" cli
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 07:23:44 -08:00
sarita patra
7e01b641ae 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>
2022-03-01 07:23:42 -08:00
David Lamparter
3030e7b5ac vtysh: fix coverity issues in live-log code
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2022-03-01 16:00:56 +01:00
sarita patra
e6aab61395 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>
2022-03-01 06:26:13 -08:00
sarita patra
bb387611c6 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>
2022-03-01 06:24:16 -08:00
sarita patra
a1caf7a88f pim6d: Adding "ipv6 pim" CLI
This cli used to enable PIMV6 on interface.

Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 06:24:14 -08:00
Donald Sharp
d3689deef2
Merge pull request #10690 from opensourcerouting/snap-fix-libelf
snapcraft: Add missing libelf-dev build package
2022-03-01 09:12:36 -05:00
Donald Sharp
4e2839de64 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>
2022-03-01 09:08:32 -05:00
David Lamparter
2821405a69
Merge pull request #10640 from donaldsharp/thread_timers 2022-03-01 11:45:36 +01:00
David Lamparter
17dd5ca8f8
Merge pull request #10584 from donaldsharp/workflow_modification 2022-03-01 11:44:57 +01:00
David Lamparter
145ce1825c
Merge pull request #10634 from patrasar/master_pimv6_last_lookup 2022-03-01 09:39:52 +01:00
sarita patra
3e394a7729 pim6d: Handling pim_rpf for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
2022-03-01 06:30:03 -08:00
Donatas Abraitis
4e6e0ac2bf
Merge pull request #10691 from anlancs/bgp-evpn-check
bgpd: fix missing name of default vrf
2022-03-01 10:13:15 +02:00
sarita patra
113f29b90d pim6d: Handling last_lookup in pim_nexthop for IPV6
Signed-off-by: sarita patra <saritap@vmware.com>
2022-02-28 18:03:12 -08:00
sarita patra
d4addb4839 pim6d: moving FRR_PIM_AF_XPATH_VAL into pim_nb.h
Signed-off-by: sarita patra <saritap@vmware.com>
2022-02-28 15:57:47 -08:00