]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agolib: Add <cr> text for end nodes
Quentin Young [Thu, 8 Sep 2016 20:27:39 +0000 (20:27 +0000)]
lib: Add <cr> text for end nodes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Remove automatic node deletion
Quentin Young [Thu, 8 Sep 2016 18:14:16 +0000 (18:14 +0000)]
lib: Remove automatic node deletion

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix deduplication bug, reinstate graph print
Quentin Young [Wed, 7 Sep 2016 23:02:39 +0000 (23:02 +0000)]
lib: Fix deduplication bug, reinstate graph print

Comparing the wrong nodes led to duplication during
graph construction, fixed. Also update graph pretty
print to use new graph struct.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Continue matching system refactor
Quentin Young [Wed, 7 Sep 2016 04:05:07 +0000 (04:05 +0000)]
lib: Continue matching system refactor

Most things back to working, all CLI units refactored
to use improved graph implementation.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Refactor command_parse.y for graph ds
Quentin Young [Fri, 2 Sep 2016 20:19:03 +0000 (20:19 +0000)]
lib: Refactor command_parse.y for graph ds

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Generalize graph to work for any data type
Quentin Young [Thu, 1 Sep 2016 21:27:33 +0000 (21:27 +0000)]
lib: Generalize graph to work for any data type

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Refactor CLI interface function names
Quentin Young [Thu, 11 Aug 2016 17:50:58 +0000 (17:50 +0000)]
lib: Refactor CLI interface function names

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Remove debug fprintf for cmd_element copy
Quentin Young [Wed, 10 Aug 2016 19:11:31 +0000 (19:11 +0000)]
lib: Remove debug fprintf for cmd_element copy

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add completion string convenience functions
Quentin Young [Wed, 10 Aug 2016 18:31:15 +0000 (18:31 +0000)]
lib: Add completion string convenience functions

And set END_GN default text to <cr>, and scrub
a coupld of extraneous files

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agodebian: Add bison and flex to Build-Depends
Quentin Young [Wed, 10 Aug 2016 15:08:14 +0000 (15:08 +0000)]
debian: Add bison and flex to Build-Depends

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix broken disambiguation on leader tokens
Quentin Young [Wed, 10 Aug 2016 15:04:21 +0000 (15:04 +0000)]
lib: Fix broken disambiguation on leader tokens

Fix incorrect assumption that the set of first tokens
of all commands are perfectly unambiguous

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Handle vararg in graph pretty-print
Quentin Young [Tue, 9 Aug 2016 22:23:17 +0000 (22:23 +0000)]
lib: Handle vararg in graph pretty-print

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Remove unnecessary node pointer
Quentin Young [Tue, 9 Aug 2016 21:31:11 +0000 (21:31 +0000)]
lib: Remove unnecessary node pointer

Selector and option heads had pointers to their
ends, but this turned out to be unnecessary

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Remove unnecessary XSTRDUP
Quentin Young [Tue, 9 Aug 2016 21:02:11 +0000 (21:02 +0000)]
lib: Remove unnecessary XSTRDUP

yy_scan_string duplicates its input

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Revert breaking change to cmp_node
Quentin Young [Tue, 9 Aug 2016 20:28:35 +0000 (20:28 +0000)]
lib: Revert breaking change to cmp_node

Bad conditional refactor broke graph deduplication
and thus disambiguation precedence

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix use after free in lexer
Quentin Young [Tue, 9 Aug 2016 19:30:40 +0000 (19:30 +0000)]
lib: Fix use after free in lexer

Fix occasional bug where deleting flex's input
buffer happens earlier than flex expects

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix various minor bugs
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>
8 years agolib: Code cleanup, formatting, & headers
Quentin Young [Mon, 8 Aug 2016 21:11:14 +0000 (21:11 +0000)]
lib: Code cleanup, formatting, & headers

Gnu-style code, add copyright headers, cleanup some
random style issues, shuffle around code into
relevant units, add docs.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Major parser refactor
Quentin Young [Fri, 5 Aug 2016 20:50:42 +0000 (20:50 +0000)]
lib: Major parser refactor

Lots of cleanup, code consolidation, organizational
improvements.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add docstring support
Quentin Young [Fri, 5 Aug 2016 16:41:42 +0000 (16:41 +0000)]
lib: Add docstring support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Improve matching disambiguation
Quentin Young [Fri, 5 Aug 2016 02:08:16 +0000 (02:08 +0000)]
lib: Improve matching disambiguation

Disambiguation logic now compares full paths
instead of defaulting to an ambiguous match
if the heads cannot be disambiguated

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Unrefactor to signed long long for ranges
Quentin Young [Thu, 4 Aug 2016 18:16:26 +0000 (18:16 +0000)]
lib: Unrefactor to signed long long for ranges

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Allow optional whitespace in ranges
Quentin Young [Thu, 4 Aug 2016 16:39:15 +0000 (16:39 +0000)]
lib: Allow optional whitespace in ranges

Makes ranges where both endpoints are negative
somewhat more readable. Also validate ranges.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add support for negative ranges
Quentin Young [Thu, 4 Aug 2016 16:18:31 +0000 (16:18 +0000)]
lib: Add support for negative ranges

And convert range delimiters to signed int

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Refactor format parser
Quentin Young [Thu, 4 Aug 2016 00:58:12 +0000 (00:58 +0000)]
lib: Refactor format parser

Also fix a bug where selector elements beginning
with the same word are only parsed once

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix use after free in matcher
Quentin Young [Wed, 3 Aug 2016 19:49:02 +0000 (19:49 +0000)]
lib: Fix use after free in matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Implement status variable
Quentin Young [Wed, 3 Aug 2016 19:22:27 +0000 (19:22 +0000)]
lib: Implement status variable

Matcher now keeps track of why it failed

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Implement full command disambiguation logic
Quentin Young [Wed, 3 Aug 2016 02:01:52 +0000 (02:01 +0000)]
lib: Implement full command disambiguation logic

Disambiguation is smarter and somewhat more compact.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add vararg support
Quentin Young [Tue, 2 Aug 2016 16:40:03 +0000 (16:40 +0000)]
lib: Add vararg support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Reorganize command matcher
Quentin Young [Tue, 2 Aug 2016 16:23:54 +0000 (16:23 +0000)]
lib: Reorganize command matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add partial completion support
Quentin Young [Mon, 1 Aug 2016 20:30:14 +0000 (20:30 +0000)]
lib: Add partial completion support

Completions now include nodes that the input
partially matches as well as the children of
nodes those that the input exactly matches.

Also some minor cleanup and bugfixes.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix OOB range parses, variable matches
Quentin Young [Mon, 1 Aug 2016 18:36:30 +0000 (18:36 +0000)]
lib: Fix OOB range parses, variable matches

Variables now allow strings beginning with numbers
to match, ranges and numbers are now long long to
fix OOB parses resulting in integer wraparounds.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fixed bad node copy, modified token regex
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>
8 years agolib: Add partial matching support
Quentin Young [Mon, 1 Aug 2016 13:18:25 +0000 (13:18 +0000)]
lib: Add partial matching support

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Retab command_match.c
Quentin Young [Fri, 29 Jul 2016 18:34:10 +0000 (18:34 +0000)]
lib: Retab command_match.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Re-add partial IPV4 matching support
Quentin Young [Fri, 29 Jul 2016 18:27:59 +0000 (18:27 +0000)]
lib: Re-add partial IPV4 matching support

Also removed debugging output for matcher.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Cleanup some memory issues in CLI
Quentin Young [Fri, 29 Jul 2016 15:54:03 +0000 (15:54 +0000)]
lib: Cleanup some memory issues in CLI

Various memory leaks have been fixed and the quagga
memory macros are in use. Also consolidated the argv
and matching code into one graph traversal.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Improve argv construction
Quentin Young [Wed, 27 Jul 2016 23:30:21 +0000 (23:30 +0000)]
lib: Improve argv construction

Fixed a variety of failure cases and wrote a nice
doc string. Reverted add_node doc string to correct
explanation of procedure.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Cleanup parser memory management
Quentin Young [Wed, 27 Jul 2016 04:17:51 +0000 (04:17 +0000)]
lib: Cleanup parser memory management

Free as appropriate. Additionally add new type
of node to demark graph head (START_GN).

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add matching and argv support
Quentin Young [Wed, 27 Jul 2016 01:35:46 +0000 (01:35 +0000)]
lib: Add matching and argv support

Queries may be run against DFA's to find matching
cmd_element, and argument lists may be constructed.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Incremental matching improvement
Quentin Young [Tue, 26 Jul 2016 14:02:36 +0000 (14:02 +0000)]
lib: Incremental matching improvement

Shotgun changes to matching system

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Reorganize some matching stuff
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>
8 years agolib: Mostly complete matcher
Quentin Young [Thu, 21 Jul 2016 21:38:03 +0000 (21:38 +0000)]
lib: Mostly complete matcher

Input matching and completions works. Still some
rough edges.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Break up functions, begin matcher
Quentin Young [Tue, 19 Jul 2016 21:14:27 +0000 (21:14 +0000)]
lib: Break up functions, begin matcher

Moved test hook out of command.c into vtysh.c,
renamed graph modules, added matching code

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Implement node comparison function
Quentin Young [Tue, 19 Jul 2016 17:06:11 +0000 (17:06 +0000)]
lib: Implement node comparison function

Implement comparator for nodes, some miscellaneous cleanup.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix some DFA construction bugs
Quentin Young [Mon, 18 Jul 2016 16:16:36 +0000 (16:16 +0000)]
lib: Fix some DFA construction bugs

Options get null paths, parser state is properly
cleaned up, caller passes start node

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Finish implementing grammar, DFA construction
Quentin Young [Sun, 17 Jul 2016 21:49:16 +0000 (21:49 +0000)]
lib: Finish implementing grammar, DFA construction

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add generated parser files to .gitignore
Quentin Young [Tue, 12 Jul 2016 14:03:15 +0000 (14:03 +0000)]
lib: Add generated parser files to .gitignore

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Change some includes
Quentin Young [Mon, 11 Jul 2016 19:56:07 +0000 (19:56 +0000)]
lib: Change some includes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Update build config for new parser
Quentin Young [Mon, 11 Jul 2016 19:34:13 +0000 (19:34 +0000)]
lib: Update build config for new parser

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Start implementing DFA
Quentin Young [Thu, 7 Jul 2016 20:35:52 +0000 (20:35 +0000)]
lib: Start implementing DFA

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add parser, lexer, and command tree skeleton
Quentin Young [Wed, 6 Jul 2016 17:16:55 +0000 (17:16 +0000)]
lib: Add parser, lexer, and command tree skeleton

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Cleanup cmd_execute_command
Quentin Young [Thu, 23 Jun 2016 15:14:06 +0000 (15:14 +0000)]
lib: Cleanup cmd_execute_command

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoAdd grammar sandbox framework
Quentin Young [Thu, 23 Jun 2016 14:47:32 +0000 (14:47 +0000)]
Add grammar sandbox framework

8 years agopimd: Start naive implementation of anysource_forward_stop
Donald Sharp [Mon, 11 Jul 2016 20:22:14 +0000 (16:22 -0400)]
pimd: Start naive implementation of anysource_forward_stop

Naive implementation of igmp_anysource_foward_stop.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: IGMPv3 leave not deleting group entry
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>
8 years agolib: Rewrite ipv4 address and prefix validator
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>
8 years agolib: Disallow % in IPv6 addresses and prefixes
Quentin Young [Mon, 27 Jun 2016 14:42:17 +0000 (14:42 +0000)]
lib: Disallow % in IPv6 addresses and prefixes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Rewrite ipv6 prefix matcher
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>
8 years agoall: add default log file if none are defined
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

8 years agopimd: static joins no longer worked
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>
8 years agoRevert "pimd: Prevent igmp packet loopback."
Donald Sharp [Mon, 11 Jul 2016 16:28:36 +0000 (12:28 -0400)]
Revert "pimd: Prevent igmp packet loopback."

This reverts commit 5bbcd1f0fd82e0e982700dbc12dd959629e91b58.

This commit badly breaks local 'ip igmp join XXX YYY' commands.

Revert this and fix the issue a slightly different way

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: BGP should accept "router-id IFNAME"
Sid Khot [Sat, 2 Jul 2016 00:25:30 +0000 (17:25 -0700)]
bgpd: BGP should accept "router-id IFNAME"
ospfd: OSPF should accept "router-id IFNAME"

Added commands in BGP and OSPF where user can specify interface for router-id.

Ticket: CM-5040
Reviewed By: CCR-4908
Testing Done: Manual

8 years agobgpd: "neigbor <interface> ttl-security hops" should reject a hops value greater...
Sid Khot [Sat, 2 Jul 2016 00:06:43 +0000 (17:06 -0700)]
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>

Ticket: CM-5536 CM-5537
Reviewed By: CCR-4865
Testing Done: Manual

8 years agopimd: Set default logfile to Quagga.log
Donald Sharp [Thu, 30 Jun 2016 04:43:30 +0000 (00:43 -0400)]
pimd: Set default logfile to Quagga.log

Until such time a log file line is generated,
default to using /var/log/quagga/Quagga.log

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopim: Show Iif for 'show ip pim upstream' command
Donald Sharp [Wed, 29 Jun 2016 19:49:57 +0000 (15:49 -0400)]
pim: Show Iif for 'show ip pim upstream' command

Modify the 'show ip pim upstream' command to
show the expected incoming interface for
the source.

Ticket: CM-11220
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix igmp isex_excl
Donald Sharp [Wed, 29 Jun 2016 19:07:51 +0000 (15:07 -0400)]
pimd: Fix igmp isex_excl

When we receive an igmpv3 group report that has
an implied *,g make sure that we look at
the source for the g and handle it appropriately

Ticket: CM-11396
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Pass the appropriate data structure around
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>
8 years agopimd: Ensure we should accept a kernel upcall
Donald Sharp [Wed, 29 Jun 2016 16:12:13 +0000 (12:12 -0400)]
pimd: Ensure we should accept a kernel upcall

When we receive a multicast packet from a source
that is not connected to us, silently ignore it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Prevent igmp packet loopback.
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>
8 years agopimd: Make pim_channel_add_oif failures debugs
Donald Sharp [Wed, 29 Jun 2016 11:57:47 +0000 (07:57 -0400)]
pimd: Make pim_channel_add_oif failures debugs

Make failure messages of adding a mroute
a debug and wrapper them in PIM_DEBUG_MROUTE

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
re

8 years agopimd: Make received packet zlog_err a zlog_debug
Donald Sharp [Wed, 29 Jun 2016 11:42:44 +0000 (07:42 -0400)]
pimd: Make received packet zlog_err a zlog_debug

When receiving packets and the parse fails
a zlog_err is generated.  This should be
protected by a debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Bind pim sockets to interface they are associated with
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>
8 years agoMerge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into...
Don Slice [Tue, 28 Jun 2016 11:53:19 +0000 (04:53 -0700)]
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster-next

8 years agozebra/ospf/ospf6: Fix several memory leaks on if up/down
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

8 years agopimd: When receiving the register packet, create the mroute
Donald Sharp [Mon, 27 Jun 2016 18:51:04 +0000 (14:51 -0400)]
pimd: When receiving the register packet, create the mroute

When a RP receives the register packet, move the (*,G) to a
(S,G) route and send the pim message upstream to the source.

With this change the multicast packets are sent from the
source to the interested parties.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Refactor pim_scan_oil
Donald Sharp [Mon, 27 Jun 2016 19:06:46 +0000 (15:06 -0400)]
pimd: Refactor pim_scan_oil

Allow the workings of pim_scan_oil to be called
on a per channel basis.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow (*,G) to work properly.
Donald Sharp [Mon, 27 Jun 2016 16:54:30 +0000 (12:54 -0400)]
pimd: Allow (*,G) to work properly.

When the kernel looks up a *,G route it
expects the incoming interface to be part
of the outgoing interface ttl list.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoProvide example on how to run sudo vtysh show commands without password
Dave Olson [Mon, 27 Jun 2016 16:10:46 +0000 (09:10 -0700)]
Provide example on how to run sudo vtysh show commands without password

Ticket: CM-4709
Reviewed By: dsharp
Testing Done: Uncommented, ran show commands

See the comments added, and in the bug.  Set up for users in group
quagga, with NOEXEC to not open security holes.

8 years agozebra: resolved problem with show ip route vrf
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

8 years agopimd: Fix register receive pointer arithmetic
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>
8 years agopimd: Removing extra asserts
Donald Sharp [Thu, 23 Jun 2016 19:39:20 +0000 (15:39 -0400)]
pimd: Removing extra asserts

in the igmp_group_free path, the normal deletion path
was causing asserts to happen.  There is no need
to have asserts here for this reason.

Further testing done w/ valgrind.

Ticket: CM-11401
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Add documentation to internal command format parser functions
Quentin Young [Thu, 23 Jun 2016 19:46:14 +0000 (19:46 +0000)]
lib: Add documentation to internal command format parser functions

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agopimd: Fix igmp Trace logging
Donald Sharp [Thu, 23 Jun 2016 16:24:32 +0000 (12:24 -0400)]
pimd: Fix igmp Trace logging

In general we don't need to know
when a read is scheduled.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Move timer information to TRACE_DETAIL
Donald Sharp [Thu, 23 Jun 2016 15:54:24 +0000 (11:54 -0400)]
pimd: Move timer information to TRACE_DETAIL

Move another timer informational debug to TRACE_DETAIL

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Handle pimreg a bit better
Donald Sharp [Thu, 23 Jun 2016 15:46:57 +0000 (11:46 -0400)]
pimd: Handle pimreg a bit better

The pimreg device is vif_index == 0.  Allow it
to be used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Turn some trace information to trace detail
Donald Sharp [Thu, 23 Jun 2016 15:15:45 +0000 (11:15 -0400)]
pimd: Turn some trace information to trace detail

Turn some PIM_TRACE to PIM_TRACE_DETAIL.  Log file
was getting spammed with unneeded information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Allow pimreg device to be output vif
Donald Sharp [Thu, 23 Jun 2016 15:03:47 +0000 (11:03 -0400)]
pimd: Allow pimreg device to be output vif

With the change to moving the pimreg to vifindex 0,
when a packet is kicked up from the kernel to us
we need to install the route into the system.

This change allows us to do this now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Get proper group on register receive
Donald Sharp [Wed, 22 Jun 2016 20:44:05 +0000 (16:44 -0400)]
pimd: Get proper group on register receive

When we receive a encapsulated packet from another
pim neighbor, the code needs to grab the group
from the ip_hdr->src.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix checking to see if we are a RP or not
Donald Sharp [Wed, 22 Jun 2016 20:39:31 +0000 (16:39 -0400)]
pimd: Fix checking to see if we are a RP or not

When we create the pim_ifp we need to see if this
interface allows us to elect our selves the RP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Log Rotate is not working properly
Donald Sharp [Wed, 22 Jun 2016 15:42:50 +0000 (11:42 -0400)]
pimd: Log Rotate is not working properly

The log line was causing confusion when we
were rotating quagga.  None of the other
protocols were logging lines on rotate
so just remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovtysh: auto-generated vtysh_cmd.c file should depend on its creator
Paul Jakma [Tue, 14 Jun 2016 14:06:34 +0000 (15:06 +0100)]
vtysh: auto-generated vtysh_cmd.c file should depend on its creator

8 years agobgpd: Fix another clang warning
Donald Sharp [Tue, 21 Jun 2016 21:24:19 +0000 (17:24 -0400)]
bgpd: Fix another clang warning

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Add iface index to RA message count increment failure msg
Quentin Young [Tue, 21 Jun 2016 20:14:20 +0000 (20:14 +0000)]
zebra: Add iface index to RA message count increment failure msg

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: Suppress 'ip forwarding' in configuration output
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>
8 years agozebra: Add `debug zebra kernel msgdump` functionality
Quentin Young [Tue, 21 Jun 2016 18:43:40 +0000 (18:43 +0000)]
zebra: Add `debug zebra kernel msgdump` functionality

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>
8 years agoquagga-reload.py thinks the BGP ASN changed when it did not
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)

8 years agoFix build warnings in start-stop-daemon.c
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)

8 years agozebra: Change bitwise operations to purpose-built macros
Quentin Young [Mon, 20 Jun 2016 13:31:55 +0000 (13:31 +0000)]
zebra: Change bitwise operations to purpose-built macros

Some bitfields for zebra_debug_* flags were being modified
with bitwise operators instead of the purpose-built macros
in lib/zebra.h. Changed such instances to use the macros.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: Add ipv6 router advertisement message counter
Quentin Young [Mon, 20 Jun 2016 15:21:10 +0000 (15:21 +0000)]
zebra: Add ipv6 router advertisement message counter

Ticket: CM-4497

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>