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

2 years agoMerge pull request #11410 from donaldsharp/daemons_cleanup
Martin Winter [Thu, 16 Jun 2022 18:58:27 +0000 (20:58 +0200)]
Merge pull request #11410 from donaldsharp/daemons_cleanup

2 years agogithub: Autoclose stale issues/PRs that are stare longer than 180 days
Donatas Abraitis [Thu, 16 Jun 2022 18:49:52 +0000 (21:49 +0300)]
github: Autoclose stale issues/PRs that are stare longer than 180 days

Set autoclose label after 180 days (no activity) and close (really) two weeks
later.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Use %pSU instead of sockunion2str
Donald Sharp [Thu, 16 Jun 2022 18:45:28 +0000 (14:45 -0400)]
bgpd: Use %pSU instead of sockunion2str

Commit: 09f267ec95de6d introduced more sockunion2str
usages when FRR should be using %pSU.  This commit
broke the compile when using --enable-dev-build

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Add a configurable knob `zebra nexthop-group keep (1-3600)`
Donald Sharp [Wed, 15 Jun 2022 23:54:29 +0000 (19:54 -0400)]
zebra: Add a configurable knob `zebra nexthop-group keep (1-3600)`

Allow end operator to set how long a nexthop-group is kept around
in the system after it is no-longer being used.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Add a timer to nexthop group deletion
Donald Sharp [Fri, 29 Oct 2021 12:16:13 +0000 (08:16 -0400)]
zebra: Add a timer to nexthop group deletion

Before deleting nexthop groups, that are installed,
from the system, start a timer and hold the nexthop
group for that time.

Suppose you have this scenario

a) create a static route with 1 x ecmp
      creates a nhg with 1 x ecmp
b) create a static route with 2 x ecmp
      creates a nhg with 2 x ecmp
      deletes a's nhg
c) create a static route with 3 x ecmp
      creates a nhg with 3 x ecmp
      deletes b's nhg
d) create a different route with 1 x ecmp
      creates another 1 x ecmp ( since a's ecmp was deleted )
e) create a different route with 2 x ecmp
      creates another 2 x ecmp ( since b's ecmp was deleted )

If you don't delete the nhg, start a timer, the nhg's used
in steps a and b can be reused for steps d and e.  This reduces
overhead work with zebra <-> kernel interactions and improves
the speed of the system.

So modify the code to note that an installed nexthop group should
be kept around a bit and hopefully reused.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Move where zebra marks a nhg as uninstalled in fib
Donald Sharp [Wed, 15 Jun 2022 20:27:07 +0000 (16:27 -0400)]
zebra: Move where zebra marks a nhg as uninstalled in fib

Currently the code is marking the nhg as uninstalled but not
causing that to flood up to the dependent nhgs:

nhg 3 is a group of 1/2
   1 -> interface A
   2 -> interface B

Suppose A goes down, old code would mark nhg 1 as !VALID and !INSTALLED.
Suppose B then goes down, old code would mark nhg 2 as !VALID and !INSTALLED
But would not mark nhg 3 as !VALID and !INSTALLED (sort of assuming that
it would just be cleaned up by NHG refcounts ).  I would prefer that
the code is pedantic about nhg 3 actually being removed from the system.

This code moves the setting of !INSTALLED into zebra_nhg.c where it
really belongs.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Document some data structures better
Donald Sharp [Wed, 15 Jun 2022 21:24:39 +0000 (17:24 -0400)]
zebra: Document some data structures better

I keep getting confused about nhg_depends and nhg_dependents.
So take a second and write them down for the next person.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd: Use %pSU instead of sockunion2str
Donald Sharp [Thu, 16 Jun 2022 18:45:28 +0000 (14:45 -0400)]
bgpd: Use %pSU instead of sockunion2str

Commit: 09f267ec95de6d introduced more sockunion2str
usages when FRR should be using %pSU.  This commit
broke the compile when using --enable-dev-build

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11353 from fdumontet6WIND/bmp_src_interface
Donatas Abraitis [Thu, 16 Jun 2022 18:30:28 +0000 (21:30 +0300)]
Merge pull request #11353 from fdumontet6WIND/bmp_src_interface

bmp: add a interface source to bmp connect command

2 years agoMerge pull request #11415 from donaldsharp/interface_duplication_linux
Donatas Abraitis [Thu, 16 Jun 2022 18:19:14 +0000 (21:19 +0300)]
Merge pull request #11415 from donaldsharp/interface_duplication_linux

Interface duplication linux

2 years agoMerge pull request #11408 from donaldsharp/common_config
Martin Winter [Thu, 16 Jun 2022 16:45:15 +0000 (18:45 +0200)]
Merge pull request #11408 from donaldsharp/common_config

2 years agotools: document frr_global_options in daemons file
Quentin Young [Mon, 6 Dec 2021 16:35:37 +0000 (11:35 -0500)]
tools: document frr_global_options in daemons file

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: apply various shellcheck recommendations
Quentin Young [Mon, 6 Dec 2021 04:31:11 +0000 (23:31 -0500)]
tools: apply various shellcheck recommendations

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: print daemon start cmd, vtysh_b cmd
Quentin Young [Mon, 6 Dec 2021 04:06:16 +0000 (23:06 -0500)]
tools: print daemon start cmd, vtysh_b cmd

When starting a daemon, print the full command run by the init script to
start it. This gives more information and is especially helpful when
debugging wrap commands.

Also add some more logs to vtysh_b to print the command used there,
log when we exit early because frr.conf doesn't exist, and simplify the
code path for creating the command to use.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: clean up whitespace in daemons file
Quentin Young [Mon, 6 Dec 2021 04:05:31 +0000 (23:05 -0500)]
tools: clean up whitespace in daemons file

Bit easier to read this way.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: improve explanation of watchfrr_options
Quentin Young [Mon, 6 Dec 2021 04:03:52 +0000 (23:03 -0500)]
tools: improve explanation of watchfrr_options

The explanation block for watchfrr_options was split into two blocks,
one explaining the --netns option and one making a vague statement that
the init script provides the list of daemons to start. The former can be
merged with the latter and the latter is more useful when stated as a
caveat for what you should actually use watchfrr_options for.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agotools: improve explanation of 'wrap' options
Quentin Young [Mon, 6 Dec 2021 04:03:11 +0000 (23:03 -0500)]
tools: improve explanation of 'wrap' options

We support 'wrap' variables in /etc/frr/daemons, but the explanation
given there doesn't touch on some of the subtleties of using these
variables.

The variables were designed for use with Valgrind, which has special
behavior when run with programs that daemonize; Valgrind will intercept
the fork()'d child process and run itself instead of the child. This
behavior allows it to follow the same forking semantics as the target
program.

For virtually every other wrapper, the wrap variables do not work as
demonstrated because the wrapper programs do not daemonize. If the
wrappers do not daemonize, they will block the init script. The examples
given with "perf" for example simply do not work, because perf remains
in the foreground even as it tracks forked children.

This patch adds an explanation of the behavior expected by the init
script and offers a solution for getting that behavior.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2 years agozebra: adjust one variable name
anlan_cs [Wed, 15 Jun 2022 05:23:09 +0000 (01:23 -0400)]
zebra: adjust one variable name

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agoMerge pull request #11409 from donaldsharp/zebra_nhg_debug
Russ White [Thu, 16 Jun 2022 14:13:20 +0000 (10:13 -0400)]
Merge pull request #11409 from donaldsharp/zebra_nhg_debug

Zebra nhg debug

2 years agoMerge pull request #11414 from donaldsharp/memory_cannot_fail
Rafael Zalamena [Thu, 16 Jun 2022 13:58:05 +0000 (10:58 -0300)]
Merge pull request #11414 from donaldsharp/memory_cannot_fail

Memory cannot fail

2 years agolib: correct two comments
anlan_cs [Wed, 15 Jun 2022 05:20:25 +0000 (01:20 -0400)]
lib: correct two comments

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2 years agobmp: add a interface source to bmp connect command
Francois Dumontet [Tue, 31 May 2022 15:40:39 +0000 (17:40 +0200)]
bmp: add a interface source to bmp connect command

With current release, forcin the source ip address when setting up a BMP
connection is not possible.

The need is to add an extra parameter for the following vty command:

router bgp 65500
bmp targets AAA
bmp connect 2.2.2.2 port 666 min-retry 100 max-retry 700
bmp connect 2:2::2:2 port 666 min-retry 100 max-retry 700 [source-interface lo1]

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2 years agoMerge pull request #11272 from AbhishekNR/flag_removal
Donald Sharp [Thu, 16 Jun 2022 00:19:34 +0000 (20:19 -0400)]
Merge pull request #11272 from AbhishekNR/flag_removal

pim6d: Removed PIM_IPV == 4 flag

2 years agoMerge pull request #11405 from kuldeepkash/multicast_pim_bsm
Donald Sharp [Thu, 16 Jun 2022 00:17:56 +0000 (20:17 -0400)]
Merge pull request #11405 from kuldeepkash/multicast_pim_bsm

tests: Verify PIM neighbors and static routes for BSM tests

2 years agoMerge pull request #11412 from mobash-rasool/fixes
Donald Sharp [Thu, 16 Jun 2022 00:17:16 +0000 (20:17 -0400)]
Merge pull request #11412 from mobash-rasool/fixes

pimd: Fix the setting of oif_flags in channel oil

2 years agoMerge pull request #11416 from opensourcerouting/ldp_vpls_topo1_fix
Donald Sharp [Wed, 15 Jun 2022 23:19:04 +0000 (19:19 -0400)]
Merge pull request #11416 from opensourcerouting/ldp_vpls_topo1_fix

tests: fix ldp_vpls_topo1 to work as expected

2 years agodoc: document ldpd's "ttl-security" commands
Renato Westphal [Wed, 15 Jun 2022 17:12:35 +0000 (14:12 -0300)]
doc: document ldpd's "ttl-security" commands

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agotests: fix ldp_vpls_topo1 to work as expected
Renato Westphal [Wed, 15 Jun 2022 14:39:48 +0000 (11:39 -0300)]
tests: fix ldp_vpls_topo1 to work as expected

In the last step of this test, r1's link to r2 is shut down but
both routers stay connected through a multi-hop LDP session. That
happens because r1 and r2 have a targeted adjacency created by
the pseudowire.  The test then checks whether the pseudowire is
still up, using an alternate path for nexthop resolution.

Everything's fine except for the fact that LDP GTSM (aka
ttl-security) is enabled by default. This means that messages sent
over a multi-hop session are not delivered. In the case of this
test, it can prevent PW-Status notifications from being delivered,
which in turn can prevent the pseudowire from coming back up.

Fix the test by disabling GTSM so that LDP multi-hop sessions can
work normally. This is in accordance with RFC6720 which mentions
that GTSM should be disabled (statically or dynamically) for
multi-hop sessions.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2 years agoMerge pull request #11355 from patrasar/pim6reg
Donald Sharp [Wed, 15 Jun 2022 15:29:25 +0000 (11:29 -0400)]
Merge pull request #11355 from patrasar/pim6reg

pim6d: creating pim6reg

2 years agozebra: On linux let interface data come in through netlink messaging
Donald Sharp [Wed, 15 Jun 2022 12:27:32 +0000 (08:27 -0400)]
zebra: On linux let interface data come in through netlink messaging

Consolidate on linux to using the netlink api for gathering all data
about a interface.  Leave this interface alone in the meantime for
other OS's.

This also has the side effect of reducing the amount of work
being done on linux in that FRR was handling shut/no shut
events 2 times.  Once for the ioctl question asked and
once for the netlink message received.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Attempt to make ioctl.c have a bit more useful log messges
Donald Sharp [Wed, 15 Jun 2022 11:31:53 +0000 (07:31 -0400)]
zebra: Attempt to make ioctl.c have a bit more useful log messges

While examining the code, it was noticed that there was a chance
to improve the log output in some cases to give a fuller understanding
of what went wrong where.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agobgpd, ospfd: Remove extra newline for `show debugging`
Donald Sharp [Wed, 15 Jun 2022 14:32:53 +0000 (10:32 -0400)]
bgpd, ospfd: Remove extra newline for `show debugging`

This extra newline was adding a weird output to `show debugging`
display where there would be extra newlines sometims and not
others.  Make it consistent.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: stream_dup cannot fail
Donald Sharp [Wed, 15 Jun 2022 14:22:29 +0000 (10:22 -0400)]
zebra: stream_dup cannot fail

If stream_dup was unable to actually allocate memory
then FRR would crash instead.  So let's remove the
check for null since it is not needed.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agolib: stream_dup memory alloc cannot fail
Donald Sharp [Wed, 15 Jun 2022 14:23:28 +0000 (10:23 -0400)]
lib: stream_dup memory alloc cannot fail

If stream_dup calls stream_new, stream_new can never
return a NULL pointer so the check is unneeded.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agopim6d: creating pim6reg interface for pim6d
Sarita Patra [Wed, 8 Jun 2022 07:50:48 +0000 (00:50 -0700)]
pim6d: creating pim6reg interface for pim6d

Signed-off-by: Sarita Patra <saritap@vmware.com>
2 years agoMerge pull request #11404 from donaldsharp/pim_rpf_debug_improvement
mobash-rasool [Wed, 15 Jun 2022 13:10:37 +0000 (18:40 +0530)]
Merge pull request #11404 from donaldsharp/pim_rpf_debug_improvement

pimd: Cleanup rpf lookup debug to help us figure out what is going on

2 years agoMerge pull request #11400 from opensourcerouting/fix/vrf_autocomplete_for_router_bgp
Donald Sharp [Wed, 15 Jun 2022 11:19:39 +0000 (07:19 -0400)]
Merge pull request #11400 from opensourcerouting/fix/vrf_autocomplete_for_router_bgp

vtysh: Add autocomplete for VRFs when using with `router bgp`

2 years agoMerge pull request #11403 from maxiestudies/doc_routeserver
Donald Sharp [Wed, 15 Jun 2022 11:18:11 +0000 (07:18 -0400)]
Merge pull request #11403 from maxiestudies/doc_routeserver

replace the import/export keywords for in/out

2 years agopimd: Fix the setting of oif_flags in channel oil
Mobashshera Rasool [Wed, 15 Jun 2022 07:34:46 +0000 (00:34 -0700)]
pimd: Fix the setting of oif_flags in channel oil

When pim_upstream_inherited_olist_decide calls the api
pim_channel_add_oif, it can pass PIM_OIF_FLAG_PROTO_GM,
PIM_OIF_FLAG_PROTO_PIM and/or PIM_OIF_FLAG_PROTO_STAR.
Now a consider a case where PIM flag was already set
but STAR flag was not set and this api tries to set
both STAR + PIM and passes the same. The api pim_channel_add_oif
returns since it sees that PIM is already set without
setting the STAR flag.

So basically this will lead to issues in scenarios where for the
same OIF multiple flags(IGMP, PIM, STAR) needs to be set.

Fixing it for all combinations.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11407 from opensourcerouting/ldp_topo1_fix
Donald Sharp [Wed, 15 Jun 2022 00:27:01 +0000 (20:27 -0400)]
Merge pull request #11407 from opensourcerouting/ldp_topo1_fix

tests: fix sporadic failures in the ldp_topo1 topotest

2 years agozebra: Convert debugs to use %pNG
Donald Sharp [Tue, 14 Jun 2022 19:02:27 +0000 (15:02 -0400)]
zebra: Convert debugs to use %pNG

The nexthop group debugs were using %u to just display the id.
I found this very hard to figure out what was going on.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agozebra: Add `%pNG` to zebra print routines
Donald Sharp [Tue, 14 Jun 2022 18:45:01 +0000 (14:45 -0400)]
zebra: Add `%pNG` to zebra print routines

Add `%pNG` so that a nexthop group can be displayed in debugs/logs
such that it can provide useful information.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agotests: Verify PIM neighbor and static routes for BSM tests
Kuldeep Kashyap [Tue, 14 Jun 2022 08:03:09 +0000 (01:03 -0700)]
tests: Verify PIM neighbor and static routes for BSM tests

Verifying and making sure PIM neighbors are
up before sending BSM packet using Scapy.

Verifying static routes are installed before
proceeding fruther.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
2 years agolib: Abstract usage of '%pNHs' so that nexthop groups can use it too
Donald Sharp [Tue, 14 Jun 2022 18:42:11 +0000 (14:42 -0400)]
lib: Abstract usage of '%pNHs' so that nexthop groups can use it too

Abstract the usage of '%pNHs' so that when nexthop groups get
a new special printfrr that it can take advantage of this
functionality too.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11229 from anlancs/fix/zebra-nb-remove-checknode
Donald Sharp [Tue, 14 Jun 2022 17:58:16 +0000 (13:58 -0400)]
Merge pull request #11229 from anlancs/fix/zebra-nb-remove-checknode

zebra: remove one unnecessary check for l3vni nb

2 years agotests: Fix verify_rib such that it will look at the selected route
Donald Sharp [Tue, 14 Jun 2022 16:21:19 +0000 (12:21 -0400)]
tests: Fix verify_rib such that it will look at the selected route

When you have a static route with multiple different admin
distances there exists a chance that route will have been
installed multiple times due to system load when inserted
at about the same time.  If this is the case then the
verify_rib function can and will select the wrong route
that happens to have a nexthop group that is still installed.

Modify verify_rib to ensure that the route that is going to
be looked at for nexthop correctness is the actual installed
route, not a previous version of it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #11243 from patrasar/pimv6_issue_11240
Donald Sharp [Tue, 14 Jun 2022 15:59:42 +0000 (11:59 -0400)]
Merge pull request #11243 from patrasar/pimv6_issue_11240

pim6d: Don't enable mld on pimreg interface by default

2 years agotests : bgp_default_originate testcase topology1 added
ARShreenidhi [Tue, 7 Jun 2022 06:41:10 +0000 (06:41 +0000)]
tests : bgp_default_originate testcase topology1 added

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2 years agotests : bgp default-originate api are added
ARShreenidhi [Tue, 7 Jun 2022 06:34:20 +0000 (06:34 +0000)]
tests : bgp default-originate api are added

Signed-off-by: ARShreenidhi <rshreenidhi@vmware.com>
2 years agotests: fix sporadic failures in the ldp_topo1 topotest
Renato Westphal [Mon, 13 Jun 2022 18:49:45 +0000 (15:49 -0300)]
tests: fix sporadic failures in the ldp_topo1 topotest

The sporadic failures were happening because, under heavy load,
the r4 router could form an OSPF adjacency with r3 a few seconds
before doing the same with r2. In that interim, LDP could establish
a neighborship with r2 going through r3 (instead of connecting
directly). That would cause all label mappings received from r3
to be ignored since they can't be mapped to the routes' nexthops
received from zebra, causing all sorts of test failures. None of
this is erroneous behavior as LDP simply follows the IGP.

The fix consists of updating the test to ensure all expected OSPF
adjacencies fully converged before proceeding to the LDP checks.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>