* Do nothing if user tries to add the same IP twice
* Implement deletion of IPs
* Deactivate virtual router if all IPs are deleted
* Deduplicate add / remove code
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 25 Jan 2019 18:48:41 +0000 (18:48 +0000)]
vrrpd: allow searching for interfaces late
Break out code for assigning macvlan interface to a vrrp router into its
own function so it can be called multiple times. This allows bringing up
IPv4 and IPv6 at different times if all the interfaces are not created
yet.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Wed, 16 Jan 2019 23:14:40 +0000 (23:14 +0000)]
vrrpd: fix ownership discovery and mcast OIF
* Look for virtual IP ownership on the parent of the macvlan, not the
macvlan itself
* IPv4: bind socket to real IP of the macvlan parent, but transmit on
the macvlan interface
* IPv6: bind socket to IPv6 link local of the macvlan interface
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Mon, 7 Jan 2019 19:02:53 +0000 (19:02 +0000)]
vrrpd: add initial macvlan support
* Search for macvlan interfaces with the appropriate name and MAC
address when starting up a new VRRP instance
* Split VRRP socket into two; one for Tx, one for Rx
* Bind Tx socket to the macvlan subinterface so our VRRP advertisements
go out with the correct MAC address
* Send ARP requests from this macvlan subinterface
* Improve error messaging
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Wed, 19 Dec 2018 16:48:36 +0000 (16:48 +0000)]
vrrpd: read and validate vrrp advertisements
* Validate IPvX headers and packet contents
* Remove filter of non-255 TTL IPv4 packets; better to receive, log and
drop them ourselves
* Set outgoing packet TTL / hop limit to 255
* Use existing sockopt functions
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Thu, 6 Dec 2018 21:31:05 +0000 (21:31 +0000)]
vrrpd: clean up configuration code, fix skew bug
* Update vrrp.[ch] file header to be more accurate
* Make vrrp_update_times() private again
* Add times reset function and use it
* Add priority and advertisement interval setter functions and use them
* Add command to change advertisement interval
* Allow showing all VRRP instances
* Improve doc comments on functions
* Add ability to shutdown router
* Reorganize vrrp.h
* Add doc comments to vrrp.h
* Fix bug where Skew_time was not used to compute Master_Down_Interval
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Issue 1:
Getting an empty json without any warning message, while executing
the command "show ip bgp neighbor <x.x.x.x> advertised-routes
json" when the bgp instance is not present or getting created.
Issue 2:
Getting an empty json without any warning message, while executing
the command "show ip bgp vrf/view <name> advertised-routes json"
when the specified view/vrf is not present.
Fix:
Display warning message while executing the above cli commands, when
the bgp instance, specified vrf is not present.
Philippe Guibert [Tue, 14 May 2019 14:39:20 +0000 (16:39 +0200)]
bgpd: do not unregister bfd session when bgp session goes down
This commit fixes a previous commit:
"bfdd: remove operational bfd sessions from remote daemons"
where the handling of unregister call triggers the deletion of bfd
session.
Actually, the BFD session should not be deleted, while bgp session is
configured with BGP. this permits to receive BFD events up, and permit
quicker reconnecion.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Tue, 16 Apr 2019 10:16:17 +0000 (12:16 +0200)]
bfd-bgp-cbit-topo3: add bfd bgp cbit topotest test
this test simulates the case where r1 keeps staled entries of r2,
because r2 is a 'non stop forwarding' device. For instance, r2 restarts
to be upgraded, then r1 keeps the entries, thus avoiding to flush
entries in the dataplane. Here, BFD is used, and the bgp
check-control-plane-failure command is used to inform BGP that if BFD
goes down, this may be because remote peer is restarting, and this may
be necessary to keep the entries of remote.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Tue, 16 Apr 2019 09:50:47 +0000 (11:50 +0200)]
bgpd: add vty command to enable bfd control-plane-check-failure
new vty command is added:
neighbor XXX bfd check-control-plane-failure
this command will enforce the check of bgp controlplane, when bfd
detects changes in the dataplane.
- at configuration, the cbit will be set if that command is executed
- at flapping time, if the command is configured and remote cbit is set
accordingly, then the bfd event will be ignored.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Philippe Guibert [Mon, 15 Apr 2019 15:20:25 +0000 (17:20 +0200)]
bfdd, lib, bgpd: add bfd cbit usage
bfd cbit is a value carried out in bfd messages, that permit to keep or
not, the independence between control plane and dataplane. In other
words, while most of the cases plan to flush entries, when bfd goes
down, there are some cases where that bfd event should be ignored. this
is the case with non stop forwarding mechanisms where entries may be
kept. this is the case for BGP, when graceful restart capability is
used. If BFD event down happens, and bgp is in graceful restart mode, it
is wished to ignore the BFD event while waiting for the remote router to
restart.
The changes take into account the following:
- add a config flag across zebra layer so that daemon can set or not the
cbit capability.
- ability for daemons to read the remote bfd capability associated to a bfd
notification.
- in bfdd, according to the value, the cbit value is set
- in bfdd, the received value is retrived and stored in the bfd session
context.
- by default, the local cbit announced to remote is set to 1 while
preservation of the local path is not set.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Renato Westphal [Mon, 13 May 2019 18:18:57 +0000 (15:18 -0300)]
lib: fix crash in the CLI grammar sandbox
The CLI grammer sandbox needs to initialize the northbound subsystem
otherwise the running_config global variable won't be set, which
leads to crashes.
Donald Sharp [Sat, 11 May 2019 17:18:29 +0000 (13:18 -0400)]
zebra: Make coverity SA happy with zebra_routemap.c
The CLI code ensures that the clippy code produces
valid input for the zebra_routemap.c functions, but
coverity SA does not understand this fact. So add
some asserts to make the coverity SA happy.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Bug: If there are 2 different prefixes under an rd, the
output of "show bgp l2vpn evpn json" would print only one of the
prefixes.
RCA: prefix info was added to the json_object once per rd. Hence,
prefix and rd were added just once, as the loop iterated over all
the prefixes and paths.
This is related to my earlier commit that went in via PR 4283:
https://github.com/FRRouting/frr/pull/4283