Quentin Young [Thu, 19 Jan 2017 17:07:39 +0000 (17:07 +0000)]
lib: guard strict cli completions
Completions are checked for token and docstring equality before
deduplicating. Put an ifdef guard around checking docstrings because
many of them are inconsistent and may confuse users in a release build.
It is a good idea to enable VTYSH_DEBUG when adding new CLI in the
future to help check docstrings.
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Donald Sharp [Thu, 19 Jan 2017 14:58:53 +0000 (09:58 -0500)]
pimd: PIM_MRT is a linux specific piece of code.
The PIM_MRT and registration for WRVIFWHOLECACHE
is a bit of linux specific code. Until such
time that this gets implemented we will have
issues being able to work within the context
of PIM-SM.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
David Lamparter [Wed, 18 Jan 2017 17:01:53 +0000 (18:01 +0100)]
build: include copy of pkg.m4, fix invocation
pkg.m4 will be missing on systems that don't have pkg-config installed;
this renders the point of the configure check moot which is to find
pkg-config...
Also, PKG_PROG_PKG_CONFIG should be invoked unconditionally as described
in https://autotools.io/pkgconfig/pkg_check_modules.html
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Philippe Guibert [Wed, 18 Jan 2017 11:27:52 +0000 (12:27 +0100)]
bgpd: add define of compilation for vpn commands
Use KEEP_OLD_VPN_COMMANDS define to brace some vty commands used by bgp
to configure or show vpnvx contexts using old method, that is to say
using vty keyword vpnv4 or vpnv6 command.
In addition to this, the commit adds two new commands under route-map
with new format:
[no] set ipv4|ipv6 vpn nexthop <IPv4 Address> | <IPv6 Address>
It also add following command in old format:
[no] set vpnv6 nexthop <IPv6 Address>
Note that the commit does not take into account the availability of old
commands that are not available in new format.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com
This configure applies for BGP and keeps old for vpnv4/vpnv6
configuration and exploitation commands.
If not used, this old style vty commands will not be included.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Donald Sharp [Wed, 18 Jan 2017 03:01:36 +0000 (22:01 -0500)]
zebra: Allow the collection of sg stats on more platforms.
The code to collect the sg stats was written for linux.
Abstract the call to allow it to work on all platforms.
I have not implemented the call for non-linux systems.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
vivek [Fri, 11 Nov 2016 02:49:43 +0000 (18:49 -0800)]
zebra: Perform safe walk of RIB entries in rib_process()
There is a scenario where a RIB entry is unlinked and freed during RIB
processing. However, the walk of the entries is not being performed in
a safe manner. Fix the code to do this correctly.
Donald Sharp [Thu, 10 Nov 2016 18:58:40 +0000 (13:58 -0500)]
lib: Slight Optimization of thread handling.
This commit does these things:
1) Make thread_add_unuse own the setting of THREAD_UNUSED.
2) Move thread->hist finding to to thread_get.
We are storing the thread->hist even when the thread
is on the unused. This means that we check to see
if the funcname or func have changed and we get new
history. Else we've probably just retrieved the last
unused which has the same func/funcanme. This is
a common practice to do THREAD_OFF/THREAD_ON in
quick succession.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
Donald Sharp [Tue, 9 Aug 2016 17:02:27 +0000 (13:02 -0400)]
zebra: Allow netlink_talk to choose the filter function to call
The netlink_talk call sends a message to the kernel, which
with netlink_talk_filter only waits for the ACK.
It would be nice to have the ability to specify what the handler
function would be for when we send queries about mcast S,G routes
so that we can gather the data returned from the kernel.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Fri, 22 Jul 2016 09:58:08 +0000 (05:58 -0400)]
lib: Setup prefix.h to allow it to store (s,g)
We need the ability to store the (s,g) in a struct prefix.
This will allow us to consolidate some duplicated code in
pimd as well as set us up to switch from a link list to a
table to store (s,g) state.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
David Lamparter [Fri, 13 Jan 2017 14:31:04 +0000 (15:31 +0100)]
build: fix several ldpd XML-CLI build issues
- the location of ldp_vty_cmds.c can be either in srcdir or builddir,
depending on whether a premade file from a dist tarball is used
- perl libxml support is only needed if that file is absent
- the actual perl script wasn't even included in the dist tarball
- the include location doesn't work when srcdir != builddir
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Philippe Guibert [Tue, 17 Jan 2017 16:51:40 +0000 (17:51 +0100)]
bgpd: avoid recalculating as_val value in str2prefix_rd
This is an optimisation that consists in avoiding calling twice atol()
function when converting an ext. community to an AS4 byte or a standard AS byte value.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
bgpd: fix nexthop comparison for nexthop vpnv6 attribute
As nexthop attribute for vpnv6 also contains a blank RD and a blank tag,
the IPv6 address length increases from 16 to 24 bytes. The same was
observed for vpnv4 nexthop, but was missing for VPNv6.
The same is done for martian nexthop debugging.
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Donald Sharp [Mon, 16 Jan 2017 13:57:20 +0000 (08:57 -0500)]
zebra: Some code cleanup based upon Review.
Cleanup 2 spots in the code:
1) In if_netlink.c -> combine multi-line if statement into 1 line
2) In zebra_ptm.c -> only handle code that needs to be inside the if statement
in the if statement.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Donald Sharp [Mon, 16 Jan 2017 00:13:23 +0000 (19:13 -0500)]
bgpd: Put back show command to way it was originally
I modified the 'show ....' command to be one long line.
Upon reflection and porting the large-community code
I have decided that we need to put this back to the way
it was before.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Renato Westphal [Tue, 10 Jan 2017 20:27:03 +0000 (18:27 -0200)]
ldpd: reorganize json support and fix a few issues
* reorganize code to improve maintainability;
* add json output for the l2vpn show commands as well;
* in "show mpls ldp discovery json", nest the adjacencies inside the
respective interfaces. Also, fix a segfault when trying to show a
targeted adjacency;
* in "show mpls ldp neighbor", show the address-family of the adjacencies
of each neighbor. Also, remove "downstreamUnsolicited":true from
the output;
* in "show mpls ldp interface json", show all interface/address-family
combinations;