Commit Graph

7435 Commits

Author SHA1 Message Date
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
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
Renato Westphal
7c4e00e305 bgpd: remove unused str2tag() function
This function is not used anymore since commit fb1d2a2d9.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-20 13:06:45 -04:00
Donald Sharp
55780a7b59 Merge pull request #592 from opensourcerouting/bgpd-invalid-nexthops
Bgpd invalid nexthops
2017-05-20 12:56:17 -04:00
Donald Sharp
8474d5abb8 Merge pull request #594 from opensourcerouting/fix-mpls-build
zebra: build mpls sources the right way
2017-05-20 09:04:22 -04:00
Donald Sharp
a24dae86e1 bgpd: Fix crash when going down
When bgp is sent a SIGINT signal with vrf's configured
bgp proceeds to crash on the way down.  This is because
the bm->bgp list was deleted( but the pointer was kept around)
and then later in the going down process vrf_terminate is called
which attempts to find any associated processes.  Since memory
has been freed and subsuquently used for something else
we get a corrupt bgp pointer and bgp crashes.

Here is the trace:

(gdb) bt
    at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
    at sigevent.c:255
    at thread.c:1315
(gdb)

Multiple protocols besides bgp and zebra running are needed to make
this happen as well.  So a weird timing related issue?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-20 08:22:23 -04:00
Renato Westphal
e8e0cc1af4 zebra: build mpls sources the right way
zebra_mpls_null.c should contain only dummy replacements for
platform-specific functions that may not be available on some systems
(e.g. add/delete LSPs in the kernel).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-19 19:13:29 -03:00
Quentin Young
d2057ea3d0 nhrpd: install access-list commands
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-19 20:10:50 +00:00
Renato Westphal
3800c7b067 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-19 17:01:29 -03:00
Renato Westphal
ebb0c02ad3 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-19 16:56:13 -03:00
Renato Westphal
4042205e76 bgpd: add network commands for encapv6
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-19 16:39:12 -03:00
Quentin Young
48cdf1a9d6 lib: enforce thread_cancel() MT-unsafe invariant
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-19 19:10:21 +00:00
Quentin Young
86573dcbbe ospfd: remember format for ospf area id
If the user enters a decimal, display a decimal.
If the user enters a dotted quad, display a dotted quad.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-19 18:40:18 +00:00
Quentin Young
79c3f4f491 ospf6d: remember format for ospf6 area id
If the user enters a decimal, display a decimal.
If the user enters a dotted quad, display a dotted quad.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-05-19 16:51:23 +00:00
Renato Westphal
d81e237001 bgpd: remove unused str2tag() function
This function is not used anymore since commit fb1d2a2d9.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-19 10:49:24 -03:00
Renato Westphal
dfe56adf91 bgpd: add missing white space in debug message
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2017-05-19 10:48:16 -03:00
Donald Sharp
78ca62a7b2 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-19 09:41:15 -04:00
Renato Westphal
74572f0099 Merge pull request #584 from LabNConsulting/working/3.0/patch/configVpnTags-v2
bgpd: Address some issues seen while encoding VPN static routes (Issue #572)  -- V2
2017-05-19 10:38:03 -03:00
Donald Sharp
ee9de2cce5 Merge pull request #588 from opensourcerouting/nhrpd-20170519
nhrpd: configure mgre ipv6 nd for nhrp
2017-05-19 08:33:07 -04:00
Donald Sharp
4bf6638636 Merge remote-tracking branch 'origin/stable/3.0' 2017-05-19 08:09:42 -04:00
Lou Berger
6a1d7e82ae bgpd: set NH len for ipv4 vpn|encap statics
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-19 07:56:13 -04:00
David Lamparter
be1f2d1802 Merge pull request #586 from donaldsharp/msdp_crashalicious
pimd: Fix crash from cli missinterpertation
2017-05-19 13:38:48 +02:00
Timo Teräs
896868a63e nhrpd: configure mgre ipv6 nd for nhrp
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-19 13:32:05 +02:00
Donald Sharp
53c438dae2 pimd: Fix crash from cli missinterpertation
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-05-18 23:06:12 -04:00
Lou Berger
6056699585 bgpd: fix ipv4|6 vpn|encap with route-map show config
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-18 17:53:06 -04:00
Lou Berger
f4c6f62db8 bgp: don't put empty encap or vnc attributes on the wire
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-18 17:42:04 -04:00
Lou Berger
2f98bf4770 bgpd: repalce direct calls to system memory functions
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-18 17:42:04 -04:00
Lou Berger
fb1d2a2d97 bgpd: cleanup vpn label config, set BoS, use 'label' in place of 'tag'
Signed-off-by: Lou Berger <lberger@labn.net>
2017-05-18 17:42:04 -04:00
David Lamparter
16156c1018 ldpd: use frr_init()
Without this, modules aren't loaded.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 14:07:28 -04:00
David Lamparter
5662e2c91c lib: fix __attribute__ typo
__attribute breaks pycparser

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2017-05-18 14:07:28 -04:00