]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agobgpd: Clean up 'show bgp neighbor ...' commands
Donald Sharp [Tue, 24 Jan 2017 03:30:37 +0000 (22:30 -0500)]
bgpd: Clean up 'show bgp neighbor ...' commands

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Cleanup 'show .... statistics' command
Donald Sharp [Tue, 24 Jan 2017 02:34:36 +0000 (21:34 -0500)]
bgpd: Cleanup 'show .... statistics' command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Cleanup 'view all' command
Donald Sharp [Tue, 24 Jan 2017 01:50:50 +0000 (20:50 -0500)]
bgpd: Cleanup 'view all' command

1) Make [<view|vrf> WORD] consistent
2) Fix inconsistent help string
3) Fix the show .. vrf all command

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgp: Fix 'show .... regexp REGEX...'
Donald Sharp [Tue, 24 Jan 2017 01:29:54 +0000 (20:29 -0500)]
bgp: Fix 'show .... regexp REGEX...'

Fix this command to use the correct format for
a show command.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Cleanup 'show .... <bestpath|multipath>'
Donald Sharp [Tue, 24 Jan 2017 00:58:56 +0000 (19:58 -0500)]
bgpd: Cleanup 'show .... <bestpath|multipath>'

Cleanup the bgp bestpath or multipath show commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Start cleanup of 'show [ip] bgp ...' commands
Donald Sharp [Tue, 24 Jan 2017 00:48:24 +0000 (19:48 -0500)]
bgpd: Start cleanup of 'show [ip] bgp ...' commands

Create bgp_vty_find_and_parse_afi_safi_vrf that
will parse the
`show [ip] bgp [<view|vrf> WORD] [<ipv4|ipv6> [<unicast|multicast|vpn|encap>]]'
part of a command and to return the correct spot we are in the command.

Cleanup 'dampening parameters' part of this command.

Consolidate the creation of the bgp data structure to be a bit cleaner.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix vpn commands cli
Donald Sharp [Sun, 22 Jan 2017 18:13:48 +0000 (13:13 -0500)]
bgpd: Fix vpn commands cli

The parser was incorrect for the 'set ... vpn nexthop ...' commands.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Remove unused function bgp_parse_safi
Donald Sharp [Sun, 22 Jan 2017 16:05:04 +0000 (11:05 -0500)]
bgpd: Remove unused function bgp_parse_safi

The bgp_parse_safi function is never called remove it.
Especially as that later commits will properly handle
what this function was trying to do.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix function used only within KEEP_OLD_VPN_COMMANDS
Donald Sharp [Sun, 22 Jan 2017 16:01:09 +0000 (11:01 -0500)]
bgpd: Fix function used only within KEEP_OLD_VPN_COMMANDS

The show_adj_route_vpn function is only currently used
in conjunction with the KEEP_OLD_VPN_COMMANDS #define.
Add this function to that define for the moment.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Add VRF_ALL define
Donald Sharp [Sat, 21 Jan 2017 12:07:46 +0000 (07:07 -0500)]
lib: Add VRF_ALL define

Allow the specification of a VRF_ALL to be
used for CLI.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 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>
8 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>
8 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

8 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)

8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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

8 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>
8 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>
8 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>
8 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>
8 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>
8 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
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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

8 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.
8 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>
8 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

8 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>
8 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

8 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>
8 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>
8 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>
8 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)

8 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.

8 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

8 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'

8 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>
8 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

8 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>
8 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

8 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>
8 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>
8 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

8 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>
8 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>
8 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>
8 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>
8 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

8 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>
8 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)

8 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>
8 years agoMerge branch 'master' into cleanup
Donald Sharp [Fri, 13 Jan 2017 19:48:16 +0000 (14:48 -0500)]
Merge branch 'master' into cleanup

8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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>
8 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

8 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]

8 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

8 years agoMerge pull request #69 from opensourcerouting/queue/indent-watchfrr
Donald Sharp [Fri, 13 Jan 2017 13:21:42 +0000 (08:21 -0500)]
Merge pull request #69 from opensourcerouting/queue/indent-watchfrr

watchfrr: indent to Linux CodingStyle

8 years agobgpd: merge vpnvx network [route-map] command
Philippe Guibert [Mon, 9 Jan 2017 18:29:43 +0000 (19:29 +0100)]
bgpd: merge vpnvx network [route-map] command

This commit merges two vty command into one single vty command

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agobgpd: add some show commands for vpnv6
Philippe Guibert [Sun, 8 Jan 2017 17:09:04 +0000 (18:09 +0100)]
bgpd: add some show commands for vpnv6

Some show commands are added for handling vpnv6.
As the commands was present for vpnv4, but not vpnv6, the handler
routine for vty vpnv4 have been extended for vpnv6.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 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>
8 years agobgpd: add network command for vpnv6 address family
Liu Xiaofeng [Mon, 19 Dec 2016 09:53:38 +0000 (10:53 +0100)]
bgpd: add network command for vpnv6 address family

Add the next commands:

    network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD [route-map WORD]
    no network X:X::X:X/M rd ASN:nn_or_IP-address:nn tag WORD

Also, fix show running-config for vpnv6 network, as well as modiying
bgp_static_set_safi, and take into account matching afi table.

Signed-off-by: Liu Xiaofeng <xiaofeng.liu@6wind.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
8 years agowatchfrr: indent to Linux CodingStyle
David Lamparter [Fri, 13 Jan 2017 13:10:00 +0000 (14:10 +0100)]
watchfrr: indent to Linux CodingStyle

before this patch, watchfrr was using an inconsistent style that matched
neither GNU nor Linux kernel nor BSD style.  Reindent to Linux kernel
style, which should be pretty close to pimd & ldpd.

indent (2.2.11) options used:
 -nbad -bap -nbc -bbo -hnl -br -brs -c33 -cd33 -ncdb -ce -ci4
 -cli0 -d0 -di1 -nfc1 -i8 -ip0 -l80 -lp -npcs -nprs -npsl -sai
 -saf -saw -ncs -nsc -sob -nfca -cp33 -ss -ts8 -il1

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agofrr: Remove HAVE_LIBM from the system
Donald Sharp [Fri, 13 Jan 2017 13:02:50 +0000 (08:02 -0500)]
frr: Remove HAVE_LIBM from the system

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agofrr: Remove HAVE_IPV6 from code base
Donald Sharp [Fri, 13 Jan 2017 12:57:57 +0000 (07:57 -0500)]
frr: Remove HAVE_IPV6 from code base

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agotests: fix mis-fixed format string
David Lamparter [Thu, 15 Dec 2016 23:14:55 +0000 (00:14 +0100)]
tests: fix mis-fixed format string

PRIu64 is "u", we need "x", so PRIx64...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Cc: Donald Sharp <sharpd@cumulusnetworks.com>
[cherry-picked from master eed831e065694b3746896b126f6ad47548ea9dc0]

8 years agoMerge pull request #38 from donaldsharp/stable_ospf6_fix
David Lamparter [Fri, 13 Jan 2017 10:32:17 +0000 (11:32 +0100)]
Merge pull request #38 from donaldsharp/stable_ospf6_fix

ospf6d: resolve problem with area range lsid creation

8 years agotests: fix exit <> return mix-up in dejagnu
David Lamparter [Thu, 15 Dec 2016 23:09:46 +0000 (00:09 +0100)]
tests: fix exit <> return mix-up in dejagnu

exit 0 exits the entire testrunner... Oops.
Also, "unresolved" breaks too many things, so make this a pass.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
[cherry-picked from master e988dfd35b0d9df437ac043a613472437c8842e6]

8 years agotests: ignore stderr for expect
David Lamparter [Fri, 13 Jan 2017 10:23:18 +0000 (11:23 +0100)]
tests: ignore stderr for expect

expect redirects both stdout and stderr to its input.  This causes
serious problems when libzebra prints log messages to stderr, which are
then asynchronously inserted in the middle of lines of stdout test
output.  Ultimately this makes testbgpmpattr fail on FreeBSD.

(The stdio buffering seems to be slightly different on FreeBSD,
triggering the bug.)

Just ignore stderr for expect.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoapply rename to readme.md
Quentin Young [Thu, 12 Jan 2017 18:10:48 +0000 (13:10 -0500)]
apply rename to readme.md

8 years agoMerge pull request #65 from LabNConsulting/working/2.0/afi-safi-vty/c
Donald Sharp [Thu, 12 Jan 2017 17:54:30 +0000 (12:54 -0500)]
Merge pull request #65 from LabNConsulting/working/2.0/afi-safi-vty/c

Updated: stable/2.0 pull to pick up bgp afi/safi vty changes (Issues #14 and #61)

8 years agoMerge pull request #66 from pguibert6WIND/frr_6wind_afisafi_iana_1
Donald Sharp [Thu, 12 Jan 2017 17:53:00 +0000 (12:53 -0500)]
Merge pull request #66 from pguibert6WIND/frr_6wind_afisafi_iana_1

Quagga: AFI/SAFI mappings IANA to/from internal values

8 years agobgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61)
Lou Berger [Thu, 12 Jan 2017 14:36:24 +0000 (09:36 -0500)]
bgpd: convert 'show_ip_bgp_vpnv4' to afi/safi form (Issue #61)

8 years agobgpd: remove code contained by ifdef KEEP_OLD_VPNV4_COMMANDS
Lou Berger [Thu, 12 Jan 2017 13:54:22 +0000 (08:54 -0500)]
bgpd: remove code contained by ifdef KEEP_OLD_VPNV4_COMMANDS

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agoQuagga: AFI/SAFI mappings IANA to/from internal values
vivek [Wed, 15 Jun 2016 17:25:35 +0000 (10:25 -0700)]
Quagga: AFI/SAFI mappings IANA to/from internal values

Introduce internal and IANA defintions for AFI/SAFI and mapping
functions and modify code to use these. This refactoring will
facilitate adding support for other AFI/SAFI whose IANA values
won't be suitable for internal data structure definitions (e.g.,
they are not contiguous).
The commit adds some fixes related to afi/safi testing with 'make check
' command.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
Ticket: CM-11416
Reviewed By: CCR-3594 (mpls branch)
Testing Done: Not tested now, tested earlier on mpls branch

8 years agobgpd: conditionally compile out old vpnv4 syntax (Issue #61)
Lou Berger [Tue, 10 Jan 2017 20:53:03 +0000 (15:53 -0500)]
bgpd: conditionally compile out old vpnv4 syntax (Issue #61)
      (under ifdef KEEP_OLD_VPNV4_COMMANDS)

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agobgpd: restore wildcard handling in show summary (Issue#14)
Lou Berger [Fri, 6 Jan 2017 23:25:56 +0000 (18:25 -0500)]
bgpd: restore wildcard handling in show summary (Issue#14)
      Includes more branch specific afi/safi changes

Signed-off-by: Lou Berger <lberger@labn.net>
8 years agobgpd: restore some missing afi/safi commands (Issue #14)
Lou Berger [Fri, 6 Jan 2017 15:50:31 +0000 (10:50 -0500)]
bgpd: restore some missing afi/safi commands (Issue #14)
      Added defines and parse utility functions
      Fix vty code that treated vpn&encap as AFIs
      and some other related vty printing/handline issues
      Note: Includes branch specific changes (due to new parser)

Signed-off-by: Lou Berger <lberger@labn.net>