Commit Graph

8000 Commits

Author SHA1 Message Date
vivek
482c0fb076 lib: Define generic IP address structure
Define an IP address structure which is a union of an IPv4 and IPv6
address. This is for subsequent use in EVPN.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-25 10:20:03 -07:00
vivek
4e9da20145 lib: Additional APIs in bitfield library
Added APIs to:
a) pre-assign 0th bit in the bitfield
b) free 0th bit in the bitfield
c) free the allocated bitfield data

Signed-off-by: Mitesh Kanjariya <mitesh@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:   Vivek Venkatraman <vivek@cumulusnetworks.com>
2017-05-25 10:20:03 -07:00
vivek
8234a9875b lib: Macro for number of entries in hash table
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2017-05-25 10:20:03 -07:00
vivek
7c6d877325 lib: VxLAN Network Identifier definition
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-25 10:20:03 -07:00
vivek
6eb2c8b8a8 lib: VLAN definition
Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-25 10:20:03 -07:00
Don Slice
79878cf73e zebra: add bgp unnumbered labeled-unicast to zserv
Prior to the fix, labels weren't getting installed in zebra nor were the
ifindex values correctly set if labeled-unicast was used in conjunction
with bgp unnumbered.

Ticket: CM-16531
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: CCR-6276
2017-05-25 04:19:10 -07:00
Jafar Al-Gharaibeh
fb13a6d478 Merge pull request #610 from donaldsharp/rpprefixlen
pimd: Allow secondary address comparisons to work
2017-05-24 22:10:19 -06:00
Quentin Young
dc207b2760 ospf6d: default to dotted quad instead of ret NULL
to fix coverity warning

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-25 04:09:52 +00:00
Donald Sharp
bd8d897362 babel: Fix interface command and some help strings
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24 20:29:37 -04:00
Donald Sharp
09b4a7e584 babel: Make sure instance is 0
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24 20:17:30 -04:00
Donald Sharp
e9047736f7 babeld: Fix redistribute events for v4/6 up from zebra
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24 20:14:53 -04:00
Donald Sharp
64682f5e69 babeld: Send in the ifindex to zebra for route install
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-24 19:52:59 -04:00
Matthieu Boutier
e4d9c77198 babeld: Fix VRF for zebra route messages.
Signed-off-by: Matthieu Boutier <boutier@pps.univ-paris-diderot.fr>
2017-05-24 19:38:33 -04:00
Donald Sharp
9e962de4b6 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-24 11:22:35 -04:00
Donald Sharp
2d828a0c67 Merge pull request #612 from LabNConsulting/working/master/patch-set/deprecateEncap
master:  remove support for config & show of encap safi
2017-05-24 11:04:53 -04:00
Donald Sharp
f731a65469 Merge pull request #611 from LabNConsulting/working/3.0/patch-set/deprecateEncap
3.0: remove support for config & show of encap safi
2017-05-24 11:04:36 -04:00
Lou Berger
1ec1afd6cb bgpd: remove encap safi vty related files bgp_encap.h|c
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:58:50 -04:00
Lou Berger
eedae49501 bgpd: remove encap_safi rx processing
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:58:50 -04:00
Lou Berger
375a2e67ad bgpd: remove encap safi show commands
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:58:50 -04:00
Lou Berger
6c8744af2d bgpd: remove additional instance of BGP_ENCAP(v6)_NODE
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:58:50 -04:00
Lou Berger
2fd1b54aa1 bgpd rfapi: remove ability to configure use of encap-safi (continue to use encap attribute)
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:42:40 -04:00
Lou Berger
5b1f0f29e7 bgpd: remove support for ipv4|6 encap safi config
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:42:32 -04:00
Lou Berger
ddb2927dff vtysh: remove BGP_ENCAP(V6)_NODE
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:40:23 -04:00
Lou Berger
b1ff4223c7 lib: remove BGP_ENCAP(V6)_NODE
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:40:12 -04:00
Lou Berger
26a4b7c3c3 bgpd: remove encap safi vty related files bgp_encap.h|c
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:34:43 -04:00
Donald Sharp
ad5233c886 pimd: Allow secondary address comparisons to work
The secondary address comparison done to determine if we are
an RP for a specified address was comparing A.B.C.D/32 to A.B.C.D/0
because when we created the rp_info we were not setting the prefixlen

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-23 15:31:37 -04:00
Lou Berger
796e5801cf bgpd: remove encap_safi rx processing
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:15:45 -04:00
Lou Berger
33c0d63f9c bgpd: remove encap safi show commands
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:11:30 -04:00
Lou Berger
3c6ba3ec02 bgpd rfapi: remove ability to configure use of encap-safi (continue to use encap attribute)
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:02:31 -04:00
Lou Berger
5f69e7a7ac bgpd: remove support for ipv4|6 encap safi config
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:01:54 -04:00
Lou Berger
b61410ebd5 vtysh: remove BGP_ENCAP(V6)_NODE
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:01:09 -04:00
Lou Berger
93b9c66617 lib: remove BGP_ENCAP(V6)_NODE
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-23 15:00:53 -04:00
Donald Sharp
4e33d4ef9b Merge pull request #598 from donaldsharp/to_3.0
To 3.0
2017-05-23 11:42:11 -04:00
Daniel Walton
acb25e73f4 zebra: one "show ip route" to rule them all
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
2017-05-22 19:56:11 +00:00
David Lamparter
92cf703760 Merge pull request #593 from qlyoung/fix-nhrpd-acl-3.0
nhrpd: install access-list commands
2017-05-22 17:46:48 +02:00
David Lamparter
33dc0e6643 Merge pull request #591 from qlyoung/ospf-df-areaid-3.0
ospfd: remember format for ospf area id
2017-05-22 17:45:55 +02:00
David Lamparter
db64fac494 Merge pull request #582 from qlyoung/ospf6-df-areaid
ospf6d: remember format for ospf6 area id
2017-05-22 17:45:29 +02:00
David Lamparter
1aba7c0944 Merge pull request #581 from donaldsharp/zebra
Zebra
2017-05-22 17:44:33 +02:00
David Lamparter
0ef0c0505e Merge pull request #596 from donaldsharp/bgp_vrf_terminate
bgpd: Fix crash when going down
2017-05-22 17:40:26 +02:00
David Lamparter
ea58ccf178 Merge pull request #600 from qlyoung/fix-privs-obo
lib: fix array sizes for capability map
2017-05-22 17:39:40 +02:00
David Lamparter
572244546c Merge pull request #599 from qlyoung/fix-ospf6-uaf-3.0
ospf6d: fix use-after-free
2017-05-22 17:39:03 +02:00
Martin Winter
b3dfccc87b redhat: Fix missing packages in requirements section of README
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-05-22 04:08:44 -07:00
Martin Winter
da4b95e740 redhat: Disallow reload function for unsupported systems
Before the change, a reload triggered a restart if the python reload script wasn't installed or for non-integrated configs
With this change, the reload is rejected with an error in this case (and suggests the installation of the python script package)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-05-22 04:07:22 -07:00
Martin Winter
fe881ec5a1 redhat: fix previous merge. initsystem detection should now work for mock builds and native builds on systemd based systems
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
2017-05-22 04:04:35 -07:00
Quentin Young
fb12f2c75f lib: fix array sizes for capability map
incorrect array sizes causing out of bounds read and potentially
incorrect capability settings

introduced in 1b322039

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-22 02:32:12 +00:00
Quentin Young
8f599166fb ospf6d: fix use-after-free
ospf6_route_remove may free the ospf6_route passed to it if the refcount
reaches zero, in which case zeroing the ->flag field constitutes a uaf

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-22 02:14:29 +00:00
David Lamparter
1d6664e090 vtysh: fix autocompletion API misuse
I forgot to update this call when I changed
cmd_variable_handler_register to take an array...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-21 20:37:34 -04:00
Renato Westphal
8b93b03839 bgpd: fix sending of invalid nexthops on the wire
The bpacket_reformat_for_peer() function rewrites the nexthop of outgoing
route updates on a per-peer basis in order to handle route-maps ("set
ip next-hop") and locally-originated routes missing a nexthop.

In the latter case, RFC 4271 says the following: "When announcing a
locally-originated route to an internal peer, the BGP speaker SHOULD use
the interface address of the router through which the announced network
is reachable for the speaker as the NEXT_HOP".

We were doing this for regular IPv4/IPv6 routes, but not for
VPN/EVPN/ENCAP routes, which were being announced with invalid nexthops
(0.0.0.0 or ::).

This patch fixes this problem.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-20 13:06:45 -04:00
Renato Westphal
e50d0a4857 bgpd: fix display of encap routes in the running configuration
Static encap routes don't have an MPLS label. Also, use %u instead of
%d to print the label.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-20 13:06:45 -04:00
Renato Westphal
239b498d3f bgpd: add network commands for encapv6
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-20 13:06:45 -04:00