]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
4 years agoMerge pull request #6466 from opensourcerouting/frr-reload-cleanup
Mark Stapp [Thu, 28 May 2020 15:06:20 +0000 (11:06 -0400)]
Merge pull request #6466 from opensourcerouting/frr-reload-cleanup

tools/frr-reload: cleanup + `--vty_socket`

4 years agoMerge pull request #6475 from donaldsharp/pim_thread_cancel
Mark Stapp [Thu, 28 May 2020 15:02:57 +0000 (11:02 -0400)]
Merge pull request #6475 from donaldsharp/pim_thread_cancel

pimd: Fix crash on restart from thread_cancel

4 years agoMerge pull request #6474 from ton31337/fix/doc_bgp_community
Donald Sharp [Thu, 28 May 2020 12:55:16 +0000 (08:55 -0400)]
Merge pull request #6474 from ton31337/fix/doc_bgp_community

doc: Update BGP show bgp (ext|large-)community-list commands

4 years agopimd: Fix crash on restart from thread_cancel
Donald Sharp [Thu, 28 May 2020 12:36:04 +0000 (08:36 -0400)]
pimd: Fix crash on restart from thread_cancel

We were using thread_cancel() directly instead of
THREAD_OFF which correctly ensures the pointer is not NULL.

Ticket:CM-29866
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agodoc: Update BGP show bgp (ext|large-)community-list commands
Donatas Abraitis [Thu, 28 May 2020 09:34:24 +0000 (12:34 +0300)]
doc: Update BGP show bgp (ext|large-)community-list commands

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6469 from mjstapp/add_ubu_20_doc
Donald Sharp [Wed, 27 May 2020 14:43:05 +0000 (10:43 -0400)]
Merge pull request #6469 from mjstapp/add_ubu_20_doc

doc: add dev doc for ubuntu 20.04

4 years agoMerge pull request #6447 from opensourcerouting/rename-bgp-vrf-leak
Donald Sharp [Wed, 27 May 2020 14:34:13 +0000 (10:34 -0400)]
Merge pull request #6447 from opensourcerouting/rename-bgp-vrf-leak

topotest: refactory BGP VRF leak basic test

4 years agodoc: add dev doc for ubuntu 20.04
Mark Stapp [Wed, 27 May 2020 12:49:36 +0000 (08:49 -0400)]
doc: add dev doc for ubuntu 20.04

Add a doc for ubuntu 20 LTS; it's mainly the same as the 18 LTS
doc, with a couple of extra notes.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agodoc: add docs for frr-reload.py options
Emanuele Di Pascale [Wed, 20 May 2020 08:20:30 +0000 (10:20 +0200)]
doc: add docs for frr-reload.py options

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agotools/frr-reload: --vty_socket arg
David Lamparter [Tue, 26 May 2020 17:12:24 +0000 (19:12 +0200)]
tools/frr-reload: --vty_socket arg

After the cleanup, adding this doesn't require updating a zillion
locations in the code anymore, just one :)

Partially derived from 6a00e91d99f7f98d857c2056d0dcfeba48966581

Originally-by: Emanuele Di Pascale <emanuele@voltanet.io>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agotools/frr-reload: cleanup pass
David Lamparter [Fri, 6 Dec 2019 19:36:33 +0000 (20:36 +0100)]
tools/frr-reload: cleanup pass

- throw vtysh into a wrapper class
- ignore "username" commands
- use mark output on stdout
- some other random cleanups

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agovtysh: add "no-header" to show running-config
David Lamparter [Thu, 8 Aug 2019 18:04:52 +0000 (20:04 +0200)]
vtysh: add "no-header" to show running-config

... to skip the "Building configuration..." header that gets in the way
of automated processing.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agovtysh: throw mark output on stdout, not stderr
David Lamparter [Fri, 6 Dec 2019 19:35:50 +0000 (20:35 +0100)]
vtysh: throw mark output on stdout, not stderr

Why is this on stderr...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #6375 from adharkar/frr-master-l3vni_label
Russ White [Tue, 26 May 2020 16:14:16 +0000 (12:14 -0400)]
Merge pull request #6375 from adharkar/frr-master-l3vni_label

bgpd: EVPN RT-2 advertised with 2 labels for prefix-routes-only config

4 years agoMerge pull request #6463 from vivek-cumulus/evpn_extend_nht
Sri Mohana Singamsetty [Tue, 26 May 2020 15:18:29 +0000 (08:18 -0700)]
Merge pull request #6463 from vivek-cumulus/evpn_extend_nht

bgpd: Extend EVPN next hop tracking for additional EVPN routes

4 years agoMerge pull request #5881 from patrasar/2386420
Donald Sharp [Tue, 26 May 2020 13:21:10 +0000 (09:21 -0400)]
Merge pull request #5881 from patrasar/2386420

pimd: add show ip multicast count [json] command

4 years agoMerge pull request #6441 from opensourcerouting/ospf-doc
Russ White [Tue, 26 May 2020 11:45:30 +0000 (07:45 -0400)]
Merge pull request #6441 from opensourcerouting/ospf-doc

ospfd: small doc and cli changes

4 years agoMerge pull request #6445 from donaldsharp/really_start_all_daemons
Russ White [Tue, 26 May 2020 11:44:48 +0000 (07:44 -0400)]
Merge pull request #6445 from donaldsharp/really_start_all_daemons

tests: Turn on nhrpd and babeld as part of all-protocol-startup

4 years agoMerge pull request #6458 from vivek-cumulus/bgp_nht_command_enhance
Russ White [Tue, 26 May 2020 11:32:12 +0000 (07:32 -0400)]
Merge pull request #6458 from vivek-cumulus/bgp_nht_command_enhance

bgpd: Enhance BGP NHT show commands

4 years agoMerge pull request #6459 from vivek-cumulus/bgp_nht_fix
Russ White [Tue, 26 May 2020 11:29:25 +0000 (07:29 -0400)]
Merge pull request #6459 from vivek-cumulus/bgp_nht_fix

Fix BGP NHT to skip inappropriate paths & only act upon change

4 years agoMerge pull request #6462 from vivek-cumulus/lib_evpn_prefix_fix
Russ White [Tue, 26 May 2020 11:28:26 +0000 (07:28 -0400)]
Merge pull request #6462 from vivek-cumulus/lib_evpn_prefix_fix

lib: Minor update to EVPN type-5 prefix display

4 years agobgpd: Extend EVPN next hop tracking for additional EVPN routes
vivek [Tue, 26 May 2020 06:00:49 +0000 (23:00 -0700)]
bgpd: Extend EVPN next hop tracking for additional EVPN routes

Extend the next hop tracking for type-2 and type-3 EVPN routes also.

Updates: "bgpd: Add nexthop of received EVPN RT-5 for nexthop tracking"
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agolib: Minor update to EVPN type-5 prefix display
vivek [Tue, 26 May 2020 05:40:44 +0000 (22:40 -0700)]
lib: Minor update to EVPN type-5 prefix display

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agobgpd: During NHT change evaluation, skip inappropriate paths
vivek [Mon, 25 May 2020 21:17:12 +0000 (14:17 -0700)]
bgpd: During NHT change evaluation, skip inappropriate paths

When there is a NHT change and the paths dependent on that NHT are being
evaluated, skip those that are marked for removal or as history.

When a route gets withdrawn, its valid flag is cleared and it is flagged
for removal; in the case of an EVPN route, it is also unimported from
VRFs (L2 and/or L3). bgp_process is then scheduled. Under rare timing
conditions, an NHT update for the route's next hop may arrive right after,
and if routes flagged for removal are not skipped, they may not only be
incorrectly marked as valid but also re-imported in the case of EVPN,
which will be a serious error.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agobgpd: Check NHT change for triggering EVPN import or unimport
vivek [Mon, 25 May 2020 21:15:37 +0000 (14:15 -0700)]
bgpd: Check NHT change for triggering EVPN import or unimport

Ensure that only if there is a change to the path's validity based
on the NHT update, EVPN import or unimport is invoked.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agobgpd: Enhance NHT path evaluation debugs
vivek [Mon, 25 May 2020 21:10:12 +0000 (14:10 -0700)]
bgpd: Enhance NHT path evaluation debugs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agobgpd: Minor tweaks to EVPN route-import debugs
vivek [Mon, 25 May 2020 21:06:10 +0000 (14:06 -0700)]
bgpd: Minor tweaks to EVPN route-import debugs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agobgpd: Enhance BGP NHT show commands
vivek [Mon, 25 May 2020 20:48:37 +0000 (13:48 -0700)]
bgpd: Enhance BGP NHT show commands

Display next hop resolution information, whether the "detail" option is
specified or not as it is quite fundamental and only minimally increases
the output.

Introduce option to look at a specific NHT entry, which will also show
the paths associated with that entry.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
4 years agotopotest: refactory BGP VRF leak basic test
Rafael Zalamena [Sun, 24 May 2020 20:54:00 +0000 (17:54 -0300)]
topotest: refactory BGP VRF leak basic test

Changes:
- Renamed file so we don't get confused when it fails.
- Use `json_cmp` instead of direct key access.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: show timers value for 'timers throttle spf'
Rafael Zalamena [Fri, 22 May 2020 14:30:59 +0000 (11:30 -0300)]
doc: show timers value for 'timers throttle spf'

Lets show the timers range in the documentation for this particular command.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoospfd: change retransmit-interval minimum value
Rafael Zalamena [Thu, 21 May 2020 21:47:00 +0000 (18:47 -0300)]
ospfd: change retransmit-interval minimum value

The command `area ... virtual-link ... retransmit-interval` supports
1-65535 range and the documentation already said
`ip ospf retransmit-interval` supports that, lets make the DEFUN to
accept that value.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: add transmit-delay interval range
Rafael Zalamena [Thu, 21 May 2020 21:43:52 +0000 (18:43 -0300)]
doc: add transmit-delay interval range

The OSPF doc was missing the interval range values.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotests: Turn on nhrpd and babeld as part of all-protocol-startup
Donald Sharp [Sat, 23 May 2020 23:44:04 +0000 (19:44 -0400)]
tests: Turn on nhrpd and babeld as part of all-protocol-startup

Turn on a few more daemons to run during this test.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6402 from donaldsharp/fix_rtadv_stuff
Sri Mohana Singamsetty [Sat, 23 May 2020 22:48:10 +0000 (15:48 -0700)]
Merge pull request #6402 from donaldsharp/fix_rtadv_stuff

Fix rtadv stuff

4 years agoMerge pull request #6443 from GalaxyGorilla/json_diff_fix
Donald Sharp [Sat, 23 May 2020 19:37:10 +0000 (15:37 -0400)]
Merge pull request #6443 from GalaxyGorilla/json_diff_fix

tests: Fix JSON diff for nested lists

4 years agotests: Fix JSON diff for nested lists
GalaxyGorilla [Fri, 22 May 2020 21:18:46 +0000 (21:18 +0000)]
tests: Fix JSON diff for nested lists

The involved piece of code is supposed to find a 'closest' match for two
JSON structures using another JSON diff. However, it can happen that
during that new diff the JSON structures are altered (elements from a
list are deleted when 'found'). This is in general ok when the deleted
element is part of the JSON structure which 'matches', but when it later
turns out that some other element of the structure doesn't fit, then the
whole structure should be recovered. This is now realized by using a
deepcopy for the besaid new JSON diff such that the original is only
altered (e.g. deleted) when the diff is clean.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
4 years agoMerge pull request #6407 from donaldsharp/revert_ospfv3_fix
Russ White [Thu, 21 May 2020 19:15:07 +0000 (15:15 -0400)]
Merge pull request #6407 from donaldsharp/revert_ospfv3_fix

ospf6d: Revert "ospf6d: Prevent use after free"

4 years agoMerge pull request #6293 from GalaxyGorilla/json_diff
Donald Sharp [Thu, 21 May 2020 18:19:44 +0000 (14:19 -0400)]
Merge pull request #6293 from GalaxyGorilla/json_diff

tests: introduce a proper JSON diff for topotests

4 years agoMerge pull request #6423 from rgirada/ospf_tag
Donald Sharp [Thu, 21 May 2020 16:43:23 +0000 (12:43 -0400)]
Merge pull request #6423 from rgirada/ospf_tag

ospfd: Route-tag is not set to external routes when applied using route maps

4 years agoMerge pull request #6056 from sarav511/jpexp
Donald Sharp [Thu, 21 May 2020 12:08:29 +0000 (08:08 -0400)]
Merge pull request #6056 from sarav511/jpexp

pimd: Prune->noinfo state has to put off join expiry timer and delete ifchannel

4 years agoMerge pull request #6321 from ton31337/fix/configuration_for_labeled_in_place
Donald Sharp [Thu, 21 May 2020 11:58:11 +0000 (07:58 -0400)]
Merge pull request #6321 from ton31337/fix/configuration_for_labeled_in_place

bgpd: Make sure network/aggregate-address commands lay down under lab…

4 years agozebra: Allow zebra to gracefully handle rtadv when not configured
Donald Sharp [Thu, 14 May 2020 13:58:36 +0000 (09:58 -0400)]
zebra: Allow zebra to gracefully handle rtadv when not configured

Currently zebra when you compile without router advertisements
will just say something like `cannot handle message 42`.  Which
is not terribly useful to an end user.

Add some smarts to the zapi message handling to just do nothing
and output a debug if someone has it turned on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: allow rtadv.c to compile with `--enable-rtadv=no`
Donald Sharp [Thu, 14 May 2020 13:56:37 +0000 (09:56 -0400)]
zebra: allow rtadv.c to compile with `--enable-rtadv=no`

The rtadv.c code was not properly compiling if you turned
off router advertisements in zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #6398 from kuldeepkash/bgp_multi_vrf
Donald Sharp [Thu, 21 May 2020 11:40:17 +0000 (07:40 -0400)]
Merge pull request #6398 from kuldeepkash/bgp_multi_vrf

tests: Add bgp-multi-vrf test suites

4 years agoMerge pull request #6432 from opensourcerouting/bfd-profiles
Donald Sharp [Thu, 21 May 2020 11:01:40 +0000 (07:01 -0400)]
Merge pull request #6432 from opensourcerouting/bfd-profiles

bfdd: support pre configured peer profiles

4 years agoMerge pull request #6425 from opensourcerouting/nb-state-cbs-fixes
Donald Sharp [Wed, 20 May 2020 23:27:41 +0000 (19:27 -0400)]
Merge pull request #6425 from opensourcerouting/nb-state-cbs-fixes

northbound state callbacks fixes

4 years agobfdd: remove profile pointers on removal
Rafael Zalamena [Wed, 20 May 2020 18:09:12 +0000 (15:09 -0300)]
bfdd: remove profile pointers on removal

Remove all profile references on removal and free all resources on shutdown.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document the new BFD profile commands
Rafael Zalamena [Wed, 20 May 2020 13:37:30 +0000 (10:37 -0300)]
doc: document the new BFD profile commands

Let the user know we have BFD profiles and how they work.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobfdd: implement BFD session configuration profiles
Rafael Zalamena [Fri, 15 May 2020 20:38:04 +0000 (17:38 -0300)]
bfdd: implement BFD session configuration profiles

Allow user to pre-configure peers with a profile. If a peer is using a
profile any configuration made to the peer will take precedence over
the profile configuration.

In order to track the peer configuration we have now an extra copy of
the peer configuration in `peer_profile` inside `struct bfd_session`.
This information will help the profile functions to detect user
configurations and avoid overriding what the user configured. This is
especially important for peers created via other protocols where the
default `shutdown` state is disabled (peers created manually are
`shutdown` by default).

Profiles can be used before they exist: if no profile exists then it
will use the default configuration.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #6431 from mjstapp/fix_bgp_dup_cli_cmds
Renato Westphal [Wed, 20 May 2020 15:30:54 +0000 (12:30 -0300)]
Merge pull request #6431 from mjstapp/fix_bgp_dup_cli_cmds

bgpd: remove duplicate cli command installation

4 years agobfdd,lib,vtysh: new command node for BFD profiles
Rafael Zalamena [Fri, 15 May 2020 18:24:59 +0000 (15:24 -0300)]
bfdd,lib,vtysh: new command node for BFD profiles

Add the necessary code to implement the BFD profile command node.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoyang: support BFD session profiles
Rafael Zalamena [Fri, 15 May 2020 20:35:42 +0000 (17:35 -0300)]
yang: support BFD session profiles

Allow sessions to use BFD profile configurations instead of having to
clone the configuration per peer.

If using a profile and setting a peer configuration, the peer
configuration will take precedence over the profile.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: remove duplicate cli command installation
Mark Stapp [Wed, 20 May 2020 12:25:49 +0000 (08:25 -0400)]
bgpd: remove duplicate cli command installation

Clean up a few lines of cli command installation; remove a
duplicate; follow the command grouping pattern better.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #6429 from volta-networks/fix_isis_link_params
Olivier Dugeon [Wed, 20 May 2020 08:49:16 +0000 (10:49 +0200)]
Merge pull request #6429 from volta-networks/fix_isis_link_params

isisd: set TE link params on circuit creation

4 years agotests: Enhance bgp-ecmp-topo2 script as per latest framework changes
Kuldeep Kashyap [Thu, 14 May 2020 05:14:28 +0000 (05:14 +0000)]
tests: Enhance bgp-ecmp-topo2 script as per latest framework changes

1. Few tests are enhanced as per latest framework changes.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agotests: Add bgp-multi-vrf-topo2 testsuite
Kuldeep Kashyap [Wed, 13 May 2020 18:38:41 +0000 (18:38 +0000)]
tests: Add bgp-multi-vrf-topo2 testsuite

1. Adding 4 testcases to this testsuite to verify BGP multi-vrf functionality
2. Adding supporting JSON file to create topology and base config
3. Execution time is ~3 mins

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agotests: Add bgp-multi-vrf-topo1 testsuite
Kuldeep Kashyap [Wed, 13 May 2020 18:33:36 +0000 (18:33 +0000)]
tests: Add bgp-multi-vrf-topo1 testsuite

1. Adding 22 testcases to this testsuite to verify BGP multi-vrf functionality
2. Adding supporting JSON file to create topology and base config
3. Execution time is ~7 mins.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agotests: Framework support for BGP Multi-VRF automation
Kuldeep Kashyap [Wed, 13 May 2020 17:53:05 +0000 (17:53 +0000)]
tests: Framework support for BGP Multi-VRF automation

1. Added/Enhanced APIs to created bgp multi-vrf config and to
verify config/functionality

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoMerge pull request #6427 from mjstapp/frr-reload-doc
Sri Mohana Singamsetty [Wed, 20 May 2020 03:35:58 +0000 (20:35 -0700)]
Merge pull request #6427 from mjstapp/frr-reload-doc

doc: add a doc for the frr-reload script

4 years agoMerge pull request #6426 from pguibert6WIND/update_ifname_before_hook
Stephen Worley [Tue, 19 May 2020 17:58:48 +0000 (13:58 -0400)]
Merge pull request #6426 from pguibert6WIND/update_ifname_before_hook

Update ifname before hook

4 years agoMerge pull request #6417 from opensourcerouting/bfdd-duplicated
Quentin Young [Tue, 19 May 2020 17:37:26 +0000 (13:37 -0400)]
Merge pull request #6417 from opensourcerouting/bfdd-duplicated

bfdd: remove duplicated code and fix comment

4 years agoMerge pull request #6428 from volta-networks/fix_mpls_te_bw
Quentin Young [Tue, 19 May 2020 17:29:00 +0000 (13:29 -0400)]
Merge pull request #6428 from volta-networks/fix_mpls_te_bw

lib: fix bandwidth multiplier for link param

4 years agoMerge pull request #6339 from opensourcerouting/ds-const-redux
Mark Stapp [Tue, 19 May 2020 17:27:47 +0000 (13:27 -0400)]
Merge pull request #6339 from opensourcerouting/ds-const-redux

redux lists/datastructure const

4 years agoisisd: set TE link params on circuit creation
Emanuele Di Pascale [Tue, 19 May 2020 16:04:39 +0000 (18:04 +0200)]
isisd: set TE link params on circuit creation

if mpls-te is enabled in the area, on creating a circuit we
must refresh the link params - else interfaces that are enabled
for IS-IS after configuring 'mpls-te on' will not correctly
advertise link parameters.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6389 from mjstapp/fix_recursive_label_type
Russ White [Tue, 19 May 2020 15:42:36 +0000 (11:42 -0400)]
Merge pull request #6389 from mjstapp/fix_recursive_label_type

zebra: prefer outer label_type for recursive nexthops

4 years agoMerge pull request #6419 from vivek-cumulus/zebra_macfdb_fixup
Sri Mohana Singamsetty [Tue, 19 May 2020 15:18:37 +0000 (08:18 -0700)]
Merge pull request #6419 from vivek-cumulus/zebra_macfdb_fixup

Zebra macfdb fixup

4 years agolib: fix bandwidth multiplier for link param
Emanuele Di Pascale [Tue, 19 May 2020 13:53:02 +0000 (15:53 +0200)]
lib: fix bandwidth multiplier for link param

in the CLI we state that the bandwidth of a link is
in Megabits per second, but when converting it to
Bytes per second for TE purposes we were treating
it as Kilobits. Fix the conversion error.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #6351 from opensourcerouting/fpm-nh
Stephen Worley [Tue, 19 May 2020 15:01:03 +0000 (11:01 -0400)]
Merge pull request #6351 from opensourcerouting/fpm-nh

fpm: explicit next hop groups control

4 years agodoc: add a doc for the frr-reload script
Mark Stapp [Tue, 19 May 2020 14:06:33 +0000 (10:06 -0400)]
doc: add a doc for the frr-reload script

Add a skeleton frr-reload doc, so we have a place to capture
info about the script's options.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib, zebra: update interface name at netlink creation
Philippe Guibert [Tue, 19 May 2020 11:57:08 +0000 (12:57 +0100)]
lib, zebra: update interface name at netlink creation

the interface name was not present in the hook in charge of updating the
interface context to the registered hook service. For that, update the
name before informing it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #5077 from pguibert6WIND/vxlan_link
Donatas Abraitis [Tue, 19 May 2020 06:12:38 +0000 (09:12 +0300)]
Merge pull request #5077 from pguibert6WIND/vxlan_link

BGP EVPN vrf netns backend

4 years agoMerge pull request #6344 from dslicenc/ospf6-routemap-delete
Russ White [Mon, 18 May 2020 22:52:46 +0000 (18:52 -0400)]
Merge pull request #6344 from dslicenc/ospf6-routemap-delete

ospf6d: withdraw redistributed prefixes based on prefix-list changes

4 years agoMerge pull request #6420 from vivek-cumulus/bgpd-paths-cleanup
Russ White [Mon, 18 May 2020 21:24:48 +0000 (17:24 -0400)]
Merge pull request #6420 from vivek-cumulus/bgpd-paths-cleanup

bgpd: Free non-best paths also during table cleanup

4 years agoMerge pull request #6421 from vivek-cumulus/zebra_trust_onlink
Russ White [Mon, 18 May 2020 21:23:57 +0000 (17:23 -0400)]
Merge pull request #6421 from vivek-cumulus/zebra_trust_onlink

zebra: Trust onlink flag for nexthop active resolution

4 years agozebra: support for macvlan interfaces
Philippe Guibert [Thu, 6 Feb 2020 08:33:21 +0000 (09:33 +0100)]
zebra: support for macvlan interfaces

mac vlan interfaces are supported in different network namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agodoc: add some documentation about bgp evpn netns support
Philippe Guibert [Thu, 6 Feb 2020 08:32:21 +0000 (09:32 +0100)]
doc: add some documentation about bgp evpn netns support

a linux configuration gives some explanation on how to set up an evpn
overlay in network namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: dynamically detect vxlan link interfaces in other netns
Philippe Guibert [Mon, 6 Jan 2020 16:39:17 +0000 (17:39 +0100)]
zebra: dynamically detect vxlan link interfaces in other netns

this is used when parsing the newly network namespaces. actually, to
track the link of some interfaces like vxlan interfaces, both link index
and link nsid are necessary. if a vxlan interface is moved to a new
netns, the link information is in the default network namespace, then
LINK_NSID is the value of the netns by default in the new netns. That
value of the default netns in the new netns is not known, because the
system does not automatically assign an NSID of default network
namespace in the new netns. Now a new NSID of default netns, seen from
that new netns, is created. This permits to store at netns creation the
default netns relative value for further usage.
Because the default netns value is set from the new netns perspective,
it is not needed anymore to use the NETNSA_TARGET_NSID attribute only
available in recent kernels.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: sanity check when updating nexthop from bgp to zebra
Philippe Guibert [Fri, 3 Jan 2020 18:03:18 +0000 (19:03 +0100)]
bgpd: sanity check when updating nexthop from bgp to zebra

nexthop may sometimes not be passed through zebra, like for onlink
messages.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agolib, zebra: reuse and adapt ns_list walk functionality
Philippe Guibert [Fri, 20 Dec 2019 16:51:37 +0000 (17:51 +0100)]
lib, zebra: reuse and adapt ns_list walk functionality

the walk routine is used by vxlan service to identify some contexts in
each specific network namespace, when vrf netns backend is used. that
walk mechanism is extended with some additional paramters to the walk
routine.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: local mac entries populated in correct netnamespace
Philippe Guibert [Mon, 28 Oct 2019 11:02:17 +0000 (12:02 +0100)]
zebra: local mac entries populated in correct netnamespace

MAC address neighbours are read on the same netnamespace where the vxlan
interface is.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: when parsing local entry against dad, retrieve config
Philippe Guibert [Fri, 25 Oct 2019 12:25:00 +0000 (14:25 +0200)]
zebra: when parsing local entry against dad, retrieve config

when duplicate address detection is observed, some incrementation,
some timing mechanisms need to be done. For that the main evpn
configuration is retrieved. Until now, the VRF that was storing the dad
config parameters was the same VRF that hosted the VXLAN interface. With
netns backend, this is not true, as the VXLAN interface is in the
same VRF as the bridge interface. The modification takes same definition
as in BGP, that is to say that there is a single bgp evpn instance, and
this is that instance that will give the correct config settings.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agobgpd: evpn nexthop can be changed by default
Philippe Guibert [Fri, 11 Oct 2019 12:11:13 +0000 (14:11 +0200)]
bgpd: evpn nexthop can be changed by default

There can be cases where evpn traffic is not meshed across various
endpoints, but sent to a central pe. For this situation, remove the
nexthop unchanged default behaviour for bgp evpn. Also add route
reflector commands to bgp evpn node.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: zvni_map_to_vlan() adaptation for all namespaces
Philippe Guibert [Wed, 9 Oct 2019 11:59:37 +0000 (13:59 +0200)]
zebra: zvni_map_to_vlan() adaptation for all namespaces

this change is needed when a MAC/IP entry is learned by zebra, and the
entry happens to be in a different namespace. So that the entry be
active, the correct vni match has to be found.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: fdb and neighbor table are read for all zns
Philippe Guibert [Fri, 27 Sep 2019 13:46:22 +0000 (15:46 +0200)]
zebra: fdb and neighbor table are read for all zns

all network namespaces are read so as to collect interesting fdb and
neighbor tables for EVPN.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: add ns_id attribute to mac structure
Philippe Guibert [Wed, 9 Oct 2019 09:34:46 +0000 (11:34 +0200)]
zebra: add ns_id attribute to mac structure

this information is necessary for local information, because the
interface associated to the mac address is stored with its ifindex, and
the ifindex may not be enough to get to the right interface when it
comes with multiple network namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: bridge layer2 information records ns_id where bridge is
Philippe Guibert [Thu, 3 Oct 2019 15:11:37 +0000 (17:11 +0200)]
zebra: bridge layer2 information records ns_id where bridge is

when working with vrf netns backend, two bridges interfaces may have the
same bridge interface index, but not the same namespace. because in vrf
netns backend mode, a bridge slave always belong to the same network
namespace, then a check with the namespace id and the ns id of the
bridge interface permits to resolve correctly the interface pointer.
The problem could occur if a same index of two bridge interfaces can be
found on two different namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra, lib: new API to get absolute netns val from relative netns val
Philippe Guibert [Wed, 2 Oct 2019 11:37:11 +0000 (13:37 +0200)]
zebra, lib: new API to get absolute netns val from relative netns val

when receiving a netlink API for an interface in a namespace, this
interface may come with LINK_NSID value, which means that the interface
has its link in an other namespace. Unfortunately, the link_nsid value
is self to that namespace, and there is a need to know what is its
associated nsid value from the default namespace point of view.
The information collected previously on each namespace, can then be
compared with that value to check if the link belongs to the default
namespace or not.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra, lib: store relative default ns id in each namespace
Philippe Guibert [Wed, 2 Oct 2019 11:34:40 +0000 (13:34 +0200)]
zebra, lib: store relative default ns id in each namespace

to be able to retrieve the network namespace identifier for each
namespace, the ns id is stored in each ns context. For default
namespace, the netns id is the same as that value.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra, lib: add an internal API to get relative default nsid in other ns
Philippe Guibert [Wed, 2 Oct 2019 10:14:13 +0000 (12:14 +0200)]
zebra, lib: add an internal API to get relative default nsid in other ns

as remind, the netns identifiers are local to a namespace. that is to
say that for instance, a vrf <vrfx> will have a netns id value in one
netns, and have an other netns id value in one other netns.
There is a need for zebra daemon to collect some cross information, like
the LINK_NETNSID information from interfaces having link layer in an
other network namespace. For that, it is needed to have a global
overview instead of a relative overview per namespace.
The first brick of this change is an API that sticks to netlink API,
that uses NETNSA_TARGET_NSID. from a given vrf vrfX, and a new vrf
created vrfY, the API returns the value of nsID from vrfX, inside the
new vrf vrfY.
The brick also gets the ns id value of default namespace in each other
namespace. An additional value in ns.h is offered, that permits to
retrieve the default namespace context.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: map vxlan interface to bridge interface with correct ns id
Philippe Guibert [Tue, 1 Oct 2019 09:07:13 +0000 (11:07 +0200)]
zebra: map vxlan interface to bridge interface with correct ns id

an incoming bridge index has been found, that is linked with vxlan
interface, and the search for that bridge interface is done. In
vrf-lite, the search is done across the same default namespace, because
bridge and vxlan may not be in the same vrf. But this behaviour is wrong
when using vrf netns backend, as the bridge and the vxlan have to be in
the same vrf ( hence in the same network namespace). To comply with
that, use the netnamespace of the vxlan interface. Like that, the
appropriate nsid is passed as parameter, and consequently, the search is
correct, and the mac address passed to BGP will be ok too.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: display interface slave type
Philippe Guibert [Fri, 27 Sep 2019 13:12:27 +0000 (15:12 +0200)]
zebra: display interface slave type

interface slave type is displayed.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: zvni_map_to_svi() adaptation for other network namespaces
Philippe Guibert [Fri, 27 Sep 2019 13:45:42 +0000 (15:45 +0200)]
zebra: zvni_map_to_svi() adaptation for other network namespaces

the function is called with all the network namespaces.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: zvni_from_svi() adaptation for other network namespaces
Philippe Guibert [Fri, 27 Sep 2019 09:17:20 +0000 (11:17 +0200)]
zebra: zvni_from_svi() adaptation for other network namespaces

other network namespaces are parsed because bridge interface can be
bridged with vxlan interfaces with a link in the default vrf that hosts
l2vpn.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: importation of bgp evpn rt5 from vni with other netns
Philippe Guibert [Thu, 26 Sep 2019 16:49:59 +0000 (18:49 +0200)]
zebra: importation of bgp evpn rt5 from vni with other netns

With vrf-lite mechanisms, it is possible to create layer 3 vnis by
creating a bridge interface in default vr, by creating a vxlan interface
that is attached to that bridge interface, then by moving the vxlan
interface to the wished vrf.
With vrf-netns mechanism, it is slightly different since bridged
interfaces can not be separated in different network namespaces. To make
it work, the setup consists in :
- creating a vxlan interface on default vrf.
- move the vxlan interface to the wished vrf ( with an other netns)
- create a bridge interface in the wished vrf
- attach the vxlan interface to that bridged interface

from that point, if BGP is enabled to advertise vnis in default vrf,
then vxlan interfaces are discovered appropriately in other vrfs,
provided that the link interface still resides in the vrf where l2vpn is
advertised.
to import ipv4 entries from a separate vrf, into the l2vpn, the
configuration of vni in the dedicated vrf + the advertisement of ipv4
entries in bgp vrf will import the entries in the bgp l2vpn.

the modification consists in parsing the vxlan interfaces in all network
namespaces, where the link resides in the same network namespace as the
bgp core instance where bgp l2vpn is enabled.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agozebra: across network namespace, vxlan remembers the link information
Philippe Guibert [Tue, 24 Sep 2019 08:44:58 +0000 (10:44 +0200)]
zebra: across network namespace, vxlan remembers the link information

the link information of vxlan interface is populated in layer 2
information, as well as in layer 2 vxlan information. This information
will be used later to collect vnis that are in other network namespaces,
but where bgp evpn is enabled on main network namespaces, and those vnis
have the link information in that namespace.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
4 years agoMerge pull request #6406 from donaldsharp/ospf_multi_instance_start_fix
Donatas Abraitis [Mon, 18 May 2020 11:51:17 +0000 (14:51 +0300)]
Merge pull request #6406 from donaldsharp/ospf_multi_instance_start_fix

tools: Only load instances or daemon

4 years agoospfd: Restoring the original tag in external lsas
rgirada [Mon, 18 May 2020 05:02:34 +0000 (22:02 -0700)]
ospfd: Restoring the original tag in external lsas

Description:
When a routemap applied to set a tag, all the permitted routes are
refreshed with new tag, but when a different route map applied with
a different action still the same tag persits in the external route.
The actual tag received from zebra is expected to be set back to the
routes here. Corrected this behaviour by restoring a original tag
received from zebra.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoospfd: Route-tag is not set to external lsas when applying with rmap
rgirada [Mon, 18 May 2020 04:40:48 +0000 (21:40 -0700)]
ospfd: Route-tag is not set to external lsas when applying with rmap

Description:
Route-tag is not set to external lsas originated by ospf when a routemap
applied by setting a specific tag. When applying a route-map on redistribution,
external lsas will be refreshed if there is any change in the route parametrs
after applying routemap. But changing tag is not handled here.
Added the apripriate fix to correct this.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
4 years agoMerge pull request #6422 from rudis/master
Donatas Abraitis [Sun, 17 May 2020 11:31:02 +0000 (14:31 +0300)]
Merge pull request #6422 from rudis/master

Doc: minor fixes

4 years agodoc: ospf_fundamentals: fix typos
Simon Ruderich [Sat, 16 May 2020 08:16:53 +0000 (10:16 +0200)]
doc: ospf_fundamentals: fix typos

Signed-off-by: Simon Ruderich <simon@ruderich.org>