]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agovrrpd: minor cosmetic fix for sh vrrp
Quentin Young [Tue, 12 Feb 2019 17:34:00 +0000 (17:34 +0000)]
vrrpd: minor cosmetic fix for sh vrrp

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: set sockets to -1 after closing
Quentin Young [Mon, 11 Feb 2019 21:22:05 +0000 (21:22 +0000)]
vrrpd: set sockets to -1 after closing

This also fixes a bug where assigning the same address as a VIP twice
would succeed the second time even if it actually failed both times.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix missing \n in cli
Quentin Young [Mon, 11 Feb 2019 21:21:49 +0000 (21:21 +0000)]
vrrpd: fix missing \n in cli

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: autoconfig support, continued
Quentin Young [Mon, 11 Feb 2019 20:44:49 +0000 (20:44 +0000)]
vrrpd: autoconfig support, continued

* Add support for interface up/down + address add/del events when using
  autoconfigure mode
* Add autoconfig information to show command

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: allow creation of adverts with no addresses
Quentin Young [Mon, 11 Feb 2019 16:36:09 +0000 (16:36 +0000)]
vrrpd: allow creation of adverts with no addresses

Fuzz testing revealed a crash in which VRRPD tries to create an
advertisement packet with no IP addresses. Should never occur under
normal use but might as well patch.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: ingress pkt validation dbg cleanups
Quentin Young [Sat, 9 Feb 2019 07:02:34 +0000 (07:02 +0000)]
vrrpd: ingress pkt validation dbg cleanups

* Use proper format specifiers for some data
* Print the correct sizes when reporting IP size errors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: don't restart when changing priority
Quentin Young [Fri, 8 Feb 2019 19:52:24 +0000 (19:52 +0000)]
vrrpd: don't restart when changing priority

Both master and backup should be able to react to priority changes
without requiring a restart.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: properly find iface in manual cfg mode
Quentin Young [Fri, 8 Feb 2019 19:47:55 +0000 (19:47 +0000)]
vrrpd: properly find iface in manual cfg mode

As a crutch, interface search when manually configuring VRRP on an
interface did a prefix match on the name of macvlan interfaces,
comparing its name to the name of the interface VRRP was configured on
in order to determine if the interface under question was a subinterface
of the configured interface. This is obviously fragile and prone to
failure. We now pass up parent interface info from Zebra so use that
instead to correctly deduce parent-child relationships.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: autoconfig support
Quentin Young [Thu, 7 Feb 2019 23:48:49 +0000 (23:48 +0000)]
vrrpd: autoconfig support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: add cli for preempt mode
Quentin Young [Wed, 6 Feb 2019 21:19:06 +0000 (21:19 +0000)]
vrrpd: add cli for preempt mode

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: specify version when parsing vrrp packet
Quentin Young [Wed, 6 Feb 2019 16:49:19 +0000 (16:49 +0000)]
vrrpd: specify version when parsing vrrp packet

Move a bit more validation into vrrp_packet.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix skew time calculation
Quentin Young [Wed, 6 Feb 2019 16:38:38 +0000 (16:38 +0000)]
vrrpd: fix skew time calculation

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: protodown macvlan in backup state
Quentin Young [Tue, 5 Feb 2019 22:02:40 +0000 (22:02 +0000)]
vrrpd: protodown macvlan in backup state

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: add support for VRRPv2
Quentin Young [Mon, 4 Feb 2019 19:56:12 +0000 (19:56 +0000)]
vrrpd: add support for VRRPv2

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: better logging for advertisement rx
Quentin Young [Mon, 4 Feb 2019 17:42:39 +0000 (17:42 +0000)]
vrrpd: better logging for advertisement rx

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: use ipaddr size macro
Quentin Young [Fri, 1 Feb 2019 21:26:45 +0000 (21:26 +0000)]
vrrpd: use ipaddr size macro

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add sizing macro to ipaddr.h
Quentin Young [Fri, 1 Feb 2019 21:23:02 +0000 (21:23 +0000)]
lib: add sizing macro to ipaddr.h

Useful for getting the size of the relevant data in the `ip` field of
struct ipaddr.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: use address cmp for priority tiebreak
Quentin Young [Fri, 1 Feb 2019 21:22:18 +0000 (21:22 +0000)]
vrrpd: use address cmp for priority tiebreak

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: check rx'd advertisement checksum
Quentin Young [Fri, 1 Feb 2019 20:54:44 +0000 (20:54 +0000)]
vrrpd: check rx'd advertisement checksum

And retrieve source address, since we need it anyway.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: cleanup vrrp packet crafting code
Quentin Young [Fri, 1 Feb 2019 18:49:16 +0000 (18:49 +0000)]
vrrpd: cleanup vrrp packet crafting code

* Prefix all packet functions with 'vrrp_pkt'
* Break out checksum computation into separate function
* Accept version field when building advertisements
* Update doc comments

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: use correct mtypes
Quentin Young [Fri, 1 Feb 2019 17:55:56 +0000 (17:55 +0000)]
vrrpd: use correct mtypes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: handle address deletion, don't accept dupes
Quentin Young [Wed, 30 Jan 2019 21:47:55 +0000 (21:47 +0000)]
vrrpd: handle address deletion, don't accept dupes

* 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>
5 years agovrrpd: same VRID, different interface
Quentin Young [Tue, 29 Jan 2019 20:51:35 +0000 (20:51 +0000)]
vrrpd: same VRID, different interface

Identify VRRP instances by the 2-tuple (ifp, vrid) instead of by VRID,
allowing the same instance to be configured on different interfaces.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix headers
Quentin Young [Tue, 29 Jan 2019 19:59:01 +0000 (19:59 +0000)]
vrrpd: fix headers

* Add include guards where missing
* Add include guard comments where missing
* Fix copyright notices
* Sort includes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: improve show vrrp
Quentin Young [Tue, 29 Jan 2019 19:17:15 +0000 (19:17 +0000)]
vrrpd: improve show vrrp

* Dump all relevant interface names for each instance
* Compact IPvX address display

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: send ND Router Advertisements
Quentin Young [Mon, 28 Jan 2019 20:15:00 +0000 (20:15 +0000)]
vrrpd: send ND Router Advertisements

Send ND Router Advertisements when IPv6 VR is in Master state.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: send ICMPv6 Neighbor Advertisements
Quentin Young [Sun, 27 Jan 2019 23:08:01 +0000 (23:08 +0000)]
vrrpd: send ICMPv6 Neighbor Advertisements

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add function to get iface link-local
Quentin Young [Fri, 25 Jan 2019 21:48:17 +0000 (21:48 +0000)]
lib: add function to get iface link-local

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: allow searching for interfaces late
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>
5 years agovrrpd: implement `no` variants of commands
Quentin Young [Fri, 25 Jan 2019 17:54:34 +0000 (17:54 +0000)]
vrrpd: implement `no` variants of commands

Except removing v4/v6 addresses

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: unset active flag on shutdown
Quentin Young [Fri, 25 Jan 2019 16:26:13 +0000 (16:26 +0000)]
vrrpd: unset active flag on shutdown

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix priority setting
Quentin Young [Thu, 24 Jan 2019 20:36:48 +0000 (20:36 +0000)]
vrrpd: fix priority setting

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: disable multicast loopback
Quentin Young [Wed, 23 Jan 2019 22:59:07 +0000 (22:59 +0000)]
vrrpd: disable multicast loopback

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: remove bad priority check
Quentin Young [Wed, 23 Jan 2019 22:31:25 +0000 (22:31 +0000)]
vrrpd: remove bad priority check

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix a few bad XFREEs
Quentin Young [Wed, 23 Jan 2019 22:30:02 +0000 (22:30 +0000)]
vrrpd: fix a few bad XFREEs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: compute VRRPv3 checksum
Quentin Young [Tue, 22 Jan 2019 22:49:58 +0000 (22:49 +0000)]
vrrpd: compute VRRPv3 checksum

Correctly compute VRRPv3 checksum. Pseudoheaders are used for both IPv4
and IPv6.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add internet checksum with pseudoheaders
Quentin Young [Tue, 22 Jan 2019 22:39:47 +0000 (22:39 +0000)]
lib: add internet checksum with pseudoheaders

Add convenience functions to compute the Internet checksum of a data
block, including a pseudoheader.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: bind sockets to interfaces
Quentin Young [Thu, 17 Jan 2019 22:34:25 +0000 (22:34 +0000)]
vrrpd: bind sockets to interfaces

Bind Rx socket to inbound interface.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix ownership discovery and mcast OIF
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>
5 years agovrrpd: transition to master when adv timer expires
Quentin Young [Wed, 16 Jan 2019 20:09:17 +0000 (20:09 +0000)]
vrrpd: transition to master when adv timer expires

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: handle incoming advertisements
Quentin Young [Wed, 16 Jan 2019 20:01:45 +0000 (20:01 +0000)]
vrrpd: handle incoming advertisements

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: add initial macvlan support
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>
5 years agovrrpd: fix memleak when sending advertisements
Quentin Young [Fri, 21 Dec 2018 20:31:10 +0000 (20:31 +0000)]
vrrpd: fix memleak when sending advertisements

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: read and validate vrrp advertisements
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>
5 years agovrrpd: ipv6 support
Quentin Young [Tue, 11 Dec 2018 17:55:21 +0000 (17:55 +0000)]
vrrpd: ipv6 support

Add initial support for IPv6.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: elect self to Master when owning v4 address
Quentin Young [Mon, 10 Dec 2018 22:16:10 +0000 (22:16 +0000)]
vrrpd: elect self to Master when owning v4 address

If the primary address is v4, and we own the address on our configured
interface, set ourselves to Master.

This introduces the concept of a separate priority value used to store
the configured vs effective priority.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: handle rescheduling Adver_Timer, Shutdown
Quentin Young [Sat, 8 Dec 2018 00:49:35 +0000 (00:49 +0000)]
vrrpd: handle rescheduling Adver_Timer, Shutdown

* Reschedule Adver_Timer when necessary
* Handle Shutdown event appropriately for all states

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: improve logging
Quentin Young [Sat, 8 Dec 2018 00:16:27 +0000 (00:16 +0000)]
vrrpd: improve logging

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: implement advertisement send
Quentin Young [Fri, 7 Dec 2018 23:37:14 +0000 (23:37 +0000)]
vrrpd: implement advertisement send

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix packet encode
Quentin Young [Fri, 7 Dec 2018 23:36:09 +0000 (23:36 +0000)]
vrrpd: fix packet encode

* Properly encode VRRP packets
* Calculate checksum appropriately
* Update signature to provide caller both packet and result length

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: merge keepalived packet header
Quentin Young [Thu, 6 Dec 2018 22:51:55 +0000 (22:51 +0000)]
vrrpd: merge keepalived packet header

Pick up some smartness from keepalived.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agolib: add list_to_array
Quentin Young [Fri, 7 Dec 2018 22:06:42 +0000 (22:06 +0000)]
lib: add list_to_array

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: add unit when showing time values
Quentin Young [Thu, 6 Dec 2018 22:20:05 +0000 (22:20 +0000)]
vrrpd: add unit when showing time values

Add 'cs' unit to end of centisecond values when displaying to user

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: fix more timer bugs
Quentin Young [Thu, 6 Dec 2018 22:19:11 +0000 (22:19 +0000)]
vrrpd: fix more timer bugs

* Fix overflow in skew time computation
* Fix accidentally removed initial setting of advertisement interval

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: clean up configuration code, fix skew bug
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>
5 years agovrrpd: config commands, enable ARP
Quentin Young [Tue, 4 Dec 2018 21:28:25 +0000 (21:28 +0000)]
vrrpd: config commands, enable ARP

* Allow configuring priority
* Allow configuring IPv4 addresses
* Add show command for vrouters
* Fix hash comparison function
* Fix ARP packetization bugs
* Enable sending of gratuitous ARP

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: get sockets working
Quentin Young [Tue, 4 Dec 2018 20:42:17 +0000 (20:42 +0000)]
vrrpd: get sockets working

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: zebra connections
Quentin Young [Tue, 4 Dec 2018 20:41:37 +0000 (20:41 +0000)]
vrrpd: zebra connections

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: interface support
Quentin Young [Mon, 3 Dec 2018 22:29:02 +0000 (22:29 +0000)]
vrrpd: interface support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: add .gitignore
Quentin Young [Mon, 3 Dec 2018 20:31:40 +0000 (20:31 +0000)]
vrrpd: add .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: implement gratuitous ARP
Quentin Young [Fri, 30 Nov 2018 08:45:36 +0000 (08:45 +0000)]
vrrpd: implement gratuitous ARP

Implement gratuitous ARP functionality. Ethernet only.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agovrrpd: initial commit
Quentin Young [Mon, 19 Nov 2018 20:51:52 +0000 (20:51 +0000)]
vrrpd: initial commit

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agoMerge pull request #4355 from donaldsharp/revert_rtadv_changes
Russ White [Thu, 16 May 2019 18:22:45 +0000 (14:22 -0400)]
Merge pull request #4355 from donaldsharp/revert_rtadv_changes

Revert rtadv changes

5 years agoMerge pull request #4354 from donaldsharp/more_gcc_9_1_werror
Mark Stapp [Thu, 16 May 2019 18:20:29 +0000 (14:20 -0400)]
Merge pull request #4354 from donaldsharp/more_gcc_9_1_werror

zebra: fix missed multipath_num change

5 years agoRevert "zebra: move rtadv service from zrouter to zvrf"
Donald Sharp [Thu, 16 May 2019 18:13:40 +0000 (14:13 -0400)]
Revert "zebra: move rtadv service from zrouter to zvrf"

This reverts commit f20e2a09c8aef399698fa074b36f24becdf49cbb.

5 years agoRevert "zebra: keep rtadv_sock field in zrouter for optimisation"
Donald Sharp [Thu, 16 May 2019 18:13:27 +0000 (14:13 -0400)]
Revert "zebra: keep rtadv_sock field in zrouter for optimisation"

This reverts commit 3738d700ff9aac5b7c4fed1a41dc47644488009f.

5 years agozebra: fix missed multipath_num change
Donald Sharp [Thu, 16 May 2019 15:49:19 +0000 (11:49 -0400)]
zebra: fix missed multipath_num change

The multipath_num global variable was moved into
zrouter.multipath_num but this particular usage
of it was not updated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4337 from donaldsharp/routemap_coverity
Russ White [Thu, 16 May 2019 15:45:17 +0000 (11:45 -0400)]
Merge pull request #4337 from donaldsharp/routemap_coverity

zebra: Make coverity SA happy with zebra_routemap.c

5 years agoMerge pull request #4352 from donaldsharp/routemap_fix_replace
Mark Stapp [Thu, 16 May 2019 15:01:20 +0000 (11:01 -0400)]
Merge pull request #4352 from donaldsharp/routemap_fix_replace

lib: Fix gcc 9.1 and --enable-werror issues found

5 years agoMerge pull request #4219 from bisdhdh/biswajitfrr_5
Russ White [Thu, 16 May 2019 14:36:02 +0000 (10:36 -0400)]
Merge pull request #4219 from bisdhdh/biswajitfrr_5

bgpd: Implement 3rd party nexthop for ebgp ipv6 sender, when nexthop matches IPV6 address of the neighbor.

5 years agoMerge pull request #4144 from pguibert6WIND/bfd_cbit
Russ White [Thu, 16 May 2019 14:13:26 +0000 (10:13 -0400)]
Merge pull request #4144 from pguibert6WIND/bfd_cbit

BFD CBIT

5 years agoMerge pull request #4269 from donaldsharp/other_tables
Russ White [Thu, 16 May 2019 14:11:56 +0000 (10:11 -0400)]
Merge pull request #4269 from donaldsharp/other_tables

zebra Other tables

5 years agoMerge pull request #4313 from lkrishnamoor/overlay_json_cli
Russ White [Thu, 16 May 2019 14:09:36 +0000 (10:09 -0400)]
Merge pull request #4313 from lkrishnamoor/overlay_json_cli

bgpd: json cli output for bgp evpn overlay

5 years agoMerge pull request #4327 from sworleys/Move-Multipath-Num
Russ White [Thu, 16 May 2019 14:04:14 +0000 (10:04 -0400)]
Merge pull request #4327 from sworleys/Move-Multipath-Num

zebra: Move multipath_num into zrouter

5 years agoMerge pull request #4340 from qlyoung/hash-key-const
Russ White [Thu, 16 May 2019 14:00:55 +0000 (10:00 -0400)]
Merge pull request #4340 from qlyoung/hash-key-const

lib: hashing functions should take const arguments

5 years agoMerge pull request #4339 from sworleys/Add-AFI_UNSPEC
Russ White [Thu, 16 May 2019 13:59:55 +0000 (09:59 -0400)]
Merge pull request #4339 from sworleys/Add-AFI_UNSPEC

lib,bgpd,pbrd: Add AFI_UNSPEC to AFI enum

5 years agoMerge pull request #4316 from LabNConsulting/working/master/tt-scale-vrfs
Donald Sharp [Thu, 16 May 2019 13:53:12 +0000 (09:53 -0400)]
Merge pull request #4316 from LabNConsulting/working/master/tt-scale-vrfs

bgp_l3vpn_to_bgp_vrf: test adding/removing 50K*2CEs VRF routes

5 years agolib: Fix gcc 9.1 and --enable-werror issues found
Donald Sharp [Thu, 16 May 2019 13:20:12 +0000 (09:20 -0400)]
lib: Fix gcc 9.1 and --enable-werror issues found

Compiling FRR w/ gcc 9.1 and --enable-werror generates some
issues that need to be cleaned up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agodoc/developer: topotest now compile should now enable sharpd, alos care most about...
Lou Berger [Wed, 15 May 2019 21:31:31 +0000 (21:31 +0000)]
doc/developer: topotest now compile should now enable sharpd, alos care most about master

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_l3vpn_to_bgp_vrf: test adding/removing 50K*2CEs VRF routes
Lou Berger [Sat, 11 May 2019 19:23:08 +0000 (19:23 +0000)]
bgp_l3vpn_to_bgp_vrf: test adding/removing 50K*2CEs VRF routes
      Only runs when configured with --enable-sharpd

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_l3vpn_to_bgp_vrf: disable bgp debug logging
Lou Berger [Sun, 12 May 2019 20:41:29 +0000 (20:41 +0000)]
bgp_l3vpn_to_bgp_vrf: disable bgp debug logging

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agotopotests/lib: support sharpd and other daemons in lutils
Lou Berger [Sat, 11 May 2019 18:52:29 +0000 (18:52 +0000)]
topotests/lib: support sharpd and other daemons in lutils
       needs both <daemon>.conf and <daemon> to be present

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #4341 from donaldsharp/bgp_attr_should_actually_compile
Lou Berger [Wed, 15 May 2019 09:47:42 +0000 (05:47 -0400)]
Merge pull request #4341 from donaldsharp/bgp_attr_should_actually_compile

bgpd: Fix non-compilation of bgp_attr_extcom_tunnel_type

5 years agobgpd: Fix non-compilation of bgp_attr_extcom_tunnel_type
Donald Sharp [Wed, 15 May 2019 02:42:05 +0000 (22:42 -0400)]
bgpd: Fix non-compilation of bgp_attr_extcom_tunnel_type

The bgp_attr_extcom_tunnel_type does not properly
compile with warnings turned on due to recent change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #4296 from adharkar/frr-master-fib_prefix
Donald Sharp [Wed, 15 May 2019 01:46:38 +0000 (21:46 -0400)]
Merge pull request #4296 from adharkar/frr-master-fib_prefix

Zebra: Add "show ip/ipv6 fib <prefix> [json]" CLI

5 years agoMerge pull request #4332 from patrasar/2201630
Donald Sharp [Wed, 15 May 2019 01:20:21 +0000 (21:20 -0400)]
Merge pull request #4332 from patrasar/2201630

bgpd: display bgp neighbor advertised-routes json warning message

5 years agoMerge pull request #4314 from lkrishnamoor/extract_tunnel_type_extcom
Donald Sharp [Wed, 15 May 2019 00:18:29 +0000 (20:18 -0400)]
Merge pull request #4314 from lkrishnamoor/extract_tunnel_type_extcom

bgpd: Extract tunnel type from extended communities

5 years agolib: hashing functions should take const arguments
Quentin Young [Tue, 14 May 2019 20:19:07 +0000 (20:19 +0000)]
lib: hashing functions should take const arguments

It doesn't make much sense for a hash function to modify its argument,
so const the hash input.

BGP does it in a couple places, those cast away the const. Not great but
not any worse than it was.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
5 years agozebra: Move multipath_num into zrouter
Donald Sharp [Wed, 13 Feb 2019 19:58:29 +0000 (14:58 -0500)]
zebra: Move multipath_num into zrouter

The multipath_num variable is a property of zebra_router,
so move it there.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Extract tunnel type from extended communities
Lakshman Krishnamoorthy [Sat, 11 May 2019 17:17:23 +0000 (10:17 -0700)]
bgpd: Extract tunnel type from extended communities

This diff contains 2 parts:
1. Extract the tunnel type info from bgp extended communities.
2. Make rfapi use this common tunnel type ap

Signed-off-by: Lakshman Krishnamoorthy <lkrishnamoor@vmware.com>
5 years agolib,bgpd,pbrd: Add AFI_UNSPEC to AFI enum
Stephen Worley [Sun, 3 Mar 2019 01:58:38 +0000 (20:58 -0500)]
lib,bgpd,pbrd: Add AFI_UNSPEC to AFI enum

Add an upspecified option to the AFI enum and update
switch statements using it in bgpd and pbrd.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
5 years agobgpd: display bgp neighbor advertised-routes json warning message
Sarita Patra [Tue, 14 May 2019 13:22:19 +0000 (06:22 -0700)]
bgpd: display bgp neighbor advertised-routes json warning message

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.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #4335 from opensourcerouting/zebra-fpm-blackhole-info
Donald Sharp [Tue, 14 May 2019 17:36:31 +0000 (13:36 -0400)]
Merge pull request #4335 from opensourcerouting/zebra-fpm-blackhole-info

zebra: send nexthop blackhole information in FPM

5 years agozebra: send nexthop blackhole information in FPM
Rafael Zalamena [Sat, 27 Apr 2019 14:19:43 +0000 (11:19 -0300)]
zebra: send nexthop blackhole information in FPM

Don't return prematurely so we can add blackhole nexthop information.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
5 years agobgpd: do not unregister bfd session when bgp session goes down
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>
5 years agobfd-bgp-cbit-topo3: add bfd bgp cbit topotest test
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>
5 years agodoc: add bfd check-control-plane-failure information
Philippe Guibert [Tue, 16 Apr 2019 10:15:25 +0000 (12:15 +0200)]
doc: add bfd check-control-plane-failure information

this command is used when user wants to use the cbit value.
more information in the documentation.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agobgpd: add vty command to enable bfd control-plane-check-failure
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>
5 years agobfdd, lib, bgpd: add bfd cbit usage
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>
5 years agoMerge pull request #4312 from lkrishnamoor/json_cli_bug_fix
David Lamparter [Tue, 14 May 2019 14:07:38 +0000 (16:07 +0200)]
Merge pull request #4312 from lkrishnamoor/json_cli_bug_fix

bgpd: evpn json cli bug fix