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

23 months 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

23 months 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()

23 months 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>
23 months 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>
23 months 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>
23 months 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

23 months 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

23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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

23 months 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>
23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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

23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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

23 months 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

23 months 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

23 months 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

23 months 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>
23 months 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>
23 months 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

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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

23 months 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`

23 months 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

23 months 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>
23 months 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

23 months 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>
23 months 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>
23 months 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>
23 months 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>
23 months 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

23 months 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>
23 months 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

23 months 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>
23 months 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>
23 months 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>
23 months agoMerge pull request #11395 from opensourcerouting/fix/autocompete_for_rmap_bgp
Donald Sharp [Tue, 14 Jun 2022 14:48:36 +0000 (10:48 -0400)]
Merge pull request #11395 from opensourcerouting/fix/autocompete_for_rmap_bgp

*: Use autocomplete for route-maps under commands that require it

23 months agopimd: Cleanup rpf lookup debug to help us figure out what is going on
Donald Sharp [Tue, 14 Jun 2022 13:50:54 +0000 (09:50 -0400)]
pimd: Cleanup rpf lookup debug to help us figure out what is going on

The rpf lookup debug was not taking into account the fact that a prefix-list
might be applied and also we might need to make a choice between the two.
So let's give ourselves a bit more data.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
23 months agodoc: replace the import/export keywords for in/out
Maximiliano Estudies [Tue, 14 Jun 2022 13:16:43 +0000 (15:16 +0200)]
doc: replace the import/export keywords for in/out

Signed-off-by: Maximiliano Estudies <maxiestudies@gmail.com>
23 months agoMerge pull request #11344 from opensourcerouting/feature/wrap_ipv4_unicast_valid
Russ White [Tue, 14 Jun 2022 11:48:32 +0000 (07:48 -0400)]
Merge pull request #11344 from opensourcerouting/feature/wrap_ipv4_unicast_valid

bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper

23 months agoMerge pull request #11392 from opensourcerouting/fix/ttl_set
Russ White [Tue, 14 Jun 2022 11:43:49 +0000 (07:43 -0400)]
Merge pull request #11392 from opensourcerouting/fix/ttl_set

bgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied

23 months agoMerge pull request #11343 from opensourcerouting/fix/local_preference_plus_minus_rout...
Russ White [Tue, 14 Jun 2022 10:53:08 +0000 (06:53 -0400)]
Merge pull request #11343 from opensourcerouting/fix/local_preference_plus_minus_route_maps

bgpd: Initialize attr->local_pref to the configured default value

23 months agovtysh: Add autocomplete for VRFs when using with `router bgp`
Donatas Abraitis [Tue, 14 Jun 2022 10:41:13 +0000 (13:41 +0300)]
vtysh: Add autocomplete for VRFs when using with `router bgp`

```
donatas-laptop(config)# router bgp 123 vrf ?
  VIEWVRFNAME  View/VRF name
       default mgmt1 servers2
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years ago*: Use autocomplete for route-maps under commands that require it
Donatas Abraitis [Mon, 13 Jun 2022 09:18:36 +0000 (12:18 +0300)]
*: Use autocomplete for route-maps under commands that require it

For example:

```
donatas-laptop# show bgp ipv4 unicast neighbors 127.0.0.2 advertised-routes route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas

donatas-laptop(config)# router bgp
donatas-laptop(config-router)# address-family ipv4
donatas-laptop(config-router-af)# redistribute connected route-map ?
  RMAP_NAME  Pointer to route-map entries
       testas2 testas

donatas-laptop(config-router-af)# network 192.168.0.0/23 route-map ?
  RMAP_NAME  Name of the route map
       testas2 testas
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper
Donatas Abraitis [Mon, 6 Jun 2022 07:47:27 +0000 (10:47 +0300)]
bgpd: Wrap IPV4_CLASS_DE into ipv4_unicast_valid() helper

Linux kernel allows (FreeBSD/OpenBSD too) using reserved class E IP ranges.

This is a preparation commit that ease the global switch to allow/deny
class E IP ranges in FRR.

https://datatracker.ietf.org/doc/html/draft-chen-ati-adaptive-ipv4-address-space

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #11333 from opensourcerouting/fix/memory_leak_with_rmaps
Donald Sharp [Mon, 13 Jun 2022 12:27:24 +0000 (08:27 -0400)]
Merge pull request #11333 from opensourcerouting/fix/memory_leak_with_rmaps

bgpd: Fix memory leak when setting [l]community at egress

2 years agoMerge pull request #11294 from mobash-rasool/pim-cli-top
Donald Sharp [Mon, 13 Jun 2022 12:26:09 +0000 (08:26 -0400)]
Merge pull request #11294 from mobash-rasool/pim-cli-top

pim6d: Adding PIM protocol packets stats CLI

2 years agoMerge pull request #11358 from opensourcerouting/fix/implicit_withdraw_for_vrf_leakin...
Donald Sharp [Mon, 13 Jun 2022 11:46:18 +0000 (07:46 -0400)]
Merge pull request #11358 from opensourcerouting/fix/implicit_withdraw_for_vrf_leaking_with_route_maps

bgpd: Fix VRF leaking when import/export RT list changed with route-maps

2 years agodoc: Updated the doc for new CLI addition
Mobashshera Rasool [Thu, 26 May 2022 09:53:37 +0000 (02:53 -0700)]
doc: Updated the doc for new CLI addition

Added doc for "show ipv6 pim interface traffic" cli

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Implement show ipv6 pim interface traffic
Mobashshera Rasool [Thu, 26 May 2022 09:50:32 +0000 (02:50 -0700)]
pim6d: Implement show ipv6 pim interface traffic

This CLI shows the number of PIM protocol packets
sent/received on each interface.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopimd: Change to DEFPY and make the api common
Mobashshera Rasool [Wed, 1 Jun 2022 15:58:33 +0000 (08:58 -0700)]
pimd: Change to DEFPY and make the api common

For show ip pim interface traffic cli, doing the below changes
1. Changing DEFUN to DEFPY
2. Move the whole code to a common api and modify it so that can
be reused for pimv6.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agopim6d: Moving show apis to common file
Mobashshera Rasool [Fri, 27 May 2022 05:11:12 +0000 (22:11 -0700)]
pim6d: Moving show apis to common file

Moving pim_show_interface_traffic and pim_show_interface_traffic_single
to pim_cmd_common.c from pim_cmd.c to make it common to
pimd and pim6d.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
2 years agoMerge pull request #11385 from AbhishekNR/show_cli
Donald Sharp [Sun, 12 Jun 2022 12:06:01 +0000 (08:06 -0400)]
Merge pull request #11385 from AbhishekNR/show_cli

pimd, pim6d: Moving reusable code to common api for show CLI's.

2 years agoMerge pull request #11388 from opensourcerouting/feature/github_stale_issues_prs
Donald Sharp [Sun, 12 Jun 2022 12:00:42 +0000 (08:00 -0400)]
Merge pull request #11388 from opensourcerouting/feature/github_stale_issues_prs

github: Mark issues with no activity in 180 days as stale

2 years agoMerge pull request #11387 from SaiGomathiN/pimshow
Donald Sharp [Sun, 12 Jun 2022 12:00:01 +0000 (08:00 -0400)]
Merge pull request #11387 from SaiGomathiN/pimshow

pimd, pim6d: Moving the reusable code to common api for PIM show CLIs

2 years agoMerge pull request #11378 from ton31337/fix/compile_sysrepo
Jafar Al-Gharaibeh [Fri, 10 Jun 2022 21:10:27 +0000 (16:10 -0500)]
Merge pull request #11378 from ton31337/fix/compile_sysrepo

lib: sysrepo compilation issues

2 years agoMerge pull request #11389 from ton31337/fix/some_codeql_fixes
Jafar Al-Gharaibeh [Fri, 10 Jun 2022 21:08:12 +0000 (16:08 -0500)]
Merge pull request #11389 from ton31337/fix/some_codeql_fixes

bgpd: Minor warning fixes

2 years agobgpd: Show TTL value unconditionally for neighbors
Donatas Abraitis [Fri, 10 Jun 2022 13:50:24 +0000 (16:50 +0300)]
bgpd: Show TTL value unconditionally for neighbors

If GTSM configured - show this value, otherwise TTL.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied
Donatas Abraitis [Fri, 10 Jun 2022 13:32:39 +0000 (16:32 +0300)]
bgpd: Set TTL for iBGP/eBGP by checking only if Generic TTL security applied

We set peer->ttl according if it's iBGP or eBGP, but when setting the TTL,
we technically ignore it.

Relax a bit and set TTL only if no GTSM configured.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotests: Check if old paths are flushed when import/export RT list was changed
Donatas Abraitis [Fri, 10 Jun 2022 11:49:36 +0000 (14:49 +0300)]
tests: Check if old paths are flushed when import/export RT list was changed

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: Drop sockunion_vty_out() wrong definition
Donatas Abraitis [Fri, 10 Jun 2022 09:53:10 +0000 (12:53 +0300)]
bgpd: Drop sockunion_vty_out() wrong definition

Probably leftover.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agobgpd: last_reset_cause_size can't be larger than 65k bytes
Donatas Abraitis [Fri, 10 Jun 2022 09:35:00 +0000 (12:35 +0300)]
bgpd: last_reset_cause_size can't be larger than 65k bytes

Reduce the scope, to avoid comparing uint16_t vs. size_t in a loop.

```
vty_out(vty,
"  Message received that caused BGP to send a NOTIFICATION:\n    ");
for (i = 1; i <= p->last_reset_cause_size;
     i++) {
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agogithub: Mark issues with no activity in 180 days as stale
Donatas Abraitis [Fri, 10 Jun 2022 07:03:05 +0000 (10:03 +0300)]
github: Mark issues with no activity in 180 days as stale

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agopim6d: Moving the reusable code of pim_show_join cli
Sai Gomathi N [Fri, 10 Jun 2022 05:43:52 +0000 (22:43 -0700)]
pim6d: Moving the reusable code of pim_show_join cli

Moving the common lines of pim_show_join_vrf and pim_show_join_vrf_all cli
in pim_cmd.c and pim6_cmd.c to pim_cmd_common.c file

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
2 years agoMerge pull request #11367 from donaldsharp/babel_updates
Donatas Abraitis [Fri, 10 Jun 2022 05:42:01 +0000 (08:42 +0300)]
Merge pull request #11367 from donaldsharp/babel_updates

Babel updates

2 years agobgpd: Allow statistics gathering to give more data about prefix Lengths
Antonio Quartulli [Wed, 25 May 2022 20:14:27 +0000 (22:14 +0200)]
bgpd: Allow statistics gathering to give more data about prefix Lengths

When using json output for `show bgp statistics json` gather the
number of prefixes of each prefix Length.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Antonio Quartulli <a@unstable.cc>
2 years agoMerge pull request #11328 from opensourcerouting/fix/drop_label_pton_ntop
Russ White [Thu, 9 Jun 2022 18:11:11 +0000 (14:11 -0400)]
Merge pull request #11328 from opensourcerouting/fix/drop_label_pton_ntop

bgpd: Drop label_ntop/label_pton functions

2 years agoMerge pull request #11259 from kuldeepkash/multicast_pim_dr_nondr
Russ White [Thu, 9 Jun 2022 17:42:29 +0000 (13:42 -0400)]
Merge pull request #11259 from kuldeepkash/multicast_pim_dr_nondr

tests: [Topojson] Enhance CLI logging