]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoMerge pull request #114 from opensourcerouting/parser-mtypes
Quentin Young [Wed, 25 Jan 2017 02:16:23 +0000 (21:16 -0500)]
Merge pull request #114 from opensourcerouting/parser-mtypes

lib: parser: fix memory management

7 years agolib: parser: fix memory management
David Lamparter [Wed, 25 Jan 2017 01:27:29 +0000 (02:27 +0100)]
lib: parser: fix memory management

command.c had:
DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command desc")
while command_match.c had:
DEFINE_MTYPE_STATIC(LIB, CMD_TOKENS, "Command Tokens")

... which means that there are 2 distinct MTYPE_CMD_TOKENS.
(The description text being different does not matter, even with the
same text it'd be 2 distinct types.)

command_match.c allocates token->arg in command_match_r() while
command.c frees it in del_cmd_token().  Therefore with each command
being executed, the allocation count goes up on one, down on the other.

=> clean up parser allocation counting.  Also, use separate MTYPEs for
the different fields in struct cmd_token.

Fixes: #108 / ee9216cf ("lib, ripngd: clean up merge leftovers")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Cc: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #104 from opensourcerouting/time-cleanup
Donald Sharp [Tue, 24 Jan 2017 16:43:32 +0000 (11:43 -0500)]
Merge pull request #104 from opensourcerouting/time-cleanup

Time cleanup

7 years agoMerge pull request #42 from donaldsharp/pim_lib_work2
David Lamparter [Tue, 24 Jan 2017 16:10:09 +0000 (17:10 +0100)]
Merge pull request #42 from donaldsharp/pim_lib_work2

Pim-SM + MSDP

7 years agoMerge branch 'frr/pull/93'
David Lamparter [Tue, 24 Jan 2017 02:16:01 +0000 (03:16 +0100)]
Merge branch 'frr/pull/93'

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: fix whitespace
David Lamparter [Tue, 24 Jan 2017 02:15:26 +0000 (03:15 +0100)]
bgpd: fix whitespace

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #96 from qlyoung/guard-strict-dedup
David Lamparter [Tue, 24 Jan 2017 02:10:55 +0000 (03:10 +0100)]
Merge pull request #96 from qlyoung/guard-strict-dedup

lib: guard strict cli completions

7 years agolib: time: add TIMEVAL_TO_TIMESPEC
David Lamparter [Mon, 23 Jan 2017 22:17:35 +0000 (23:17 +0100)]
lib: time: add TIMEVAL_TO_TIMESPEC

Should be in system headers, but not specified by any standard.
Not currently used anywhere yet.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: cope with negative timeout in thread.c
David Lamparter [Mon, 23 Jan 2017 17:51:19 +0000 (18:51 +0100)]
lib: cope with negative timeout in thread.c

Since time is no longer cached, if we schedule something with zero
timeout, it will automatically be negative by the time we reach the
event loop.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: clean out thread.c
David Lamparter [Mon, 23 Jan 2017 17:45:43 +0000 (18:45 +0100)]
lib: time: clean out thread.c

Remove quagga_get_relative(), replace with monotime().

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: simplify SPF time consumption calculations
David Lamparter [Mon, 23 Jan 2017 17:16:03 +0000 (18:16 +0100)]
ospfd: simplify SPF time consumption calculations

monotime_since() does exactly the same thing.
... and timeval_elapsed is now private to lib/thread.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: use monotime()
David Lamparter [Wed, 18 Jan 2017 00:30:43 +0000 (01:30 +0100)]
*: use monotime()

This is largely a bulk-replace made with coccinelle.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years ago*: remove quagga_gettime() return value checks
David Lamparter [Tue, 17 Jan 2017 22:07:59 +0000 (23:07 +0100)]
*: remove quagga_gettime() return value checks

The next patch will bulk-replace these, and monotime() has time_t as
return value, not an error indicator.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: remove local time helpers
David Lamparter [Tue, 17 Jan 2017 21:57:57 +0000 (22:57 +0100)]
lib: time: remove local time helpers

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: remove recent_time
David Lamparter [Tue, 17 Jan 2017 21:48:33 +0000 (22:48 +0100)]
lib: time: remove recent_time

This isn't even used anywhere.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: remove recent_relative_time()
David Lamparter [Tue, 17 Jan 2017 21:46:07 +0000 (22:46 +0100)]
lib: time: remove recent_relative_time()

Replace with monotime() [which is not cached].

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospf6d: time: remove unused/duplicate helpers
David Lamparter [Mon, 23 Jan 2017 15:54:56 +0000 (16:54 +0100)]
ospf6d: time: remove unused/duplicate helpers

timersub() & timerclear() are in sys/time.h;
timerstring_local() is unused.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoospfd: time: replace local helpers with monotime
David Lamparter [Tue, 17 Jan 2017 21:05:56 +0000 (22:05 +0100)]
ospfd: time: replace local helpers with monotime

This ditches tv_add, tv_sub, tv_cmp, etc. in favour of
monotime{,_since,_until}() which actually makes the code much more
readable in some locations.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agolib: time: add new monotime() helpers
David Lamparter [Mon, 23 Jan 2017 15:54:51 +0000 (16:54 +0100)]
lib: time: add new monotime() helpers

This adds monotime() to retrieve monotonic clock time, as well as
monotime_since() and monotime_until() for relative monotonic time.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request #90 from LabNConsulting/remotes/origin/working/master/patch-set...
Donald Sharp [Fri, 20 Jan 2017 16:27:15 +0000 (11:27 -0500)]
Merge pull request #90 from LabNConsulting/remotes/origin/working/master/patch-set/2a-no-vrf

Master version of #83 Fix a number of VPN/Encap SAFI related issues (no VRF CLI changes)

7 years agoMerge pull request #88 from pguibert6WIND/mergedown_vpn_old_format
Donald Sharp [Fri, 20 Jan 2017 15:52:17 +0000 (10:52 -0500)]
Merge pull request #88 from pguibert6WIND/mergedown_vpn_old_format

Mergedown vpn old format

7 years agolib: guard strict cli completions
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>
7 years agopimd: Cleanup the headers.
Donald Sharp [Thu, 19 Jan 2017 15:01:02 +0000 (10:01 -0500)]
pimd: Cleanup the headers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: PIM_MRT is a linux specific piece of code.
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>
7 years agopimd: Fix README file for FRR
Donald Sharp [Thu, 19 Jan 2017 13:57:17 +0000 (08:57 -0500)]
pimd: Fix README file for FRR

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Cleanup compile warnings
Donald Sharp [Thu, 19 Jan 2017 13:49:47 +0000 (08:49 -0500)]
pimd: Cleanup compile warnings

Cleanup some compile warnings in pim on *bsd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Missing include causes compile failure on some bsd's
Donald Sharp [Thu, 19 Jan 2017 13:49:12 +0000 (08:49 -0500)]
pimd: Missing include causes compile failure on some bsd's

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/master' into pim_lib_work2
Donald Sharp [Thu, 19 Jan 2017 09:32:49 +0000 (04:32 -0500)]
Merge remote-tracking branch 'origin/master' into pim_lib_work2

Conflicts:
lib/zebra.h
zebra/rt_netlink.c

7 years agoisisd: Fix unused variable in some situations.
Donald Sharp [Thu, 19 Jan 2017 00:32:25 +0000 (19:32 -0500)]
isisd: Fix unused variable in some situations.

Fix an unused variable for certain compile
options.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix signed/unsigned comparison
Donald Sharp [Thu, 19 Jan 2017 00:31:52 +0000 (19:31 -0500)]
zebra: Fix signed/unsigned comparison

Fix a signed/unsigned comparison.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Cleanup some compiler warnings
Donald Sharp [Thu, 19 Jan 2017 00:30:47 +0000 (19:30 -0500)]
bgpd: Cleanup some compiler warnings

Cleanup some compiler warnings discovered by
omnios.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Add some documentation to wheel.h
Donald Sharp [Thu, 19 Jan 2017 00:04:40 +0000 (19:04 -0500)]
lib: Add some documentation to wheel.h

Add some hopefully useful documentation to the
timer wheel.h code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: use address-family <afi> <safi> in show running for vpn&encap (Issue #80)
Lou Berger [Tue, 17 Jan 2017 18:45:46 +0000 (13:45 -0500)]
bgpd: use address-family <afi> <safi> in show running for vpn&encap (Issue #80)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd rfapi: use VN as nexthop for MPLS tunnels too
Lou Berger [Fri, 13 Jan 2017 15:18:48 +0000 (10:18 -0500)]
bgpd rfapi: use VN as nexthop for MPLS tunnels too
     Also minor show format cleanup

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: allow VPN next hop to be different AFI than NLRI next hop (Issue #71)
Lou Berger [Sat, 14 Jan 2017 13:34:22 +0000 (08:34 -0500)]
bgpd: allow VPN next hop to be different AFI than NLRI next hop (Issue #71)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agobgpd: fix RD stomping by update group code (Issue #71)
Lou Berger [Sat, 14 Jan 2017 14:46:54 +0000 (09:46 -0500)]
bgpd: fix RD stomping by update group code (Issue #71)

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #73 from opensourcerouting/ldpd-json
Donald Sharp [Wed, 18 Jan 2017 19:37:06 +0000 (14:37 -0500)]
Merge pull request #73 from opensourcerouting/ldpd-json

ldpd: json support for show commands

7 years agoMerge pull request #89 from opensourcerouting/queue/build-pkgconfig
Donald Sharp [Wed, 18 Jan 2017 17:07:58 +0000 (12:07 -0500)]
Merge pull request #89 from opensourcerouting/queue/build-pkgconfig

build: include copy of pkg.m4, fix invocation

7 years agobuild: include copy of pkg.m4, fix invocation
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>
7 years agoMerge pull request 'frr/pull/87'
David Lamparter [Wed, 18 Jan 2017 16:13:27 +0000 (17:13 +0100)]
Merge pull request 'frr/pull/87'

Fixes a couple off-by-ones introduced in previous commit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agoMerge pull request 'frr/pull/85'
David Lamparter [Wed, 18 Jan 2017 16:02:30 +0000 (17:02 +0100)]
Merge pull request 'frr/pull/85'

Library changes and some zebra (Linux) kernel interface foo from the
PIM-SM/MSDP changeset.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agozebra: Fix compile warnings under freebsd
Donald Sharp [Wed, 18 Jan 2017 15:17:20 +0000 (10:17 -0500)]
zebra: Fix compile warnings under freebsd

Compiling under clang we see compiler warnings
Fix them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agocumulus: Fixup function only needed for linux
Donald Sharp [Wed, 18 Jan 2017 15:14:26 +0000 (10:14 -0500)]
cumulus: Fixup function only needed for linux

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: Fix compilation error
Donald Sharp [Wed, 18 Jan 2017 12:50:19 +0000 (07:50 -0500)]
pimd: Fix compilation error

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
7 years agopimd: Remove bad merges
Donald Sharp [Wed, 18 Jan 2017 12:47:58 +0000 (07:47 -0500)]
pimd: Remove bad merges

Two functions were accidentally left around
as part of the merge operation.  Remove them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agopimd: 'struct ip_mreqn' is not available on all platforms
Donald Sharp [Wed, 18 Jan 2017 12:24:24 +0000 (07:24 -0500)]
pimd: 'struct ip_mreqn' is not available on all platforms

Signed-off-by: Donald Sharp <sharpd@cumulusnetowrks.com>
7 years agozebra: Fix kernel_get_ipmr_sg_stats to return an value
Donald Sharp [Wed, 18 Jan 2017 11:49:40 +0000 (06:49 -0500)]
zebra: Fix kernel_get_ipmr_sg_stats to return an value

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: add define of compilation for vpn commands
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
7 years agoconfigure: add enable_old_vpn_commands configuration param
Philippe Guibert [Wed, 18 Jan 2017 10:15:24 +0000 (11:15 +0100)]
configure: add enable_old_vpn_commands configuration param

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>
7 years agolib: additional patch for 496e83a
Quentin Young [Wed, 18 Jan 2017 06:09:26 +0000 (06:09 +0000)]
lib: additional patch for 496e83a

Fixes a couple off-by-ones introduced in previous commit.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agopimd: SO_BINDTODEVICE is not available on some platforms.
Donald Sharp [Wed, 18 Jan 2017 03:45:19 +0000 (22:45 -0500)]
pimd: SO_BINDTODEVICE is not available on some platforms.

Follow bgp's lead and don't allow SO_BINDTODEVICE on *bsd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix wrong return type
Donald Sharp [Wed, 18 Jan 2017 03:27:57 +0000 (22:27 -0500)]
zebra: Fix wrong return type

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Allow the collection of sg stats on more platforms.
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>
7 years agozebra: Fix compiles for non-linux based systems
Donald Sharp [Wed, 18 Jan 2017 02:18:57 +0000 (21:18 -0500)]
zebra: Fix compiles for non-linux based systems

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix compiles for non-linux based systems
Donald Sharp [Wed, 18 Jan 2017 02:18:57 +0000 (21:18 -0500)]
zebra: Fix compiles for non-linux based systems

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/master' into pim_lib_work2
Donald Sharp [Wed, 18 Jan 2017 02:01:56 +0000 (21:01 -0500)]
Merge remote-tracking branch 'origin/master' into pim_lib_work2

7 years agozebra: LastUsed needs to be updated properly.
Donald Sharp [Sun, 4 Dec 2016 19:41:20 +0000 (14:41 -0500)]
zebra: LastUsed needs to be updated properly.

The change to allow 12.04 to work killed S,G age out.

Put it back.

Ticket: CM-13879
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Allow json to work across different versions.
Donald Sharp [Sat, 3 Dec 2016 01:39:24 +0000 (20:39 -0500)]
lib: Allow json to work across different versions.

The json_object_object_get_ex function is not fully available
across all versions of json.  Write a wrapper to allow
it to work.

Ticket: CM-13872
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Fix clang SA warnings.
Donald Sharp [Sun, 13 Nov 2016 03:45:25 +0000 (22:45 -0500)]
lib: Fix clang SA warnings.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Cleanup zebra_static CLANG/SA issues.
Donald Sharp [Sun, 13 Nov 2016 03:12:13 +0000 (22:12 -0500)]
zebra: Cleanup zebra_static CLANG/SA issues.

When compiling using CLANG's SA, cleanup the
SA issues found.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Perform safe walk of RIB entries in rib_process()
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.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-13393
Reviewed By: Trivial
Testing Done: Basic manual test

7 years agolib: Fix 'show thread cpu' to display active threads
Donald Sharp [Thu, 10 Nov 2016 19:25:39 +0000 (14:25 -0500)]
lib: Fix 'show thread cpu' to display active threads

Fix the display of 'show thread cpu' to keep track
of the number of active threads and to display that
information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
lib: Fix thread_execute_crash

7 years agolib: Slight Optimization of thread handling.
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.
7 years agolib: Add Timer Wheel functionality
Donald Sharp [Wed, 2 Nov 2016 23:03:29 +0000 (19:03 -0400)]
lib: Add Timer Wheel functionality

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fix include order for build
Donald Sharp [Fri, 7 Oct 2016 13:05:28 +0000 (09:05 -0400)]
zebra: Fix include order for build

7 years agozebra: Fully decode mcast messages
Donald Sharp [Wed, 10 Aug 2016 12:54:58 +0000 (08:54 -0400)]
zebra: Fully decode mcast messages

Fully decode mcast messages from the kernel.  We are not
doing anything with this at the moment, but that will
change.

Additionally convert over to using lookup for
displaying the route type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Use single correct definition for prefix string buffer
vivek [Tue, 9 Aug 2016 22:54:14 +0000 (15:54 -0700)]
lib: Use single correct definition for prefix string buffer

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reivewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-12262
Reviewed By: CCR-5065
Testing Done: Manual

7 years agozebra: Allow netlink_talk to choose the filter function to call
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>
7 years agozebra: Remove unused variable.
Donald Sharp [Wed, 3 Aug 2016 23:53:42 +0000 (19:53 -0400)]
zebra: Remove unused variable.

Remove the rtnh variable since it is unused.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agolib: Setup prefix.h to allow it to store (s,g)
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>
7 years agozebra: API to locate client structure based on protocol
vivek [Thu, 21 Jul 2016 15:50:17 +0000 (08:50 -0700)]
zebra: API to locate client structure based on protocol

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:
Reviewed By: CCR-4968
Testing Done: Tested with subsequent patch(es)

7 years agoMerge pull request #59 from donaldsharp/cli_cleanup
David Lamparter [Tue, 17 Jan 2017 20:36:07 +0000 (21:36 +0100)]
Merge pull request #59 from donaldsharp/cli_cleanup

Cli cleanup, largely VNC related, minor bgpd/ospfd/lib fixes.

7 years agoMerge pull request #82 from opensourcerouting/queue/ldp-xml2cli-build
Donald Sharp [Tue, 17 Jan 2017 18:30:59 +0000 (13:30 -0500)]
Merge pull request #82 from opensourcerouting/queue/ldp-xml2cli-build

build: fix several ldpd XML-CLI build issues

7 years agoMerge remote-tracking branch 'origin/stable/2.0'
Donald Sharp [Tue, 17 Jan 2017 18:03:59 +0000 (13:03 -0500)]
Merge remote-tracking branch 'origin/stable/2.0'

7 years agobuild: fix several ldpd XML-CLI build issues
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>
7 years agoMerge pull request #78 from pguibert6WIND/fix_str2prefix_rd_as4
Donald Sharp [Tue, 17 Jan 2017 17:56:46 +0000 (12:56 -0500)]
Merge pull request #78 from pguibert6WIND/fix_str2prefix_rd_as4

bgpd: str2prefix_rd support for AS4 format

7 years agobgpd: avoid recalculating as_val value in str2prefix_rd
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>
7 years agoMerge pull request #77 from pguibert6WIND/frr_6wind_vpnv6fix_1
Donald Sharp [Tue, 17 Jan 2017 13:38:49 +0000 (08:38 -0500)]
Merge pull request #77 from pguibert6WIND/frr_6wind_vpnv6fix_1

bgpd: fix nexthop comparison for nexthop vpnv6 attribute

7 years agobgpd: fix nexthop comparison for nexthop vpnv6 attribute
Philippe Guibert [Fri, 6 Jan 2017 12:35:40 +0000 (13:35 +0100)]
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>
7 years agobgpd: str2prefix_rd support for AS4 format
Philippe Guibert [Mon, 24 Oct 2016 13:16:36 +0000 (15:16 +0200)]
bgpd: str2prefix_rd support for AS4 format

This commit improves the ability for str2prefix_rd command to support
AS4 format. Until now, only AS2 format and IP format was supported.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoMerge pull request #68 from donaldsharp/cleanup
Olivier Dugeon [Mon, 16 Jan 2017 14:12:55 +0000 (15:12 +0100)]
Merge pull request #68 from donaldsharp/cleanup

Cleanup

7 years agozebra: Some code cleanup based upon Review.
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>
7 years agobgpd: Fixup missing list '...' values
Donald Sharp [Mon, 16 Jan 2017 12:42:38 +0000 (07:42 -0500)]
bgpd: Fixup missing list '...' values

When I modified the code to use the new cli, I missed
adding a '...' in a couple of spaces.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Put back show command to way it was originally
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>
7 years agobgpd: Add missing help-string for [route-map WORD]
Donald Sharp [Mon, 16 Jan 2017 00:01:56 +0000 (19:01 -0500)]
bgpd: Add missing help-string for [route-map WORD]

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'frr/master' into cli_cleanup
Donald Sharp [Sun, 15 Jan 2017 23:56:01 +0000 (18:56 -0500)]
Merge remote-tracking branch 'frr/master' into cli_cleanup

7 years agoospfd: Fix some more virtual-link crashes
Donald Sharp [Sun, 15 Jan 2017 23:45:09 +0000 (18:45 -0500)]
ospfd: Fix some more virtual-link crashes

This commit fixes 2 virtual link cli crashes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #70 from pguibert6WIND/frr_6wind_vpnv6_2
Donald Sharp [Sat, 14 Jan 2017 00:23:47 +0000 (19:23 -0500)]
Merge pull request #70 from pguibert6WIND/frr_6wind_vpnv6_2

VPNv6 Improvements ( version 2)

7 years agobgpd: Fixup optional safi parameters
Donald Sharp [Fri, 13 Jan 2017 21:45:12 +0000 (16:45 -0500)]
bgpd: Fixup optional safi parameters

The afi/safi specification should allow you to skip
the safi if it is defaulting to unicast.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge branch 'master' into cleanup
Donald Sharp [Fri, 13 Jan 2017 19:48:16 +0000 (14:48 -0500)]
Merge branch 'master' into cleanup

7 years agobgpd: Remove missed HAVE_IPV6
Donald Sharp [Fri, 13 Jan 2017 19:32:02 +0000 (14:32 -0500)]
bgpd: Remove missed HAVE_IPV6

Not sure how I missed this :(

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: Fixup paranthesis mistake
Donald Sharp [Fri, 13 Jan 2017 17:46:58 +0000 (12:46 -0500)]
zebra: Fixup paranthesis mistake

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoldpd: reorganize json support and fix a few issues
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;

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: json support for show commands
Daniel Walton [Sat, 17 Dec 2016 20:55:05 +0000 (20:55 +0000)]
ldpd: json support for show commands

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoMerge branch 'stable/2.0-for-merge'
David Lamparter [Fri, 13 Jan 2017 14:24:25 +0000 (15:24 +0100)]
Merge branch 'stable/2.0-for-merge'

Conflicts (CLI vs. atol()):
- bgpd/bgp_vty.c
- ospfd/ospf_vty.c
- zebra/zebra_vty.c

NB: pull req #65 (LabNConsulting/working/2.0/afi-safi-vty/c) was
excluded from this merge.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agopartial merge: revert "LabNConsulting/working/2.0/afi-safi-vty/c"
David Lamparter [Fri, 13 Jan 2017 14:10:05 +0000 (15:10 +0100)]
partial merge: revert "LabNConsulting/working/2.0/afi-safi-vty/c"

Unfortunately, the CLI changes need to be redone on master since the CLI
has massively changed there.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: remove one extra help handler from show bgp mpls commands
Philippe Guibert [Fri, 13 Jan 2017 13:29:20 +0000 (14:29 +0100)]
bgpd: remove one extra help handler from show bgp mpls commands

This commit fixes the help display of show bgp mpls commands, since
the last change introduced a problem in relation with help handlers.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
7 years agoMerge pull request #67 from opensourcerouting/stable-test-fixes
Donald Sharp [Fri, 13 Jan 2017 13:51:14 +0000 (08:51 -0500)]
Merge pull request #67 from opensourcerouting/stable-test-fixes

stable/2.0 test fixes

7 years agolib: limit size of vty buffer to 4096 bytes
Quentin Young [Tue, 10 Jan 2017 23:33:50 +0000 (23:33 +0000)]
lib: limit size of vty buffer to 4096 bytes

This removes the automatic resizing of the vty input buffer and places a
hard size cap of 4096 bytes. It also fixes a potentially unsafe strcpy.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
[cherry-picked from master 2af38873d89e20bd039255418366c1601aa99e64]

7 years agoMerge pull request #63 from qlyoung/fix-vty-buffer
David Lamparter [Fri, 13 Jan 2017 13:33:50 +0000 (14:33 +0100)]
Merge pull request #63 from qlyoung/fix-vty-buffer

lib: limit size of vty buffer to 4096 bytes