Quentin Young [Tue, 9 Aug 2016 17:37:01 +0000 (17:37 +0000)]
lib: Fix various minor bugs
- cmd_make_strvec returns null pointer if str
begins with a '#'
- disallow options nested options
- NULL out state variable in parser
- flip backwards comparison
- fix memory leak in lexer
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Mon, 1 Aug 2016 17:03:39 +0000 (17:03 +0000)]
lib: Fixed bad node copy, modified token regex
When building argv for matched command, only the
last node was being copied to argv; the rest were
added by reference. Additionally the regex for
certain tokens was too restrictive and disallowed
characters allowed by the old parser; these have
been reinstated.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Quentin Young [Fri, 22 Jul 2016 19:04:16 +0000 (19:04 +0000)]
lib: Reorganize some matching stuff
Introduce new node type, END_GN, and remove
is_leaf flags. Reorganize command_match.c & remove
internal functions from command_match.h. Start
rewriting command.h in command_new.h with changes
for new backend.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Mon, 11 Jul 2016 19:54:37 +0000 (15:54 -0400)]
pimd: IGMPv3 leave not deleting group entry
After sending a IGMPv3 exclude report for a multicast address
with 0 sources, send an include report for the same group and also 0
sources. This should cause IGMP to GS query and age/delete
the entry.
This fix addresses this issue.
Ticket: CM-11685 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Quentin Young [Mon, 27 Jun 2016 14:51:17 +0000 (14:51 +0000)]
lib: Rewrite ipv4 address and prefix validator
Simplify ipv4 prefix and address matcher / validator to use standard
Linux networking functions instead of a state machine.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Quentin Young [Mon, 27 Jun 2016 13:14:18 +0000 (13:14 +0000)]
lib: Rewrite ipv6 prefix matcher
Simplify ipv6 prefix matcher / validator to use standard Linux
networking functions instead of a state machine.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Don Slice [Mon, 11 Jul 2016 19:57:24 +0000 (12:57 -0700)]
all: add default log file if none are defined
Added a default log file named /var/log/quagga/Quagga.log to every daemon
to capture log entries if no log file is defined. This also allows the
capture of logged information prior to reading each daemon's config file.
If a log file is defined manually, it will override this default file name.
Ticket: CM-10987 Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: Manual testing
Donald Sharp [Mon, 11 Jul 2016 16:57:28 +0000 (12:57 -0400)]
pimd: static joins no longer worked
Static joins were killed by a previous commit, which
has been backed out. I've recoded the igmp join
code to ignore 224.0.0.0/24 from ourselves a bit
differently now.
Ticket: CM-11751 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
bgpd: "neigbor <interface> ttl-security hops" should reject a hops value greater than 1
"neighbor <interface> disable-connected-check" should not be allowed by the parser
Made changes to not allow hops greater than 1 and disable-connected check for neighbor <interface>
Donald Sharp [Wed, 29 Jun 2016 18:30:28 +0000 (14:30 -0400)]
pimd: Pass the appropriate data structure around
Several static functions were passing a list around
when the reality is we are going to need to
look at the group information in order to make an
informated decision.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 29 Jun 2016 12:31:19 +0000 (08:31 -0400)]
pimd: Prevent igmp packet loopback.
pim is joining the 224.0.0.13 and 224.0.0.22 groups
This is causing the creation of (*, 224.0.0.13) and
(*, 224.0.0.22) multicast routes which are immediately
sent to the pim network.
If we are the originator of the igmp report than
there is no need to accept the packet for
processing.
Ticket: CM-11397 Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Wed, 29 Jun 2016 01:50:49 +0000 (21:50 -0400)]
pimd: Bind pim sockets to interface they are associated with
When pim is receiving packets, each interface's fd is receiving
packets for all interfaces. Modify the code to bind the
pim interface sockets to the interface they were created for.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Don Slice [Mon, 27 Jun 2016 11:34:32 +0000 (04:34 -0700)]
zebra/ospf/ospf6: Fix several memory leaks on if up/down
Resolved several memory leaks caused by ifdown/ifup the vrf device or
a swp port. For bgp/zebra/ospf/ospf6, bouncing the vrf device would cause
a linked list, Interface, and route-table to get leaked. For ospf6,
bouncing the swp device also caused leaks of Connected and Prefix entries.
Ticket: CM-10841 Signed-off-by: Don Slice Reviewed-By: Donald Sharp
Testing Done: Manual testing, bgp and ospf mins passed, smokes had fewer failures than base
Don Slice [Mon, 27 Jun 2016 15:31:57 +0000 (08:31 -0700)]
zebra: resolved problem with show ip route vrf
Repaired damage done by commit upstream, which changed the way show_ip_route
is called to allow for multicast rpf table display. Matched the technique of
the other callers to the new function.
Ticket: CM-11345 Signed-off-by: Don Slice
Reviewed By: Donald Sharp
Testing Done: Manual testing and vrf-min
Donald Sharp [Fri, 24 Jun 2016 00:42:19 +0000 (20:42 -0400)]
pimd: Fix register receive pointer arithmetic
When receiving the register packet from another pim
neighbor at the RP, we were adding an incorrect
amount of bytes to find the start of the ip_hdr
of the encapsulated data. This commit fixes
this issue.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Quentin Young [Tue, 21 Jun 2016 19:57:22 +0000 (19:57 +0000)]
zebra: Suppress 'ip forwarding' in configuration output
Since IP forwarding is enabled by default on Quagga startup, it
makes more sense to only explicitly report the state of this
setting when it is disabled. Inverted the relevant printouts.
Ticket: CM-11462
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Add command and associated functionality to enable dumping
raw netlink messages.
Ticket: CM-6568
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com> Reviewed-by: Don Slice <dslice@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Daniel Walton [Tue, 21 Jun 2016 14:52:43 +0000 (14:52 +0000)]
quagga-reload.py thinks the BGP ASN changed when it did not
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11463
(cherry picked from commit ab5f8310801f1870a7c5c22e1595e4452c558ddb)
Daniel Walton [Tue, 21 Jun 2016 14:24:29 +0000 (14:24 +0000)]
Fix build warnings in start-stop-daemon.c
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com> Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-11484
(cherry picked from commit 39dcf9acd87b18ab00f9f71ec15fdd89fff4b3c8)