Timo Teräs [Tue, 14 Feb 2017 11:07:39 +0000 (13:07 +0200)]
distro/redhat: package nhrpd
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
[DL: adapted for FRR, changed port number 2612->2610] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:19:8: error: redefinition of 'struct in6_pktinfo'
struct in6_pktinfo {
^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:536:8: note: originally defined here
struct in6_pktinfo
^
In file included from netlink_gre.c:15:0:
/usr/include/linux/ipv6.h:24:8: error: redefinition of 'struct ip6_mtuinfo'
struct ip6_mtuinfo {
^
In file included from netlink_gre.c:10:0:
/usr/include/netinet/in.h:543:8: note: originally defined here
struct ip6_mtuinfo
So instead of libc's netinet/in.h include kernel's linux/in.h
and the add sys/socket.h for struct sockaddr since it does not
seem to be defined in kernel headers.
Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Timo Teräs [Thu, 19 Jan 2017 15:27:01 +0000 (17:27 +0200)]
nhrpd: implement next hop resolution protocol
This provides DMVPN support and integrates to strongSwan. Please read
README.nhrpd and README.kernel for more details.
[DL: cherry-picked from dafa05e65fe4b3b3ed5525443f554215ba14f42c]
[DL: merge partially resolved, this commit will not build.] Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: always check if the received labels are valid
We were doing some sanity checks only for labels of Label Mapping
messages. Now do the same checks for labels of Label Release and Label
Withdraw messages as well.
While here, plug a small memleak in the error path of recv_labelmessage().
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: send VPLS MAC withdrawals
RFC 4762 says that MAC address withdrawal messages can be used to
improve convergence time in VPLS networks. This patch makes ldpd send
MAC withdrawals whenever a non-pseudowire interface pertaining to a
VPLS goes down. The processing of received MAC withdrawals will be
implemented later.
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: fix parsing of optional tlvs in address messages
We were aborting the session upon receipt of MAC Address Withdrawal
messages. Now make the parser aware that optional TLVs are possible in
address messages.
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement RFC 5561 (LDP Capabilities)
This patch per-se doesn't introduce any useful functionality, but prepares
the ground for new enhancements to ldpd (i.e. implementation of new RFCs
that make use of LDP capabilities).
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: implement support for PWid group wildcards
This was missing from our original RFC 4447 VPLS implementation. Now
ldpd understands group wildcards as mandated by the RFC, but we still
don't send them ourselves. I can't see any case in which sending a group
wildcard would be useful, but nonetheless this patch provides a function
called lde_send_labelwithdraw_pwid_wcard() which is ready to be used in
the future anytime we feel like it might be useful.
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: fix processing of Label Withdraw messages
Whenever we receive a Label Withdraw message with an optional Label
TLV, we should check if this label matches the label previously
received from this neighbor for this FEC. If they don't match then we
shouldn't uninstall the previous label from the kernel. This fixes a
misinterpretation from the "Receive Label Withdraw" algorithm described
in the A.1.5 section of RFC 5036.
Also, simplify the check of pending withdraws in lde_check_release()
and lde_check_release_wcard().
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: the PW Status is an unknown TLV
Without this fix, any LDP speaker that doesn't implement RFC 4447 will
shut down the session upon receipt of a PWid Label Mapping (unless the
use of the PW-Status TLV is disabled via configuration).
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: send correct status code on error condition
The Unknown TLV status code is reserved for cases where we don't know
how to process a given TLV and its Unknown TLV bit is not set.
In the case of Address Messages, the Address List TLV is mandatory and
should appear before any optional TLV in the message. If that doesn't
happen the correct status notification to send is "Missing Message
Parameters" (non-fatal error).
Also, add a missing htons when creating an Address List TLV. Since the
value of TLV_TYPE_ADDRLIST is 0x0101 this missing htons wasn't noticed
earlier.
Renato Westphal [Fri, 3 Mar 2017 20:50:22 +0000 (17:50 -0300)]
ldpd: kill send_notification_nbr()
Be more clever and trigger the PDU SENT event inside send_notification()
when tcp->nbr is set. This way we can eliminate send_notification_nbr()
and always use send_notification() instead.
Donald Sharp [Thu, 2 Mar 2017 15:33:23 +0000 (10:33 -0500)]
pimd: Hide 'ip multicast-routing' command
Automatically turn on pim if the daemon is turned on.
Hide the 'ip multicast-routing' command
Disable the 'no ip multicast-routing' command
Do not display the 'ip multicast-routing' command.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Thu, 16 Feb 2017 21:59:20 +0000 (16:59 -0500)]
zebra: Allow multiple rib deletes from linux kernel
The kernel can send a DELROUTE with a individual
nexthop. Technically this is meant to delete that
individual nexthop from the route but zebra
has no way to do this currently. So we just delete
the route.
V4 -> Never sends a DELROUTE with multiple nexthops
as a way to modify the rib. It sends a a NEWROUTE
with RTM_REPLACE with the new appropriate route.
V6 -> Sends a DELROUTE with multiple nexthops
which is supposed to be interpreted as a
subtraction from the route.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 30 Jan 2017 19:50:06 +0000 (14:50 -0500)]
zebra: Add multipath parsing to V6
In the near future it will be possible to recieve v6 multipath netlink
messages. This code change is in prep for it. In the meantime the
v6 code path will continue to work as per normal.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 27 Jan 2017 18:33:08 +0000 (13:33 -0500)]
zebra: Add knowledge of whether or not we are acting under startup conditions
The reading if unicast routes from the kernel acts subtly differently
between reading in the routes from the kernel on startup and
reading a new route or getting a response for a route.
Add startup flag(currently ignored) so that we can start
consolidating the functionality.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
There exists situations where we can receive the mcast
packet for (S,G) on both swp1 and swp2. In this case
the packet received on swp1 will be sent from the kernel
to us as a WRVIF and WRVIFWHOLE.
As per normal, WRVIF packet processing handles the assert
case so we know we have not received the packet on a downstream
interface, so no assert.
The WRVIFWHOLE packet processing can then check to see if
it received the packet as a result of the (*,G) mroute
from upstream. If we have then we can safely drop
the packet.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 13 Feb 2017 01:16:08 +0000 (20:16 -0500)]
pimd: Make ifchannel lookup a hash lookup
When we are at scale, it is possible that
we have a very large number of ifchannels
per interface. So make lookup for
that situation to be a hash lookup.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 10 Feb 2017 20:04:17 +0000 (15:04 -0500)]
pimd: Remove unneeded parameter
pim_upstream_join_timer_decrease_to_t_override passed in
a `struct in_addr` that in all cases was part of the
upstream data structure that was passed in already.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Assume that the buffer size passed in is of sufficient size
already. This is assured already because buffer sizes
are checked for minimum lengths for the entire packet
ahead of time. So we are double checking.
Additionally at scale we will be calling these functions
a very very large number of times.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Christian Franke [Thu, 23 Feb 2017 13:27:00 +0000 (14:27 +0100)]
bgpd: fix bgp_info_addpath_{rx,tx}_str if addpath info is not present
The buffer needs to be set to length 0 if nothing is written into
it, otherwise bgpd will log uninitialized memory, disclosing information
and possibly leading to a crash.
Signed-off-by: Christian Franke <chris@opensourcerouting.org>