]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
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 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 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.
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
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 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: rtnetlink: flow attr per gateway attr in multipath updates
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
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'
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
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 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 agoospf6: permit route delete without nexthops
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
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>