Commit Graph

15768 Commits

Author SHA1 Message Date
Quentin Young
c7e3b83d15 vrrpd: transition to master when adv timer expires
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
10133a5996 vrrpd: handle incoming advertisements
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
dad18a2fd7 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>
2019-05-17 00:27:08 +00:00
Quentin Young
bb54fa3a00 vrrpd: fix memleak when sending advertisements
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
91188ca6c1 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>
2019-05-17 00:27:08 +00:00
Quentin Young
862f2f374f vrrpd: ipv6 support
Add initial support for IPv6.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
5d3730c5f1 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>
2019-05-17 00:27:08 +00:00
Quentin Young
3e7a4043ff 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>
2019-05-17 00:27:08 +00:00
Quentin Young
4ec944086b vrrpd: improve logging
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
247aa46957 vrrpd: implement advertisement send
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
3eca38577a 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>
2019-05-17 00:27:08 +00:00
Quentin Young
ef4cc1ebff vrrpd: merge keepalived packet header
Pick up some smartness from keepalived.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
4440e3cdf7 lib: add list_to_array
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
69f63d1af9 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>
2019-05-17 00:27:08 +00:00
Quentin Young
1485d9e525 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>
2019-05-17 00:27:08 +00:00
Quentin Young
1d21789e16 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>
2019-05-17 00:27:08 +00:00
Quentin Young
c23edd7402 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>
2019-05-17 00:27:08 +00:00
Quentin Young
4074400076 vrrpd: get sockets working
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
b6029d6a5f vrrpd: zebra connections
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
a8144d7fc8 vrrpd: interface support
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
0ae3b19ca6 vrrpd: add .gitignore
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
41ee544212 vrrpd: implement gratuitous ARP
Implement gratuitous ARP functionality. Ethernet only.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Quentin Young
5435a2bf61 vrrpd: initial commit
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2019-05-17 00:27:08 +00:00
Russ White
db95656d48
Merge pull request #4355 from donaldsharp/revert_rtadv_changes
Revert rtadv changes
2019-05-16 14:22:45 -04:00
Mark Stapp
4d6124b45f
Merge pull request #4354 from donaldsharp/more_gcc_9_1_werror
zebra: fix missed multipath_num change
2019-05-16 14:20:29 -04:00
Donald Sharp
3ce3185a63 Revert "zebra: move rtadv service from zrouter to zvrf"
This reverts commit f20e2a09c8.
2019-05-16 14:13:40 -04:00
Donald Sharp
7e78bc4533 Revert "zebra: keep rtadv_sock field in zrouter for optimisation"
This reverts commit 3738d700ff.
2019-05-16 14:13:27 -04:00
Donald Sharp
b03e089d45 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>
2019-05-16 11:53:33 -04:00
Russ White
3acee034ed
Merge pull request #4337 from donaldsharp/routemap_coverity
zebra: Make coverity SA happy with zebra_routemap.c
2019-05-16 11:45:17 -04:00
Mark Stapp
4ce7e912ce
Merge pull request #4352 from donaldsharp/routemap_fix_replace
lib: Fix gcc 9.1 and --enable-werror issues found
2019-05-16 11:01:20 -04:00
Russ White
fca8283e71
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.
2019-05-16 10:36:02 -04:00
Russ White
ace430f0db
Merge pull request #4144 from pguibert6WIND/bfd_cbit
BFD CBIT
2019-05-16 10:13:26 -04:00
Russ White
1b072ce466
Merge pull request #4269 from donaldsharp/other_tables
zebra Other tables
2019-05-16 10:11:56 -04:00
Russ White
a371084c04
Merge pull request #4313 from lkrishnamoor/overlay_json_cli
bgpd: json cli output for bgp evpn overlay
2019-05-16 10:09:36 -04:00
Russ White
cc25952f2a
Merge pull request #4327 from sworleys/Move-Multipath-Num
zebra: Move multipath_num into zrouter
2019-05-16 10:04:14 -04:00
Russ White
6f33cbff18
Merge pull request #4340 from qlyoung/hash-key-const
lib: hashing functions should take const arguments
2019-05-16 10:00:55 -04:00
Russ White
caca2c705c
Merge pull request #4339 from sworleys/Add-AFI_UNSPEC
lib,bgpd,pbrd: Add AFI_UNSPEC to AFI enum
2019-05-16 09:59:55 -04:00
Donald Sharp
07dfa57d9b
Merge pull request #4316 from LabNConsulting/working/master/tt-scale-vrfs
bgp_l3vpn_to_bgp_vrf: test adding/removing 50K*2CEs VRF routes
2019-05-16 09:53:12 -04:00
Donald Sharp
4255dbe9bb 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>
2019-05-16 09:20:12 -04:00
Lou Berger
a191719ee2 doc/developer: topotest now compile should now enable sharpd, alos care most about master
Signed-off-by: Lou Berger <lberger@labn.net>
2019-05-15 21:31:31 +00:00
Lou Berger
1cba6d1210 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>
2019-05-15 21:27:00 +00:00
Lou Berger
a330e8170d bgp_l3vpn_to_bgp_vrf: disable bgp debug logging
Signed-off-by: Lou Berger <lberger@labn.net>
2019-05-15 21:27:00 +00:00
Lou Berger
a38f008303 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>
2019-05-15 21:26:13 +00:00
Lou Berger
cf277e9e79
Merge pull request #4341 from donaldsharp/bgp_attr_should_actually_compile
bgpd: Fix non-compilation of bgp_attr_extcom_tunnel_type
2019-05-15 05:47:42 -04:00
Donald Sharp
fa34668617 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>
2019-05-14 22:42:05 -04:00
Donald Sharp
543c749625
Merge pull request #4296 from adharkar/frr-master-fib_prefix
Zebra: Add "show ip/ipv6 fib <prefix> [json]" CLI
2019-05-14 21:46:38 -04:00
Donald Sharp
50fbab3a5b
Merge pull request #4332 from patrasar/2201630
bgpd: display bgp neighbor advertised-routes json warning message
2019-05-14 21:20:21 -04:00
Donald Sharp
13f9ea7253
Merge pull request #4314 from lkrishnamoor/extract_tunnel_type_extcom
bgpd: Extract tunnel type from extended communities
2019-05-14 20:18:29 -04:00
Quentin Young
d8b87afe7c 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>
2019-05-14 21:23:08 +00:00
Donald Sharp
b3f2b59020 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>
2019-05-14 14:15:18 -07:00