]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
2 years agotoptests/isis_sr_te_topo1: test out-of-order route/route-map changes 11236/head
G. Paul Ziemba [Fri, 20 May 2022 16:26:56 +0000 (09:26 -0700)]
toptests/isis_sr_te_topo1: test out-of-order route/route-map changes

    A SR policy matches a BGP nexthop based on the IP address of
    the nexthop and the color of the route (color may be assigned
    to routes using a route-map).

    The order of events (BGP route arrival, route-map definition,
    policy and candidate-path definition) should not affect the
    matching/mapping.

    These changes add tests for:

- removing/adding BGP route after policy and routemap are
  defined and held constant

- changing route map color to be different from policy color,
  and then changing back to match

    after each change, the policy should be observed to be in effect
    unchanged from before, i.e., the route's nexthops should reflect
    the matching SR policy.

Signed-off-by: G. Paul Ziemba <paulz@labn.net>
2 years agoMerge pull request #11477 from LabNConsulting/chopps/fix-config-load
Donald Sharp [Sat, 25 Jun 2022 14:19:02 +0000 (10:19 -0400)]
Merge pull request #11477 from LabNConsulting/chopps/fix-config-load

tools: fix boot config load in watchfrr

2 years agotools: fix boot config load in watchfrr 11477/head
Christian Hopps [Fri, 24 Jun 2022 22:44:43 +0000 (18:44 -0400)]
tools: fix boot config load in watchfrr

2469a37f reversed the logic of the existence check for
/etc/frr/frr.conf breaking boot config loading, fix it.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #11429 from donaldsharp/interface_funkiness
Donatas Abraitis [Fri, 24 Jun 2022 20:07:45 +0000 (23:07 +0300)]
Merge pull request #11429 from donaldsharp/interface_funkiness

zebra: Fix rtadv startup when config read in is before interface up

2 years agoMerge pull request #11475 from patrasar/pim_if_delete
Donald Sharp [Fri, 24 Jun 2022 18:49:55 +0000 (14:49 -0400)]
Merge pull request #11475 from patrasar/pim_if_delete

pimd: fix pim interface deletion flow

2 years agoMerge pull request #11472 from panlinux/obsolete-egrep
Donald Sharp [Fri, 24 Jun 2022 16:43:41 +0000 (12:43 -0400)]
Merge pull request #11472 from panlinux/obsolete-egrep

frr.postinst: egrep is deprecated

2 years agoMerge pull request #11471 from mobash-rasool/fixes
Donald Sharp [Fri, 24 Jun 2022 16:02:35 +0000 (12:02 -0400)]
Merge pull request #11471 from mobash-rasool/fixes

pimd: Clean up mroute_socket when pim terminates.

2 years agoMerge pull request #11468 from patrasar/pim_valgrind_fix
Donald Sharp [Fri, 24 Jun 2022 15:53:43 +0000 (11:53 -0400)]
Merge pull request #11468 from patrasar/pim_valgrind_fix

 pimd: Fixing invalid memory access

2 years agoMerge pull request #11469 from donaldsharp/fdev2
Jafar Al-Gharaibeh [Fri, 24 Jun 2022 15:05:56 +0000 (10:05 -0500)]
Merge pull request #11469 from donaldsharp/fdev2

zebra: netlink rtm tunnel msg parsing

2 years agoMerge pull request #11242 from patrasar/pimv6_issue_11233
Donald Sharp [Fri, 24 Jun 2022 14:56:48 +0000 (10:56 -0400)]
Merge pull request #11242 from patrasar/pimv6_issue_11233

pim6d: Fixing repeated group source field in show ipv6 mroute

2 years agopimd: fix pim interface deletion flow 11475/head
Sarita Patra [Fri, 24 Jun 2022 14:48:03 +0000 (07:48 -0700)]
pimd: fix pim interface deletion flow

Deletion of pim interface(pim_if_delete) should
do the below things before cleanup.
1. Send a hello message with zero hold time.
2. Delete all the neighbors.
3. Close the pim socket.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #11464 from donaldsharp/linkdown
Russ White [Fri, 24 Jun 2022 14:15:55 +0000 (10:15 -0400)]
Merge pull request #11464 from donaldsharp/linkdown

Linkdown

2 years agoMerge pull request #11467 from mobash-rasool/fixes2
Donald Sharp [Fri, 24 Jun 2022 14:05:42 +0000 (10:05 -0400)]
Merge pull request #11467 from mobash-rasool/fixes2

pimd: Avoid accessing freed memory

2 years agoMerge pull request #11258 from anlancs/fix/zebra-keep-nb-check
Donald Sharp [Fri, 24 Jun 2022 13:46:12 +0000 (09:46 -0400)]
Merge pull request #11258 from anlancs/fix/zebra-keep-nb-check

zebra: move the checks for l3vni

2 years agodebian: egrep is deprecated 11472/head
Andreas Hasenack [Fri, 24 Jun 2022 12:54:37 +0000 (09:54 -0300)]
debian: egrep is deprecated

egrep is deprecated, please see
https://git.savannah.gnu.org/cgit/grep.git/commit/?id=a9515624709865d480e3142fd959bccd1c9372d1

Signed-off-by: Andreas Hasenack <andreas.hasenack@canonical.com>
2 years agopimd: fix invalid memory access join_timer_stop 11468/head
Sarita Patra [Fri, 24 Jun 2022 10:04:37 +0000 (03:04 -0700)]
pimd: fix invalid memory access join_timer_stop

Issue:
==16837== Invalid read of size 8
==16837==    at 0x17971C: pim_neighbor_find (pim_neighbor.c:431)
==16837==    by 0x186439: join_timer_stop (pim_upstream.c:348)
==16837==    by 0x186794: pim_upstream_del (pim_upstream.c:231)
==16837==    by 0x189A66: pim_upstream_terminate (pim_upstream.c:1951)
==16837==    by 0x17111B: pim_instance_terminate (pim_instance.c:54)
==16837==    by 0x17111B: pim_vrf_delete (pim_instance.c:172)
==16837==    by 0x4F1D6C8: vrf_delete (vrf.c:264)
==16837==    by 0x19006F: pim_terminate (pimd.c:160)
==16837==    by 0x1B2E4D: pim_sigterm (pim_signals.c:51)
==16837==    by 0x4F08FA2: frr_sigevent_process (sigevent.c:130)
==16837==    by 0x4F1A2CC: thread_fetch (thread.c:1771)
==16837==    by 0x4ED4F92: frr_run (libfrr.c:1197)
==16837==    by 0x15D81A: main (pim_main.c:176)

Root Cause:
In the pim_terminate flow, the interface is deleted
before the pim_interface clean up. Because of this,
the pim_interface is having garbage value.

Fix:
Release the pim interface memory and then delete the
interface.

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agopimd: Clean up mroute_socket when pim terminates. 11471/head
Mobashshera Rasool [Fri, 24 Jun 2022 12:36:15 +0000 (05:36 -0700)]
pimd: Clean up mroute_socket when pim terminates.

pim_mroute_socket_disable api is present but nowhere called.
This should be called when pim instance is terminated.
Fixed it.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11462 from donaldsharp/random_stuff_right
mobash-rasool [Fri, 24 Jun 2022 11:53:31 +0000 (17:23 +0530)]
Merge pull request #11462 from donaldsharp/random_stuff_right

Random stuff right

2 years agopim6d: Fixing repeated group source field in show ipv6 mroute 11242/head
sarita patra [Sat, 21 May 2022 16:05:10 +0000 (09:05 -0700)]
pim6d: Fixing repeated group source field in show ipv6 mroute

The command "show ip[v6] mroute" displaying group and source
field for every OIL.

Fix:
Display group and source for the first OIL only.

Signed-off-by: sarita patra <saritap@vmware.com>
2 years agozebra: netlink rtm tunnel msg parsing 11469/head
Chirag Shah [Tue, 25 Jan 2022 18:25:38 +0000 (10:25 -0800)]
zebra: netlink rtm tunnel msg parsing

'bridge vni add vni <id> dev <vxlan device>'
generates new RTM_NEWTUNNEL and RTM_DELTUNNEL
to add or remove vni to l3vxlan device.

Register new RTNLGRP_TUNNEL group to receive
new netlink notification.
Callback for the new RTM_xxxTUNNEL.

kernel patches:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?h=v5.18-rc7&id=7b8135f4df98b155b23754b6065c157861e268f1

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/
linux.git/commit/?h=v5.18-rc7&id=f9c4bb0b245cee35ef66f75bf409c9573d934cf9

Ticket:#3073812
Testing Done:

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Chirag Shah <chirag@nvidia.com>
2 years agoMerge pull request #11430 from mjstapp/fix_ospf6_zebra_del
Rafael Zalamena [Fri, 24 Jun 2022 11:21:48 +0000 (08:21 -0300)]
Merge pull request #11430 from mjstapp/fix_ospf6_zebra_del

ospf6: permit route delete without nexthops

2 years agozebra: Fix rtadv startup when config read in is before interface up 11429/head
Donald Sharp [Fri, 17 Jun 2022 15:23:31 +0000 (11:23 -0400)]
zebra: Fix rtadv startup when config read in is before interface up

When a interface is configured with this:
int eva
  ipv6 nd ra-interval 5
  no ipv6 nd suppress-ra
!

And then subsuquently the interface is created and brought up, FRR
would both error on joining the RA multicast address and never
properly work in this state.

Delay the startup of the join and start of the Router Advertisements
until after the ifindex has actually been found.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11457 from plsaranya/pim_mroute
Donald Sharp [Fri, 24 Jun 2022 11:07:03 +0000 (07:07 -0400)]
Merge pull request #11457 from plsaranya/pim_mroute

Pim6d: Mroute file duplication removal

2 years agoMerge pull request #11465 from rgirada/pam_coverity
Donald Sharp [Fri, 24 Jun 2022 11:02:38 +0000 (07:02 -0400)]
Merge pull request #11465 from rgirada/pam_coverity

vtysh: Account validity should be verified when authenticating users with PAM

2 years agopimd: Avoid reading freed memory. 11467/head
Mobashshera Rasool [Fri, 24 Jun 2022 06:47:09 +0000 (23:47 -0700)]
pimd: Avoid reading freed memory.

If the upstream is freed in pim_upstream_del, then trying to
call pim_upstream_timers_stop will lead to accessing freed memory.

Fix:
Stop the timer only if upstream is not deleted.

Co-authored-by: Sarita Patra <saritap@vmware.com>
Co-authored-by: Mobashshera Rasool <mrasool@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11452 from donaldsharp/realm_fix_nexthop_groups
Rafael Zalamena [Fri, 24 Jun 2022 10:44:40 +0000 (07:44 -0300)]
Merge pull request #11452 from donaldsharp/realm_fix_nexthop_groups

Realm fix nexthop groups

2 years agovtysh: Account validity should be verified when authenticating users with PAM. 11465/head
rgirada [Thu, 23 Jun 2022 14:37:28 +0000 (07:37 -0700)]
vtysh: Account validity should be verified when authenticating users with PAM.

Description:
SonarQube detects the following behaviour as a vulanarability.
When authenticating users using PAM, it is strongly recommended to
check the validity of the account (not locked, not expired ...),
otherwise it leads to unauthorized access to resources.

pam_acct_mgmt() should be called for account validity after
calling pam_authenticate().

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2 years agodoc: Update doc w/ regards to realms 11452/head
Donald Sharp [Tue, 21 Jun 2022 19:24:58 +0000 (15:24 -0400)]
doc: Update doc w/ regards to realms

Update the documentation with realms and how they
interact with nexthop groups that are installed into
the kernel.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11453 from ribarroetavena/master
Donald Sharp [Thu, 23 Jun 2022 17:55:51 +0000 (13:55 -0400)]
Merge pull request #11453 from ribarroetavena/master

zebra: rtnetlink: flow attr per gateway attr in multipath updates

2 years agoMerge pull request #11460 from LabNConsulting/chopps/ospfapi-routerid
Donald Sharp [Thu, 23 Jun 2022 17:52:09 +0000 (13:52 -0400)]
Merge pull request #11460 from LabNConsulting/chopps/ospfapi-routerid

Chopps/ospfapi routerid

2 years agopimd: Checks imply that pim is not properly configured 11462/head
Donald Sharp [Wed, 22 Jun 2022 23:40:58 +0000 (19:40 -0400)]
pimd: Checks imply that pim is not properly configured

The call to gm_update_ll checks for null pointers and
implies to SA that things could not be configured correctly
This is not true with the code flow.  Remove the confusing code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Let end operator know the ifindex as well in failure case
Donald Sharp [Wed, 22 Jun 2022 13:57:08 +0000 (09:57 -0400)]
pimd: Let end operator know the ifindex as well in failure case

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: Ensure that ospf6d does not memcpy beyond end of data
Donald Sharp [Wed, 22 Jun 2022 12:24:03 +0000 (08:24 -0400)]
ospf6d: Ensure that ospf6d does not memcpy beyond end of data

Ensure that received data size can fit into temp variable
that is used to dump data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopimd: Limit pim's ecmp to what zebra tells us is the multipath
Donald Sharp [Wed, 22 Jun 2022 12:12:04 +0000 (08:12 -0400)]
pimd: Limit pim's ecmp to what zebra tells us is the multipath

Zebra can be setup to use a value that is less than MULTIPATH_NUM.
When pimd connects to zebra, zebra will inform pim about the MULTIPATH_NUM
used.  Let's use that value for figuring out our multipath value.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Cleanup pointer assignment so compiler doesn't get confused
Donald Sharp [Wed, 22 Jun 2022 11:48:51 +0000 (07:48 -0400)]
bgpd: Cleanup pointer assignment so compiler doesn't get confused

Coverity SA thinks that the `struct prefix`.u.prefix4 is limited
to actually 4 bytes of memory at that spot, but it's in a union
and it can be treated as a prefix6 as well.  Just change the
pointer assignment to something that covers both easily.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoisisd: Let's use an actual NULL pointer to test for a NULL pointer
Donald Sharp [Sat, 18 Jun 2022 18:54:52 +0000 (14:54 -0400)]
isisd: Let's use an actual NULL pointer to test for a NULL pointer

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11463 from rgirada/ospf_coverity
Donald Sharp [Thu, 23 Jun 2022 17:16:48 +0000 (13:16 -0400)]
Merge pull request #11463 from rgirada/ospf_coverity

ospfd: fixing few coverity issue in 'show_ip_ospf_neighbour_brief'

2 years agoMerge pull request #11182 from g-balaji1/pimv6-sock-hdrincl
mobash-rasool [Thu, 23 Jun 2022 16:46:47 +0000 (22:16 +0530)]
Merge pull request #11182 from g-balaji1/pimv6-sock-hdrincl

pim6d: Removal of IPV6_HDRINCL option

2 years agozebra: Allow kernel routes to stick around better on interface state changes 11464/head
Donald Sharp [Thu, 23 Jun 2022 16:22:30 +0000 (12:22 -0400)]
zebra: Allow kernel routes to stick around better on interface state changes

Currently kernel routes on system bring up would be `auto-accepted`,
then if an interface went down all kernel and system routes would
be re-evaluated.  There exists situations where a kernel route can
exist but the interface itself is not exactly in a state that is
ready to create a connected route yet.  As such when any interface
goes down in the system all kernel/system routes would be re-evaluated
and then since that interfaces connected route is not in the table yet
the route is matching against a default route( or not at all ) and
is being dropped.

Modify the code such that kernel or system routes just look for interface
being in a good state (up or operative) and accept it.

Broken code:
eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp39s0, 00:05:08
K>* 1.2.3.5/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.6/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.7/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.8/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.9/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.10/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.12/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.13/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.14/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.16/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 1.2.3.17/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
C>* 4.5.6.99/32 is directly connected, dummy9, 00:05:08
K>* 4.9.10.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:05:08
K>* 10.11.12.13/32 [0/0] via 192.168.119.1, enp39s0, 00:05:08
C>* 192.168.10.0/24 is directly connected, dummy99, 00:05:08
C>* 192.168.119.0/24 is directly connected, enp39s0, 00:05:08
<shutdown a non-related interface>
eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp39s0, 00:05:28
C>* 4.5.6.99/32 is directly connected, dummy9, 00:05:28
K>* 10.11.12.13/32 [0/0] via 192.168.119.1, enp39s0, 00:05:28
C>* 192.168.10.0/24 is directly connected, dummy99, 00:05:28
C>* 192.168.119.0/24 is directly connected, enp39s0, 00:05:28

Working code:
eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp39s0, 00:00:04
K>* 1.2.3.5/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.6/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.7/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.8/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.9/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.10/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.12/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.13/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.14/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.16/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 1.2.3.17/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
C>* 4.5.6.99/32 is directly connected, dummy9, 00:00:04
K>* 4.9.10.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:04
K>* 10.11.12.13/32 [0/0] via 192.168.119.1, enp39s0, 00:00:04
C>* 192.168.10.0/24 is directly connected, dummy99, 00:00:04
C>* 192.168.119.0/24 is directly connected, enp39s0, 00:00:04
<shutdown a non-related interface>
eva# show ip route
Codes: K - kernel route, C - connected, S - static, R - RIP,
       O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
       T - Table, v - VNC, V - VNC-Direct, A - Babel, D - SHARP,
       F - PBR, f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

K>* 0.0.0.0/0 [0/100] via 192.168.119.1, enp39s0, 00:00:15
K>* 1.2.3.5/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.6/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.7/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.8/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.9/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.10/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.12/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.13/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.14/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.16/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 1.2.3.17/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
C>* 4.5.6.99/32 is directly connected, dummy9, 00:00:15
K>* 4.9.10.11/32 [0/0] via 172.22.0.44, br-23e378ed7fd2 linkdown, 00:00:15
K>* 10.11.12.13/32 [0/0] via 192.168.119.1, enp39s0, 00:00:15
C>* 192.168.10.0/24 is directly connected, dummy99, 00:00:15
C>* 192.168.119.0/24 is directly connected, enp39s0, 00:00:15
eva#

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Add interface sysctl ignore on linkdown status
Donald Sharp [Thu, 23 Jun 2022 15:00:08 +0000 (11:00 -0400)]
zebra: Add interface sysctl ignore on linkdown status

Add the ability to decode the ignore on linkdown nexthop
status for an interface.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib, zebra: Notice when a nexthop is set linkdown
Donald Sharp [Thu, 23 Jun 2022 14:27:56 +0000 (10:27 -0400)]
lib, zebra: Notice when a nexthop is set linkdown

When a nexthop is set RTNH_F_LINKDOWN, start noticing
that this flag is set.  Allow FRR to know about this
flag but at this point do not do anything with it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: Increase nexthop flags size to 16 bits
Donald Sharp [Thu, 23 Jun 2022 14:22:45 +0000 (10:22 -0400)]
lib: Increase nexthop flags size to 16 bits

commit: 5609e70fb87a3b23b55629a33e5afb298974c142
Added a new flag to the `struct nexthop` and
this addition of a flag caused the flags size to
be too small.  Increase the size of flags to
allow more flags to be had.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Fix bug in netconf handling where dplane would drop the change
Donald Sharp [Thu, 23 Jun 2022 15:14:46 +0000 (11:14 -0400)]
zebra: Fix bug in netconf handling where dplane would drop the change

When reading a on the fly change of an interested netconf netlink
message. The ifindex and ns_id for the context was being set for the sub structure
but not for the main context data structure and zebra_if_dplane_result
was dropping the result on the floor because it was expecting the ns_id and
the interface id to be in a different spot.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: rtnetlink: flow attr per gateway attr in multipath updates 11453/head
Ricardo [Tue, 21 Jun 2022 19:13:08 +0000 (16:13 -0300)]
zebra: rtnetlink: flow attr per gateway attr in multipath updates

Signed-off-by: Ricardo <rbarroetavena@anura.com.ar>
2 years agoPim6d: Mroute file duplication removal 11457/head
plsaranya [Wed, 22 Jun 2022 10:35:07 +0000 (03:35 -0700)]
Pim6d: Mroute file duplication removal

Mroute duplicate functions removed and made us hybrid for v4 and v6

Signed-off-by: plsaranya <Saranya_Panjarathina@dell.com>
2 years agoospfd: fixing few coverity issue in 'show_ip_ospf_neighbour_brief' 11463/head
rgirada [Thu, 23 Jun 2022 13:40:19 +0000 (06:40 -0700)]
ospfd: fixing few coverity issue in 'show_ip_ospf_neighbour_brief'

Description:
timerval data structure is being used without initialization.
Using these uninitialized parameters can lead unexpected results
so initializing before using it.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2 years agoMerge pull request #10629 from leonshaw/fix/mp-evpn-nh
Russ White [Thu, 23 Jun 2022 11:00:33 +0000 (07:00 -0400)]
Merge pull request #10629 from leonshaw/fix/mp-evpn-nh

lib, zebra, bgpd: Move route EVPN flag to nexthop

2 years agotests: add ospf api router ID topotest 11460/head
Christian Hopps [Wed, 22 Jun 2022 20:08:31 +0000 (16:08 -0400)]
tests: add ospf api router ID topotest

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfclient: add router id support to python client
Christian Hopps [Wed, 22 Jun 2022 20:12:36 +0000 (16:12 -0400)]
ospfclient: add router id support to python client

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoospfd: add router id support to ospf api
Christian Hopps [Wed, 22 Jun 2022 22:10:13 +0000 (18:10 -0400)]
ospfd: add router id support to ospf api

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agozebra: move the check for l3vni 11258/head
anlan_cs [Thu, 19 May 2022 01:55:33 +0000 (21:55 -0400)]
zebra: move the check for l3vni

The two checks for l3vni have been already done in
`lib_vrf_zebra_l3vni_id_modify()` as it should be. And it is improper that
the two checks are put after `zebra_vxlan_handle_vni_transition()`, which
will do real things.

My original fix is to remove them. But NB module can't guarantee many changes,
so we'd better keep them in `zebra_vxlan_process_vrf_vni_cmd()` in APPLY stage
for safe.

Just move them in front of `zebra_vxlan_handle_vni_transition()`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #11437 from rgirada/ospf_nbr
Russ White [Wed, 22 Jun 2022 18:54:08 +0000 (14:54 -0400)]
Merge pull request #11437 from rgirada/ospf_nbr

ospfd: Fixing "show ip ospf neighbour <nbrid>" command

2 years agoospfd: Fixing "show ip ospf neighbour <nbrid>" command 11437/head
rgirada [Sun, 19 Jun 2022 18:04:39 +0000 (11:04 -0700)]
ospfd: Fixing "show ip ospf neighbour <nbrid>" command

Description:
"show ip ospf neighbour [nbrid] [json]" is expected to give brief output
of the specific neighbour. But it gives the detailed output without
the detail keyword.
"show ip ospf neighbour [nbrid] [deatil] [json]" command is failed to
fetch the ecpected o/p. Corrected it.

Ex o/p:
frr(config-if)# do show ip ospf  neighbor

Neighbor ID     Pri State           Up Time         Dead Time Address         Interface                        RXmtL RqstL DBsmL
8.8.8.8           1 Full/DR         17m03s            31.192s 20.1.1.194      ens192:20.1.1.220                    0     0     0
30.1.1.100        1 Full/DR         56.229s           32.000s 30.1.1.100      ens224:30.1.1.220                    0     0     0

frr(config-if)#
frr(config-if)#
frr(config-if)# do show ip ospf  neighbor 8.8.8.8
Neighbor 8.8.8.8, interface address 20.1.1.194
In the area 0.0.0.0 via interface ens192
Neighbor priority is 1, State is Full/DR, 6 state changes
Most recent state change statistics:
  Progressive change 17m18s ago
DR is 20.1.1.194, BDR is 20.1.1.220
Options 2 *|-|-|-|-|-|E|-
Dead timer due in 35.833s
Database Summary List 0
Link State Request List 0
Link State Retransmission List 0
Thread Inactivity Timer on
Thread Database Description Retransmision off
Thread Link State Request Retransmission on
Thread Link State Update Retransmission on

Graceful restart Helper info:
  Graceful Restart HELPER Status : None

frr(config-if)# do show ip ospf  neighbor 8.8.8.8 detail
No such interface.
frr(config-if)# do show ip ospf  neighbor 8.8.8.8 detail json
{}
frr(config-if)#

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
2 years agoMerge pull request #11442 from opensourcerouting/fix/rpki_cli
Donald Sharp [Wed, 22 Jun 2022 11:35:30 +0000 (07:35 -0400)]
Merge pull request #11442 from opensourcerouting/fix/rpki_cli

bgpd: RPKI fixes

2 years agoMerge pull request #11445 from opensourcerouting/fix/replace_sockunion2str
Donald Sharp [Wed, 22 Jun 2022 11:33:14 +0000 (07:33 -0400)]
Merge pull request #11445 from opensourcerouting/fix/replace_sockunion2str

*: Replace sockunion2str => %pSU

2 years agoMerge pull request #11427 from anlancs/fix/minor-2
Donatas Abraitis [Wed, 22 Jun 2022 08:39:13 +0000 (11:39 +0300)]
Merge pull request #11427 from anlancs/fix/minor-2

zebra: remove redundant calling hook for fpm

2 years agoMerge pull request #11418 from mobash-rasool/fixes2
Donatas Abraitis [Wed, 22 Jun 2022 08:13:28 +0000 (11:13 +0300)]
Merge pull request #11418 from mobash-rasool/fixes2

lib: pim6d: Use IPv6 global unicast address to send PIMv6 register packet

2 years agopim6d: Send register msg with IPv6 global address 11418/head
Mobashshera Rasool [Wed, 25 May 2022 04:31:09 +0000 (21:31 -0700)]
pim6d: Send register msg with IPv6 global address

Use global unicast IPv6 address to send the register
packet.

Fixes: #11235
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agolib: Add an api is_ipv6_global_unicast
Mobashshera Rasool [Thu, 16 Jun 2022 03:08:35 +0000 (20:08 -0700)]
lib: Add an api is_ipv6_global_unicast

Add api is_ipv6_global_unicast to identify whether a given
ipv6 address is global unicast or not.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11443 from opensourcerouting/fix/duplicate_label
mobash-rasool [Wed, 22 Jun 2022 01:41:26 +0000 (07:11 +0530)]
Merge pull request #11443 from opensourcerouting/fix/duplicate_label

bgpd: Drop duplicate label assignment

2 years agoMerge pull request #11448 from gpnaveen/ospf_scripts_stbl
Jafar Al-Gharaibeh [Tue, 21 Jun 2022 18:44:33 +0000 (13:44 -0500)]
Merge pull request #11448 from gpnaveen/ospf_scripts_stbl

tests: Removing invalid step from OSPF tests.

2 years agoMerge pull request #11449 from Jafaral/ospf-readme
Donald Sharp [Tue, 21 Jun 2022 17:08:45 +0000 (13:08 -0400)]
Merge pull request #11449 from Jafaral/ospf-readme

ospfclient: fix help url

2 years agobgpd: Do not show polling_period default value in CLI for RPKI 11442/head
Donatas Abraitis [Tue, 21 Jun 2022 15:49:10 +0000 (18:49 +0300)]
bgpd: Do not show polling_period default value in CLI for RPKI

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11417 from donaldsharp/nhg_timer
Donatas Abraitis [Tue, 21 Jun 2022 15:43:45 +0000 (18:43 +0300)]
Merge pull request #11417 from donaldsharp/nhg_timer

Nhg timer

2 years agoMerge pull request #11351 from kuldeepkash/uplink_mcast_tests
Donatas Abraitis [Tue, 21 Jun 2022 15:37:40 +0000 (18:37 +0300)]
Merge pull request #11351 from kuldeepkash/uplink_mcast_tests

tests: Add multicast-pim-multi-uplink test suite

2 years agoMerge pull request #11352 from ARShreenidhi/default_originate_automation
Russ White [Tue, 21 Jun 2022 15:33:47 +0000 (11:33 -0400)]
Merge pull request #11352 from ARShreenidhi/default_originate_automation

tests  : bgp default-originate test suite automation

2 years agoospfclient: fix help url 11449/head
Jafar Al-Gharaibeh [Tue, 21 Jun 2022 14:54:31 +0000 (09:54 -0500)]
ospfclient: fix help url

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #11440 from opensourcerouting/fix/increase_flags_bgp_peer_to_uint64
Russ White [Tue, 21 Jun 2022 14:31:50 +0000 (10:31 -0400)]
Merge pull request #11440 from opensourcerouting/fix/increase_flags_bgp_peer_to_uint64

bgpd: Increase peer->flags to uint64_t

2 years agoMerge pull request #11444 from opensourcerouting/fix/bfd_bgp_down_debug_level
Russ White [Tue, 21 Jun 2022 14:01:46 +0000 (10:01 -0400)]
Merge pull request #11444 from opensourcerouting/fix/bfd_bgp_down_debug_level

bgpd: Replace zlog_info -> zlog_debug under BGP_DEBUG()

2 years ago*: Replace sockunion2str => %pSU 11445/head
Donatas Abraitis [Tue, 21 Jun 2022 09:36:16 +0000 (12:36 +0300)]
*: Replace sockunion2str => %pSU

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: Removing invalid step from ospf tests. 11448/head
nguggarigoud [Tue, 21 Jun 2022 07:42:45 +0000 (00:42 -0700)]
tests: Removing invalid step from ospf tests.

1. Removed the step from hello test case with hello
timer of 65535. This test works in some platforms
and does not work in others, affecting stability.

Signed-off-by: nguggarigoud <nguggarigoud@vmware.com>
2 years agobgpd: Replace zlog_info -> zlog_debug under BGP_DEBUG() 11444/head
Donatas Abraitis [Tue, 21 Jun 2022 08:59:52 +0000 (11:59 +0300)]
bgpd: Replace zlog_info -> zlog_debug under BGP_DEBUG()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Drop duplicate label assignment 11443/head
Donatas Abraitis [Tue, 21 Jun 2022 08:57:33 +0000 (11:57 +0300)]
bgpd: Drop duplicate label assignment

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests : bgp_default_originate testcase w.r.t topology1 added 11352/head
ARShreenidhi [Tue, 7 Jun 2022 06:41:10 +0000 (06:41 +0000)]
tests : bgp_default_originate testcase w.r.t topology1 added

this PR contains the basic bgp default originate.
Details of the testcase is available in respective script files

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2 years agobgpd: Show cache server preference in `show rpki cache-server` output
Donatas Abraitis [Mon, 20 Jun 2022 19:49:32 +0000 (22:49 +0300)]
bgpd: Show cache server preference in `show rpki cache-server` output

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agodoc: Specify preference for RPKI cache server
Donatas Abraitis [Mon, 20 Jun 2022 19:44:29 +0000 (22:44 +0300)]
doc: Specify preference for RPKI cache server

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Generate RPKI CLI config even if no cache servers configured
Donatas Abraitis [Mon, 20 Jun 2022 19:41:20 +0000 (22:41 +0300)]
bgpd: Generate RPKI CLI config even if no cache servers configured

If we have more CLI options configured and the last cache server is removed,
then the whole RPKI section is dropped.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Drop SSH public key for RPKI CLI option
Donatas Abraitis [Mon, 20 Jun 2022 19:22:07 +0000 (22:22 +0300)]
bgpd: Drop SSH public key for RPKI CLI option

It's not used anywhere.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Allow deleting full line for RPKI cache server
Donatas Abraitis [Mon, 20 Jun 2022 18:01:14 +0000 (21:01 +0300)]
bgpd: Allow deleting full line for RPKI cache server

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Add `no rpki` command
Donatas Abraitis [Mon, 20 Jun 2022 17:31:18 +0000 (20:31 +0300)]
bgpd: Add `no rpki` command

To delete the whole RPKI section.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Increase peer->flags to uint64_t 11440/head
Donatas Abraitis [Mon, 20 Jun 2022 08:46:15 +0000 (11:46 +0300)]
bgpd: Increase peer->flags to uint64_t

We will hit the limit soon, let's increase this in advance.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11146 from NicolasDichtel/master
Igor Ryzhov [Mon, 20 Jun 2022 16:54:35 +0000 (19:54 +0300)]
Merge pull request #11146 from NicolasDichtel/master

lib/if: fix interface name comparison

2 years agoMerge pull request #11284 from ordex/prefixlen_count
Donatas Abraitis [Mon, 20 Jun 2022 08:08:39 +0000 (11:08 +0300)]
Merge pull request #11284 from ordex/prefixlen_count

bgpd: Allow statistics gathering to give more data about prefix Lengths

2 years agoMerge pull request #11423 from donaldsharp/lgtm_fixes
Donatas Abraitis [Sun, 19 Jun 2022 19:33:01 +0000 (22:33 +0300)]
Merge pull request #11423 from donaldsharp/lgtm_fixes

Lgtm fixes

2 years agoMerge pull request #11431 from donaldsharp/bgp_cleanups
Donatas Abraitis [Sun, 19 Jun 2022 09:02:56 +0000 (12:02 +0300)]
Merge pull request #11431 from donaldsharp/bgp_cleanups

Add some extra data for when things might be going wrong

2 years agozebra: remove redundant calling hook for fpm 11427/head
anlan_cs [Thu, 16 Jun 2022 08:04:46 +0000 (04:04 -0400)]
zebra: remove redundant calling hook for fpm

Since the calling hook for old fpm is done in `rib_uninstall_kernel()`
inside, this calling place outside should be redundant. Just remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agolib: Add some extra error messages for when things go wrong 11431/head
Donald Sharp [Fri, 17 Jun 2022 17:47:03 +0000 (13:47 -0400)]
lib: Add some extra error messages for when things go wrong

In sockunion.c let's eliminate the silent and unexpected failure
mode to let the end operator figure out something is terribly wrong.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Display useful values when using json for missing neighbor state
Donald Sharp [Fri, 17 Jun 2022 17:43:30 +0000 (13:43 -0400)]
bgpd: Display useful values when using json for missing neighbor state

When a peer has not established connection yet, these values:
`hostLocal`, `portLocal`, `hostForeign`, `portForeign` might
not have any values and json output will not display anything
for them.  Modify the code to display some nominal values in
this situation so that parsers are not surprised.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6: permit route delete without nexthops 11430/head
Mark Stapp [Fri, 17 Jun 2022 15:47:55 +0000 (11:47 -0400)]
ospf6: permit route delete without nexthops

It's possible for ospf6 to decide to delete a route after it's
removed all of the route's nexthops. It's ok to delete a prefix
alone - be a little more forgiving when preparing a route delete.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
2 years agoMerge pull request #11425 from LabNConsulting/chopps/cleanup-redherring-memleaks
Rafael Zalamena [Fri, 17 Jun 2022 11:31:07 +0000 (08:31 -0300)]
Merge pull request #11425 from LabNConsulting/chopps/cleanup-redherring-memleaks

lib: cleanup red-herring memleaks in parent of daemonizing fork

2 years agolib: cleanup red-herring memleaks in parent of daemonizing fork 11425/head
Christian Hopps [Fri, 17 Jun 2022 06:04:51 +0000 (02:04 -0400)]
lib: cleanup red-herring memleaks in parent of daemonizing fork

- The parent of the daemonizing fork reports memleaks for the early
northbound allocations (libyang). If these were real memleaks these
would show up in the child as well; however, ignoring all memleaks in
the parent of the fork is too hard a sale. Instead, spend some CPU
cycles cleaning up the allocations in the parent after the fork and
immeidatley prior to exiting the parent after the daemonizing fork.

Signed-off-by: Christian Hopps <chopps@labn.net>
2 years agoMerge pull request #11422 from opensourcerouting/feature/autoclose_stale_issues_prs
Donald Sharp [Thu, 16 Jun 2022 20:36:36 +0000 (16:36 -0400)]
Merge pull request #11422 from opensourcerouting/feature/autoclose_stale_issues_prs

github: Autoclose stale issues/PRs that are stare longer than 180 days

2 years agoMerge pull request #11419 from anlancs/fix/minor-1
Donald Sharp [Thu, 16 Jun 2022 20:35:38 +0000 (16:35 -0400)]
Merge pull request #11419 from anlancs/fix/minor-1

zebra, lib: minor changes

2 years agolib: Function `crypt` does not need to be declared mid function 11423/head
Donald Sharp [Thu, 16 Jun 2022 19:38:15 +0000 (15:38 -0400)]
lib: Function `crypt` does not need to be declared mid function

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoeigrpd: vrf variable name hides a parameter of the same name
Donald Sharp [Thu, 16 Jun 2022 19:34:16 +0000 (15:34 -0400)]
eigrpd: vrf variable name hides a parameter of the same name

vrf is a char * being passed in.  Rename the vrf to be something
else.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopython: Remove redundant import of subprocess
Donald Sharp [Thu, 16 Jun 2022 19:27:52 +0000 (15:27 -0400)]
python: Remove redundant import of subprocess

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: ret is always -1 or 0 at this point so remove the if test
Donald Sharp [Thu, 16 Jun 2022 19:26:10 +0000 (15:26 -0400)]
zebra: ret is always -1 or 0 at this point so remove the if test

Remove the if test and cleanup the code to better align.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoospf6d: cost is uint32_t so it cannot be greater than UINT32_MAX
Donald Sharp [Thu, 16 Jun 2022 19:16:21 +0000 (15:16 -0400)]
ospf6d: cost is uint32_t so it cannot be greater than UINT32_MAX

Remove the extra test.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agonhrpd: r is always < 0 at some points of if else statements
Donald Sharp [Thu, 16 Jun 2022 19:14:29 +0000 (15:14 -0400)]
nhrpd: r is always < 0 at some points of if else statements

Since r is always < 0 at the last if/else there is no point
in testing for it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11421 from donaldsharp/bgp_psu
Donatas Abraitis [Thu, 16 Jun 2022 20:17:18 +0000 (23:17 +0300)]
Merge pull request #11421 from donaldsharp/bgp_psu

bgpd: Use %pSU instead of sockunion2str