]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 years agoMerge pull request #7283 from donaldsharp/thread_off_semantics
Donatas Abraitis [Wed, 14 Oct 2020 11:50:08 +0000 (14:50 +0300)]
Merge pull request #7283 from donaldsharp/thread_off_semantics

*: Use proper semantics for turning off thread

3 years agoMerge pull request #7298 from mjstapp/quiet_opaque_debugs
Donald Sharp [Wed, 14 Oct 2020 11:27:27 +0000 (07:27 -0400)]
Merge pull request #7298 from mjstapp/quiet_opaque_debugs

zebra: quiet the zebra opaque message debugs

3 years agoMerge pull request #7278 from donaldsharp/fix_blame_code
Donatas Abraitis [Wed, 14 Oct 2020 06:21:50 +0000 (09:21 +0300)]
Merge pull request #7278 from donaldsharp/fix_blame_code

*: Consolidate on first git blame ignore revs

3 years ago*: Consolidate on first git blame ignore revs
Donald Sharp [Sun, 11 Oct 2020 15:21:33 +0000 (11:21 -0400)]
*: Consolidate on first git blame ignore revs

The file .git-blame-ignore-revs was put first into
the system and is what was advertised in multiple
places.  Since .ignore-revs was just created and
no announcement was made about the creation, let's
consolidate onto the first one created.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7258 from mjstapp/zebra_remove_slsp
Donald Sharp [Tue, 13 Oct 2020 19:51:18 +0000 (15:51 -0400)]
Merge pull request #7258 from mjstapp/zebra_remove_slsp

zebra: remove 'static' lsp objects

3 years agoMerge pull request #7295 from donaldsharp/ospf_crash
Jafar Al-Gharaibeh [Tue, 13 Oct 2020 18:27:55 +0000 (13:27 -0500)]
Merge pull request #7295 from donaldsharp/ospf_crash

ospfd: Prevent crash if transferring config amongst instances

3 years agoMerge pull request #7245 from donaldsharp/ospf_coverity
Jafar Al-Gharaibeh [Tue, 13 Oct 2020 18:26:47 +0000 (13:26 -0500)]
Merge pull request #7245 from donaldsharp/ospf_coverity

ospfclient: Provide some protection against blindly trusting input

3 years agozebra: quiet the zebra opaque message debugs
Mark Stapp [Tue, 13 Oct 2020 17:50:55 +0000 (13:50 -0400)]
zebra: quiet the zebra opaque message debugs

Put most of the debugs about opaque ZAPI messages under 'detail'
to reduce the noise.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7282 from zpericic/nhrp-vici
Jafar Al-Gharaibeh [Tue, 13 Oct 2020 18:04:15 +0000 (13:04 -0500)]
Merge pull request #7282 from zpericic/nhrp-vici

nhrp: Configure vici socket path using configure --with-vici-socket=/…

3 years agoMerge pull request #7288 from rsmarples/BSD-link_state
Donald Sharp [Tue, 13 Oct 2020 17:43:07 +0000 (13:43 -0400)]
Merge pull request #7288 from rsmarples/BSD-link_state

BSD: ifi_link_state is the link state

3 years agoMerge pull request #7294 from idryzhov/fix-no-ip-ospf-area
Donald Sharp [Tue, 13 Oct 2020 17:37:03 +0000 (13:37 -0400)]
Merge pull request #7294 from idryzhov/fix-no-ip-ospf-area

ospfd: fix "no ip ospf area"

3 years agoMerge pull request #7179 from kuldeepkash/bgp_basic_functionality
Donald Sharp [Tue, 13 Oct 2020 17:33:58 +0000 (13:33 -0400)]
Merge pull request #7179 from kuldeepkash/bgp_basic_functionality

tests: Enable evpn_type5_test_topo1 suite to run in CI

3 years agotests: Enable evpn_type5_test_topo1 suite to run in CI
Kuldeep Kashyap [Fri, 25 Sep 2020 03:10:01 +0000 (03:10 +0000)]
tests: Enable evpn_type5_test_topo1 suite to run in CI

1. Suite: evpn_type5_test_topo1 was added to pytest.ini during triaging phase as
there was bug: https://github.com/FRRouting/frr/issues/6867, which is fixed. Enabling
suite to be run in CI.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
3 years agoMerge pull request #7293 from eololab/remove-remaining-keep-kernel-option
Donald Sharp [Tue, 13 Oct 2020 14:52:09 +0000 (10:52 -0400)]
Merge pull request #7293 from eololab/remove-remaining-keep-kernel-option

doc, zebra: remove keep_kernel option everywhere

3 years agoospfd: Prevent crash if transferring config amongst instances
Donald Sharp [Tue, 13 Oct 2020 12:16:15 +0000 (08:16 -0400)]
ospfd: Prevent crash if transferring config amongst instances

If we enter:

int eth0
  ip ospf area 0
  ip ospf 10 area 0
!

This will crash ospf.  Prevent this from happening.

OSPF instances:

a) Cannot be mixed with non-instance
b) Are their own process.

Since in multi-instance world ospf instances are their own process,
when an ospf processes receives an instance command we must remove
our config( if present ) and allow the new config to be active
in the new process.  The problem here is that if you have not
done a `router ospf` above the lookup of the ospf pointer will
fail and we will just crash.  Put some code in to prevent a crash
in this case.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospfd: fix "no ip ospf area"
Igor Ryzhov [Tue, 13 Oct 2020 11:03:42 +0000 (14:03 +0300)]
ospfd: fix "no ip ospf area"

This commit fixes the following behavior:
```
nfware(config)# interface enp2s0
nfware(config-if)# ip ospf area 0
nfware(config-if)# no ip ospf area 0
% [ospfd]: command ignored as it targets an instance that is not running
```

We should be able to use the command without configuring the instance.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc, zebra: remove keep_kernel option everywhere
Emanuele Bovisio [Wed, 7 Oct 2020 15:27:27 +0000 (17:27 +0200)]
doc, zebra: remove keep_kernel option everywhere

remove all remaining parts related to keep_kernel option

Signed-off-by: Emanuele Bovisio <emanuele.bovisio@eolo.it>
3 years agoMerge pull request #7279 from donaldsharp/17_coverity
Patrick Ruddy [Tue, 13 Oct 2020 10:48:37 +0000 (11:48 +0100)]
Merge pull request #7279 from donaldsharp/17_coverity

17 coverity

3 years agozebra: ifi_link_state is the link state
Roy Marples [Mon, 12 Oct 2020 19:53:14 +0000 (20:53 +0100)]
zebra: ifi_link_state is the link state

SIOCGIFMEDIA returns the media state.
SIOCGIFDATA returns interface data which includes the link state.

While the status of the former is usually indicitive of the latter,
this is not always the case.
Ifact some recent net80211 changes in at least NetBSD and OpenBSD
have MONITOR media set to active but the link status set to DOWN.

All interfaces will return link state with SIOCGIFDATA, unlike
SIOCGIFMEDIA. However not all BSD's support SIOCGIFDATA - it has
recently been accepted into FreeBSD-13.
However, all BSD's do report the same structure in ifa_data for
AF_LINK addresses from getifaddrs(3) so the information has always
been available.

Signed-off-by: Roy Marples <roy@marples.name>
3 years agoMerge pull request #7277 from chiragshah6/yang_nb6
Donatas Abraitis [Tue, 13 Oct 2020 08:12:28 +0000 (11:12 +0300)]
Merge pull request #7277 from chiragshah6/yang_nb6

 bgpd: fix crash in bgp instance creation

3 years agoMerge pull request #7287 from taspelund/ipv4-lu-show-routes
Donatas Abraitis [Tue, 13 Oct 2020 06:44:50 +0000 (09:44 +0300)]
Merge pull request #7287 from taspelund/ipv4-lu-show-routes

bgpd: fix show bgp neighbor routes for labeled-unicast

3 years agobgpd: use common api in bgp_get
Chirag Shah [Mon, 12 Oct 2020 23:11:58 +0000 (16:11 -0700)]
bgpd: use common api in bgp_get

Use consolidate api in bgp_get and bgp northbound
create callback.

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: fix crash in bgp instance creation
Chirag Shah [Sat, 10 Oct 2020 22:09:11 +0000 (15:09 -0700)]
bgpd: fix crash in bgp instance creation

In bgp global commands northbound local-as modify callback
check for backend db for checking existing bgp instance.

In an instance where no router bgp with old ASN cleaned up
followed by new bgp instance with new AS is created,
the nb_running_get_entry in validation phase returns stale
bgp reference, which leads to rejection of the router bgp command.

Uncovered via:
toptotest evpn_type5_test_topo1/test_evpn_type5_topo1.py
test_bgp_attributes_for_evpn_address_family_p1

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: rename router bgp callbacks
Chirag Shah [Sat, 10 Oct 2020 21:26:48 +0000 (14:26 -0700)]
bgpd: rename router bgp callbacks

Avoid similar name function as bgp_crate()

Signed-off-by: Chirag Shah <chirag@nvidia.com>
3 years agobgpd: fix show bgp neighbor routes for labeled-unicast
Trey Aspelund [Mon, 12 Oct 2020 19:39:11 +0000 (15:39 -0400)]
bgpd: fix show bgp neighbor routes for labeled-unicast

bgp_show_neighbor_route() was rewriting safi from LU to uni
before checking if the peer was enabled for LU.  This resulted
in the peer's address-family check looking for unicast, which
would always fail for LU peers since unicast + LU are
mutually-exclusive AFIs.
This moves this safi reassignment after the peer AFI check,
ensuring that the peer's address-family check looks for LU
while the call to bgp_show() still uses uni.

-- highlights from manual testing

config:

router bgp 2
 neighbor 1.1.1.1 remote-as external
 neighbor 1.1.1.1 disable-connected-check
 neighbor 1.1.1.1 update-source 2.2.2.2
 !
 address-family ipv4 unicast
  no neighbor 1.1.1.1 activate
 exit-address-family
 !
 address-family ipv4 labeled-unicast
  neighbor 1.1.1.1 activate
 exit-address-family

before:

spine01# show bgp ipv4 unicast neighbors 1.1.1.1 routes
% No such neighbor or address family
spine01# show bgp ipv4 labeled-unicast neighbors 1.1.1.1 routes
% No such neighbor or address family

after:

spine01# show bgp ipv4 unicast neighbors 1.1.1.1 routes
% No such neighbor or address family
spine01# show bgp ipv4 label neighbors 1.1.1.1 routes
BGP table version is 1, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, = multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 11.11.11.11/32   1.1.1.1                  0             0 1 i
Displayed  1 routes and 1 total paths

Signed-off-by: Trey Aspelund <taspelund@cumulusnetworks.com>
3 years agoMerge pull request #7251 from wesleycoakley/fix-vtysh-node-build-warn-errors
Donatas Abraitis [Mon, 12 Oct 2020 18:31:04 +0000 (21:31 +0300)]
Merge pull request #7251 from wesleycoakley/fix-vtysh-node-build-warn-errors

vtysh: fix build-time errors for some --enable flags

3 years agoMerge pull request #7284 from donaldsharp/pmax
Donatas Abraitis [Mon, 12 Oct 2020 18:07:08 +0000 (21:07 +0300)]
Merge pull request #7284 from donaldsharp/pmax

bgpd: Correctly calculate threshold being reached

3 years agonhrp: Make vici socket path configurable
Zoran Pericic [Sat, 25 Jan 2020 18:38:39 +0000 (19:38 +0100)]
nhrp: Make vici socket path configurable

nhrp: Configure vici socket path using

configure --with-vici-socket=/var/run/charon.vici

If not specified default to /var/run/charon.vici

Signed-off-by: Zoran Peričić <zpericic@netst.org>
3 years agobgpd: Correctly calculate threshold being reached
Donald Sharp [Mon, 12 Oct 2020 14:36:37 +0000 (10:36 -0400)]
bgpd: Correctly calculate threshold being reached

if (pcout > (pcount * peer->max_threshold[afi][safi] / 100 ))
is always true.  So the very first route received will always
trigger the warning.  We actually want the warning to happen
when we hit the threshold.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #6811 from rgirada/test_helper
Russ White [Mon, 12 Oct 2020 14:16:27 +0000 (10:16 -0400)]
Merge pull request #6811 from rgirada/test_helper

ospfd: ospfv2 graceful restart helper support.

3 years ago*: Use proper semantics for turning off thread
Donald Sharp [Mon, 12 Oct 2020 12:35:18 +0000 (08:35 -0400)]
*: Use proper semantics for turning off thread

We have this pattern in the code base:

if (thread)
THREAD_OFF(thread);

If we look at THREAD_OFF we check to see if thread
is non-null too.  So we have a double check.
This is unnecessary.  Convert to just using THREAD_OFF

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #6927 from donaldsharp/16_coverity
Olivier Dugeon [Mon, 12 Oct 2020 07:22:46 +0000 (09:22 +0200)]
Merge pull request #6927 from donaldsharp/16_coverity

Cleanup a bunch of new coverity issues

3 years agoospfd: When failing to set socket options just note the failure
Donald Sharp [Sun, 11 Oct 2020 16:56:02 +0000 (12:56 -0400)]
ospfd: When failing to set socket options just note the failure

Instead of closing the socket, just note the failure and
continue on.  If we actually failed here so many other
things would not be working at all, that actually
closing the fd won't matter.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoripngd: Intentionally ignore return code for str2prefix_ipv6
Donald Sharp [Sun, 11 Oct 2020 16:38:42 +0000 (12:38 -0400)]
ripngd: Intentionally ignore return code for str2prefix_ipv6

We are calling str2prefix_ipv6 for a default route.  Since
we know this will always succeed we can safely tell the compiler
that we are ok ignoring the return code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d, tests: Prevent use after free
Donald Sharp [Mon, 17 Aug 2020 12:25:12 +0000 (08:25 -0400)]
ospf6d, tests: Prevent use after free

The code pattern:

for (ALL_LSDB(lsdb, lsa)) {
remove_lsa(lsa)
}

has a use after free in ALL_LSDB, since we ask for the next pointer,
after it has been freed.

Modify the code such that we grab the next pointer before we can
possibly free it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agoospf6d: Make ospf6_lsa_lock follow normal FRR pattern
Donald Sharp [Sun, 11 Oct 2020 15:13:33 +0000 (11:13 -0400)]
ospf6d: Make ospf6_lsa_lock follow normal FRR pattern

The normal ospf6_lsa_lock call should return the pointer
to the lock data structure we are holding.  This is the
normal pattern for locking a data structure in FRR.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agozebra: zevpn cannot be null passed into zebra_evpn_es_evi_show_one_evpn
Donald Sharp [Sat, 15 Aug 2020 17:41:18 +0000 (13:41 -0400)]
zebra: zevpn cannot be null passed into zebra_evpn_es_evi_show_one_evpn

In zebra_evpn_es_evi_show_vni the zevpn pointer if passed into
zebra_evpn_es_evi_show_one_evi will crash if it is null and
we have code that checks that it is non null and then immediately
calls the function.  Add a return to prevent a crash.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agozebra: n->mac is derefed in all paths
Donald Sharp [Sat, 15 Aug 2020 17:37:09 +0000 (13:37 -0400)]
zebra: n->mac is derefed in all paths

No need to check for n->mac existence as that all paths
leading to this code have n->mac already derefed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agoMerge pull request #7222 from idryzhov/fix-debug
Renato Westphal [Sat, 10 Oct 2020 00:58:24 +0000 (21:58 -0300)]
Merge pull request #7222 from idryzhov/fix-debug

fix debug commands node inconsistencies

3 years agoMerge pull request #7270 from donaldsharp/isis_cleanup
Renato Westphal [Sat, 10 Oct 2020 00:53:06 +0000 (21:53 -0300)]
Merge pull request #7270 from donaldsharp/isis_cleanup

Isis cleanup

3 years agoMerge pull request #7269 from idryzhov/rip-crash-fix
Donald Sharp [Fri, 9 Oct 2020 23:38:07 +0000 (19:38 -0400)]
Merge pull request #7269 from idryzhov/rip-crash-fix

rip(ng)d: fix interfaces cleaning (leads to crash #6477)

3 years agoMerge pull request #7268 from ton31337/fix/dead_name_bgpd
Donald Sharp [Fri, 9 Oct 2020 23:34:38 +0000 (19:34 -0400)]
Merge pull request #7268 from ton31337/fix/dead_name_bgpd

bgpd: Use default VRF name if using `router bgp` command

3 years agoMerge pull request #7271 from vishaldhingra/static
Donald Sharp [Fri, 9 Oct 2020 23:29:55 +0000 (19:29 -0400)]
Merge pull request #7271 from vishaldhingra/static

staticd: To set the default value of blackhole type correctly

3 years agoMerge pull request #7265 from qlyoung/doc-black
Mark Stapp [Fri, 9 Oct 2020 18:02:52 +0000 (14:02 -0400)]
Merge pull request #7265 from qlyoung/doc-black

doc: document use of black for python formatting

3 years agostaticd: To set the default value of blackhole type correctly
vdhingra [Fri, 9 Oct 2020 16:23:14 +0000 (09:23 -0700)]
staticd: To set the default value of blackhole type correctly

When nexthop is allocated, default value of blockhole type
was not getting set, this leads to below problem. The default
value should be in-sync with the deafult value in yang model.

c t
ip route 131.1.1.0/24 Null0

do show running-config
...
!
ip route 131.1.1.0/24 blackhole
!
end

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
3 years agoospfclient: Provide some protection against blindly trusting input
Donald Sharp [Mon, 5 Oct 2020 20:19:09 +0000 (16:19 -0400)]
ospfclient: Provide some protection against blindly trusting input

Coverity rightly points out that blindly trusting the lsalen
from received data may not be the smartest thing to do.  Add
a bit of code to prevent us from blindly malloc'ing
too much memory.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoisisd: circuit->area->isis to circuit->isis
Donald Sharp [Fri, 9 Oct 2020 12:00:44 +0000 (08:00 -0400)]
isisd: circuit->area->isis to circuit->isis

The code in isisd uses `circuit->area->isis` all the time
but we know that circuit now has a valid `circuit->isis` pointer
so let's use that and cleanup the long dereference.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agorip(ng)d: fix interfaces cleaning
Igor Ryzhov [Fri, 9 Oct 2020 12:14:58 +0000 (15:14 +0300)]
rip(ng)d: fix interfaces cleaning

rip(ng)d_instance_disable unlinks the vrf from the instance which means
that rip(ng)_interfaces_clean never works, because rip(ng)->vrf is
always NULL there. This leads to the crash #6477.

Clean interfaces before disabling the instance to fix the issue.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: Always set `circuit->isis` on creation
Donald Sharp [Fri, 9 Oct 2020 12:10:20 +0000 (08:10 -0400)]
isisd: Always set `circuit->isis` on creation

There are code paths where we were not always setting the
circuit->isis on creation.  Fix that up so it will always
happen.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #7266 from idryzhov/isis-fixes
Donald Sharp [Fri, 9 Oct 2020 11:55:08 +0000 (07:55 -0400)]
Merge pull request #7266 from idryzhov/isis-fixes

isis crash fix

3 years agoMerge pull request #7252 from sworleys/EVPN-RType-Help
Donatas Abraitis [Fri, 9 Oct 2020 06:19:18 +0000 (09:19 +0300)]
Merge pull request #7252 from sworleys/EVPN-RType-Help

lib,bgpd: EVPN help string cleanup

3 years agoMerge pull request #7264 from donaldsharp/ospfv3_funkiness
Donatas Abraitis [Fri, 9 Oct 2020 06:16:51 +0000 (09:16 +0300)]
Merge pull request #7264 from donaldsharp/ospfv3_funkiness

Some cleanup from recent commits

3 years agobgpd: Use default VRF name if using `router bgp` command
Donatas Abraitis [Fri, 9 Oct 2020 06:02:49 +0000 (09:02 +0300)]
bgpd: Use default VRF name if using `router bgp` command

When we enter `router bgp` it enters non-VRF instance which is default.

No need to check for VRF/VIEW name, kinda dead code.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #7262 from idryzhov/hide-bgpd-test
Donald Sharp [Fri, 9 Oct 2020 01:45:41 +0000 (21:45 -0400)]
Merge pull request #7262 from idryzhov/hide-bgpd-test

bgpd: hide test commands

3 years agodoc: Fix pimd.rst warnings issued by sphinx
Donald Sharp [Thu, 8 Oct 2020 14:41:37 +0000 (10:41 -0400)]
doc: Fix pimd.rst warnings issued by sphinx

A couple warnings have sneaked into the compilation of the pim
documentation.  Fix accordingly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Move header includes around to reflect reality
Donald Sharp [Thu, 8 Oct 2020 14:38:45 +0000 (10:38 -0400)]
ospf6d: Move header includes around to reflect reality

ospf6_network.h needs ospf6_top.h to be included
first.

This makes newer versions of gcc much much happier.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
3 years agoisisd: move debug variables under ifdef
Igor Ryzhov [Thu, 8 Oct 2020 17:06:27 +0000 (20:06 +0300)]
isisd: move debug variables under ifdef

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: check for circuit existence on interface addr change
Igor Ryzhov [Thu, 8 Oct 2020 17:05:08 +0000 (20:05 +0300)]
isisd: check for circuit existence on interface addr change

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: fix incorrect vrf lookups
Igor Ryzhov [Thu, 8 Oct 2020 16:23:08 +0000 (19:23 +0300)]
isisd: fix incorrect vrf lookups

Lookup in C_STATE_NA must be made before the new circuit creation, or it
will be leaked if the isis instance is not found. All other lookups are
unnecessary - we just need to remember the previously used instance.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoisisd: add missing rollback if config is invalid
Igor Ryzhov [Thu, 8 Oct 2020 15:42:01 +0000 (18:42 +0300)]
isisd: add missing rollback if config is invalid

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: re-use HELP_STR evpn macros
Stephen Worley [Tue, 6 Oct 2020 19:58:12 +0000 (15:58 -0400)]
bgpd: re-use HELP_STR evpn macros

Re-use some of the HELP_STR macros rather than copypastaing
strings everywhere.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
3 years agolib: add some EVPN help string constants
Stephen Worley [Tue, 6 Oct 2020 19:14:03 +0000 (15:14 -0400)]
lib: add some EVPN help string constants

Add some EVPN help string constants to make use of
in later commits.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
3 years agozebra: remove 'static' lsp objects
Mark Stapp [Wed, 16 Sep 2020 19:58:34 +0000 (15:58 -0400)]
zebra: remove 'static' lsp objects

Use the same lsp and nexthop/nhlfe objects for 'static' and
dynamic LSPs; remove the 'static' objects and their supporting
code.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #7256 from donaldsharp/topo_fixinator
Rafael Zalamena [Thu, 8 Oct 2020 19:45:35 +0000 (16:45 -0300)]
Merge pull request #7256 from donaldsharp/topo_fixinator

tests: bgp_l3vpn_to_bgp_vrf test needed to correct order

3 years agotests: bgp_l3vpn_to_bgp_vrf test needed to correct order
Quentin Young [Thu, 8 Oct 2020 17:02:06 +0000 (13:02 -0400)]
tests: bgp_l3vpn_to_bgp_vrf test needed to correct order

The bgp_l3vpn_to_bgp_vrf test is looking for a prefix
on multiple routers that the ordered received is non-deterministic.
As such the regex's are failing occassionaly when the
route is received in an unexpected order.

One possible order:
(#89) scripts/check_routes.py:120 COMMAND:ce3:vtysh -c "show bgp ipv4 uni 6.0.1.0":2 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3.* Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best .Weight.* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:56.* Local.* 192.168.1.1 from 192.168.1.1 .192.168.1.1.* Origin IGP, metric 98, localpref 123, valid, internal.* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:56:pass:Redundant route 1 details c:
COMMAND OUTPUT:BGP routing table entry for 6.0.1.0/24^M
Paths: (2 available, best #1, table default)^M
  Advertised to non peer-group peers:^M
  192.168.1.1^M
  Local^M
    99.0.0.3 from 0.0.0.0 (99.0.0.3)^M
      Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best (Weight)^M
      Community: 0:67^M
      Extended Community: RT:89:123^M
      Large Community: 12:34:56^M
      Last update: Wed Oct  7 11:12:22 2020^M
  Local^M
    192.168.1.1 from 192.168.1.1 (192.168.1.1)^M
      Origin IGP, metric 98, localpref 123, valid, internal^M
      Community: 0:67^M
      Extended Community: RT:52:100 RT:89:123^M
      Large Community: 12:34:56^M
      Last update: Wed Oct  7 11:12:41 2020:
R:89   ce3    Redundant route 1 details c                              1    0

Second possible order:
(#89) scripts/check_routes.py:120 COMMAND:ce3:vtysh -c "show bgp ipv4 uni 6.0.1.0":2 available, best .*192.168.1.1.* Local.* 99.0.0.3 from 0.0.0.0 .99.0.0.3.* Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best .Weight.* Community: 0:67.* Extended Community: RT:89:123.* Large Community: 12:34:56.* Local.* 192.168.1.1 from 192.168.1.1 .192.168.1.1.* Origin IGP, metric 98, localpref 123, valid, internal.* Community: 0:67.* Extended Community: RT:52:100 RT:89:123.* Large Community: 12:34:56:pass:Redundant route 1 details c:
COMMAND OUTPUT:BGP routing table entry for 6.0.1.0/24^M
Paths: (2 available, best #2, table default)^M
  Advertised to non peer-group peers:^M
  192.168.1.1^M
  Local^M
    192.168.1.1 from 192.168.1.1 (192.168.1.1)^M
      Origin IGP, metric 98, localpref 123, valid, internal^M
      Community: 0:67^M
      Extended Community: RT:52:100 RT:89:123^M
      Large Community: 12:34:56^M
      Last update: Wed Oct  7 11:14:45 2020^M
  Local^M
    99.0.0.3 from 0.0.0.0 (99.0.0.3)^M
      Origin IGP, metric 200, localpref 50, weight 32768, valid, sourced, local, best (Weight)^M
      Community: 0:67^M
      Extended Community: RT:89:123^M
      Large Community: 12:34:56^M
      Last update: Wed Oct  7 11:14:27 2020:
R:89   ce3    Redundant route 1 details c                              0    1

BGP displays the paths in the order received since it's just a linked list.
For this test modify/add the luCommands to track that we may
receive the paths in a non-deterministic order.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodoc: document use of black for python formatting
Quentin Young [Thu, 8 Oct 2020 16:53:13 +0000 (12:53 -0400)]
doc: document use of black for python formatting

Also moves "Exceptions" for C code under the C subsection.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #7260 from qlyoung/reformat-python
Donatas Abraitis [Thu, 8 Oct 2020 16:38:44 +0000 (19:38 +0300)]
Merge pull request #7260 from qlyoung/reformat-python

Reformat python

3 years agobgpd: hide test commands
Igor Ryzhov [Thu, 8 Oct 2020 08:03:25 +0000 (11:03 +0300)]
bgpd: hide test commands

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years ago*: add .ignore-revs for git blame w/ whitespace
Quentin Young [Wed, 7 Oct 2020 21:26:27 +0000 (17:26 -0400)]
*: add .ignore-revs for git blame w/ whitespace

git blame supports taking a file with a list of revisions to ignore

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years ago*: reformat python files
whitespace [Wed, 7 Oct 2020 21:22:26 +0000 (17:22 -0400)]
*: reformat python files

We are now using black.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #7254 from idryzhov/vtysh-include
Quentin Young [Wed, 7 Oct 2020 18:54:46 +0000 (14:54 -0400)]
Merge pull request #7254 from idryzhov/vtysh-include

vtysh: remove unnecessary include

3 years agoMerge pull request #7058 from Niral-Networks/niral_dev_vrf_ospf6
Rafael Zalamena [Wed, 7 Oct 2020 15:07:09 +0000 (12:07 -0300)]
Merge pull request #7058 from Niral-Networks/niral_dev_vrf_ospf6

ospf6d : Socket change for ospf6d vrf support.

3 years agoMerge pull request #7241 from chiragshah6/evpn_dev1
Renato Westphal [Wed, 7 Oct 2020 14:50:52 +0000 (11:50 -0300)]
Merge pull request #7241 from chiragshah6/evpn_dev1

lib: add errmsg to nb rpc

3 years agovtysh: remove unnecessary include
Igor Ryzhov [Wed, 7 Oct 2020 12:27:12 +0000 (15:27 +0300)]
vtysh: remove unnecessary include

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #7250 from ckishimo/typos
Donatas Abraitis [Wed, 7 Oct 2020 11:43:09 +0000 (14:43 +0300)]
Merge pull request #7250 from ckishimo/typos

ospfd: fix typos

3 years agoospfd: fix typos
ckishimo [Tue, 6 Oct 2020 18:07:53 +0000 (11:07 -0700)]
ospfd: fix typos

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #7246 from mjstapp/fix_bgp_nb_sa
Donatas Abraitis [Wed, 7 Oct 2020 06:46:15 +0000 (09:46 +0300)]
Merge pull request #7246 from mjstapp/fix_bgp_nb_sa

bgpd: fix SA warnings in bgp northbound

3 years agoMerge pull request #7239 from opensourcerouting/bgp-aggregate-med
Donatas Abraitis [Wed, 7 Oct 2020 06:44:30 +0000 (09:44 +0300)]
Merge pull request #7239 from opensourcerouting/bgp-aggregate-med

bgpd: aggregate-address on matching MED only

3 years agoospf6d : Socket change for ospf6d vrf support.
Kaushik [Sat, 5 Sep 2020 07:07:25 +0000 (00:07 -0700)]
ospf6d : Socket change for ospf6d vrf support.

1. The socket() call is changed to vrf_socket().
2. The ospf6 instance creation api added.
3. The global socket fd is replaced with ospf6->fd.
4. All dependency of the global socket is resolved.
5. Added the ospf6 receive timer in the global structure.
6. Performed the thread off on receive timer when we do "no router ospf6".

Co-authored-by: harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
3 years agovtysh: ignore generated file vtysh_daemons.h
Wesley Coakley [Tue, 6 Oct 2020 20:37:13 +0000 (16:37 -0400)]
vtysh: ignore generated file vtysh_daemons.h

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agovtysh: Fix vtysh node build warn errors
Wesley Coakley [Tue, 6 Oct 2020 20:07:02 +0000 (16:07 -0400)]
vtysh: Fix vtysh node build warn errors

Two vtysh nodes were misplaced during a recent refactor and were not
included under appropriate #ifdef directives and consequently triggered
build warnings (errors)

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
3 years agoMerge pull request #7248 from donaldsharp/revert_7113
Russ White [Tue, 6 Oct 2020 14:51:22 +0000 (10:51 -0400)]
Merge pull request #7248 from donaldsharp/revert_7113

Revert "bgpd: allow bestpath to handle mutliple locally-originated pa…

3 years agoRevert "bgpd: allow bestpath to handle mutliple locally-originated paths"
Donald Sharp [Tue, 6 Oct 2020 14:43:09 +0000 (10:43 -0400)]
Revert "bgpd: allow bestpath to handle mutliple locally-originated paths"

This reverts commit 82a843fa3df4adff6d2eaffbaba96eb136fcaebb.

3 years agoMerge pull request #7202 from gromit1811/proposed_fix_7030
Olivier Dugeon [Tue, 6 Oct 2020 14:42:41 +0000 (16:42 +0200)]
Merge pull request #7202 from gromit1811/proposed_fix_7030

ospf6d: Fix flooding of old copies of self-originated LSAs

3 years agoMerge pull request #7113 from donaldsharp/bgp_bestpath_origin
Russ White [Tue, 6 Oct 2020 14:41:31 +0000 (10:41 -0400)]
Merge pull request #7113 from donaldsharp/bgp_bestpath_origin

bgpd: allow bestpath to handle mutliple locally-originated paths

3 years agotests: bgp_l3vpn_to_bgp_vrf - verify details of exported/imported routes
Lou Berger [Thu, 1 Oct 2020 12:55:32 +0000 (08:55 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - verify details of exported/imported routes

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agotests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics
Lou Berger [Wed, 30 Sep 2020 14:50:57 +0000 (10:50 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - change 1 route to have equal metrics

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agotests: bgp_l3vpn_to_bgp_vrf - add bestpath checks
Lou Berger [Wed, 30 Sep 2020 04:09:46 +0000 (00:09 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - add bestpath checks

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agotests: lib/bgprib.py - add bestpath checks and logging to lu log file
Lou Berger [Wed, 30 Sep 2020 04:09:04 +0000 (00:09 -0400)]
tests: lib/bgprib.py - add bestpath checks and logging to lu log file

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agotests: bgp_l3vpn_to_bgp_vrf - add redundant ce routes
Lou Berger [Tue, 29 Sep 2020 18:23:32 +0000 (14:23 -0400)]
tests: bgp_l3vpn_to_bgp_vrf - add redundant ce routes

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agobgpd: allow bestpath to handle mutliple locally-originated paths
Donald Sharp [Wed, 16 Sep 2020 19:04:16 +0000 (15:04 -0400)]
bgpd: allow bestpath to handle mutliple locally-originated paths

Current code in bgp bestpath selection would accept the newest
locally originated path as the best path.  Making the selection
non-deterministic.  Modify the code to always come to the
same bestpath conclusion when you have multiple locally originated
paths in bestpath selection.

Before:

eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#  redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:03:32 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#

Notice the route choosen depends on order received

Fixed behavior:

eva# conf
eva(config)# router bgp 323
eva(config-router)# address-family ipv4 uni
eva(config-router-af)# redistribute connected
eva(config-router-af)# network 192.168.161.0/24
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:02:52 2020
eva(config-router-af)# no redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (1 available, best #1, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (First path received)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#  redistribute connected
eva(config-router-af)# do show bgp ipv4 uni 192.168.161.0
BGP routing table entry for 192.168.161.0/24
Paths: (2 available, best #2, table default)
  Not advertised to any peer
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin incomplete, metric 0, weight 32768, valid, sourced
      Last update: Wed Sep 16 15:03:32 2020
  Local
    0.0.0.0(eva) from 0.0.0.0 (192.168.161.245)
      Origin IGP, metric 0, weight 32768, valid, sourced, local, bestpath-from-AS Local, best (Origin)
      Last update: Wed Sep 16 15:03:03 2020
eva(config-router-af)#

Ticket: CM-31490
Found-by: Trey Aspelund <taspelund@nvidia.com>
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #6725 from donaldsharp/6712
Russ White [Tue, 6 Oct 2020 14:26:34 +0000 (10:26 -0400)]
Merge pull request #6725 from donaldsharp/6712

PIM MSDP cleanup code and commits a bit

3 years agoMerge pull request #7238 from sworleys/Nexthop-Same-First-Remove
Mark Stapp [Tue, 6 Oct 2020 12:33:35 +0000 (08:33 -0400)]
Merge pull request #7238 from sworleys/Nexthop-Same-First-Remove

lib: remove nexthop_same_firsthop() api

3 years agoMerge pull request #7214 from donaldsharp/more_vrf_usefulness
Mark Stapp [Tue, 6 Oct 2020 12:29:45 +0000 (08:29 -0400)]
Merge pull request #7214 from donaldsharp/more_vrf_usefulness

zebra: cleanup zebra_rnh.c debugs

3 years agobgpd: fix SA warnings in bgp northbound
Mark Stapp [Tue, 6 Oct 2020 12:18:59 +0000 (08:18 -0400)]
bgpd: fix SA warnings in bgp northbound

Fix a couple of new SA warnings in the new bgp northbound.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agodoc: MSDP SA forwarding
Adriano Marto Reis [Fri, 10 Jul 2020 03:59:40 +0000 (13:59 +1000)]
doc: MSDP SA forwarding

Updating the documentation.

Signed-off-by: Adriano Reis <areis@barrukka.local>
3 years agopimd: MSDP SA forwarding
Adriano Marto Reis [Thu, 9 Jul 2020 22:56:24 +0000 (08:56 +1000)]
pimd: MSDP SA forwarding

* If the MSDP peer receives the SA from a non-RPF peer towards the
originating RP, it will drop the message.
* SA messages are forwarded away from the RP address only.
* SA messages are not forwarded within the mesh group.
* Preventing the MSDP connection from being dropped due to RPF check
failure (RFC3618, section 13 "MSDP Error Handling")

Signed-off-by: Adriano Marto Reis <adrianomarto@gmail.com>
Signed-off-by: Adriano Reis <areis@barrukka.local>
3 years agotopotests: test aggregate-address matching-MED-only
Rafael Zalamena [Fri, 2 Oct 2020 14:59:50 +0000 (11:59 -0300)]
topotests: test aggregate-address matching-MED-only

Add a new topology test for `aggregate-address` to test
`matching-MED-only` and its combination with `summary-only`.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: new aggregate address option
Rafael Zalamena [Thu, 1 Oct 2020 17:57:41 +0000 (14:57 -0300)]
doc: new aggregate address option

Document the newly implemented aggregate address configuration option.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agobgpd: aggregate address matching-MED-only
Rafael Zalamena [Fri, 2 Oct 2020 18:47:17 +0000 (15:47 -0300)]
bgpd: aggregate address matching-MED-only

Add code to handle MED matching:

- When MED matches act as normal.

- When MED doesn't match do the following:

  * Uninstall the aggregate route
  * Unsuppress routes (if using summary-only)

- When MED didn't match, but now matches:

  * Install the aggregate route
  * Suppress all routes (if using summary-only)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>