]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
8 years agoMerge branch 'cmaster-next' into vtysh-grammar
Quentin Young [Mon, 17 Oct 2016 23:36:21 +0000 (23:36 +0000)]
Merge branch 'cmaster-next' into vtysh-grammar

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
bgpd/bgp_route.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
isisd/isis_redist.c
isisd/isis_routemap.c
isisd/isis_vty.c
isisd/isisd.c
lib/command.c
lib/distribute.c
lib/if.c
lib/keychain.c
lib/routemap.c
lib/routemap.h
ospf6d/ospf6_asbr.c
ospf6d/ospf6_interface.c
ospf6d/ospf6_neighbor.c
ospf6d/ospf6_top.c
ospf6d/ospf6_zebra.c
ospf6d/ospf6d.c
ospfd/ospf_routemap.c
ospfd/ospf_vty.c
ripd/rip_routemap.c
ripngd/ripng_routemap.c
vtysh/extract.pl.in
vtysh/vtysh.c
zebra/interface.c
zebra/irdp_interface.c
zebra/rt_netlink.c
zebra/rtadv.c
zebra/test_main.c
zebra/zebra_routemap.c
zebra/zebra_vty.c

8 years agovtysh: fix build failure in vtysh_writeconfig_integrated()
Daniel Walton [Thu, 13 Oct 2016 13:48:02 +0000 (13:48 +0000)]
vtysh: fix build failure in vtysh_writeconfig_integrated()

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix signed / unsigned build error
Daniel Walton [Thu, 13 Oct 2016 13:43:12 +0000 (13:43 +0000)]
zebra: Fix signed / unsigned build error

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospf6d: fix a few vty help strings
Renato Westphal [Thu, 13 Oct 2016 00:20:16 +0000 (21:20 -0300)]
ospf6d: fix a few vty help strings

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years ago*: rename all instances of OSPFv6 to OSPF6 or OSPFv3
Renato Westphal [Thu, 13 Oct 2016 00:20:15 +0000 (21:20 -0300)]
*: rename all instances of OSPFv6 to OSPF6 or OSPFv3

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agolib/vtysh: fix duplicate installation of some vty commands
Renato Westphal [Wed, 12 Oct 2016 15:39:02 +0000 (12:39 -0300)]
lib/vtysh: fix duplicate installation of some vty commands

This is a followup to commits 735e62 and 0b1442, where we forgot to apply
the same VIEW/ENABLE consolidation logic to vtysh. Also, we can't call
install_default() for the ENABLE node because some of the vty commands
installed by this function were already installed in the VIEW node before.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agovtysh: infer integrated config usage from existence of Quagga.conf
Christian Franke [Mon, 26 Sep 2016 20:01:37 +0000 (22:01 +0200)]
vtysh: infer integrated config usage from existence of Quagga.conf

Only write to integrated config if integrated config is configured
explicitly or it is already in use.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agovtysh: Add missing stomps
Quentin Young [Wed, 12 Oct 2016 04:21:18 +0000 (04:21 +0000)]
vtysh: Add missing stomps

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agovtysh: Update extract.pl.in
Quentin Young [Wed, 12 Oct 2016 01:44:50 +0000 (01:44 +0000)]
vtysh: Update extract.pl.in

CLI stomps updated. Need to be eliminated.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgp: Fix bi->extra->tag if statement
Donald Sharp [Tue, 11 Oct 2016 12:47:32 +0000 (08:47 -0400)]
bgp: Fix bi->extra->tag if statement

bi->extra->tag is a 3 byte array, the statement
as written will always be true.  Modify code
to see if we actually have any data in the
tag and then print the label.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Lou Berger <lberger@labn.net>
8 years agobgpd: Fix peer->weight usage
Donald Sharp [Tue, 11 Oct 2016 12:24:03 +0000 (08:24 -0400)]
bgpd: Fix peer->weight usage

When setting the weight make sure to use the
correct afi safi to get what we need.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Lou Berger <lberger@labn.net>
8 years agozebra: Fix signed / unsigned comparisons
Donald Sharp [Tue, 11 Oct 2016 12:21:41 +0000 (08:21 -0400)]
zebra: Fix signed / unsigned comparisons

clang is complaining about signed/unsigned comparisons
for rta_addattr_l.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agorfapi: cleanup some warnings
Lou Berger [Thu, 6 Oct 2016 00:44:57 +0000 (20:44 -0400)]
rfapi: cleanup some warnings

8 years agobgpd/rfp: fix remaining index_sub uses
David Lamparter [Tue, 11 Oct 2016 11:37:26 +0000 (13:37 +0200)]
bgpd/rfp: fix remaining index_sub uses

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: remove accidentally-added configure outputs
David Lamparter [Tue, 11 Oct 2016 11:08:10 +0000 (13:08 +0200)]
build: remove accidentally-added configure outputs

these files do not belong in the git tree.  (They're temporaries during
a ./configure run and normally removed at the end;  let's add them to
.gitignore anyway.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospfd: Fix arm compile issue
Donald Sharp [Mon, 10 Oct 2016 23:35:43 +0000 (19:35 -0400)]
ospfd: Fix arm compile issue

size_t printf formatter is %zd!

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: 'neighbor x.x.x.x weight' should be per address-family
Daniel Walton [Mon, 10 Oct 2016 14:53:34 +0000 (07:53 -0700)]
bgpd: 'neighbor x.x.x.x weight' should be per address-family

Ticket: CM-13053
Reviewed By: dslice@cumulusnetworks.com

'neighbor x.x.x.x weight' was implemented as a per-peer knob instead of
a per-peer per-afi-safi option. This makes it configurable per-peer
per-afi-safi so that we can do things like soft clear that afi/safi when
weight is modified.

8 years agobgpd: Fix changes caused by index_sub change.
Donald Sharp [Sat, 8 Oct 2016 20:37:48 +0000 (16:37 -0400)]
bgpd: Fix changes caused by index_sub change.

The qobj changes changed how index_sub was handled.

This commit leaves some issues still.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: Consolidate all double VIEW_NODE and ENABLE_NODE's
Donald Sharp [Fri, 11 Mar 2016 19:27:13 +0000 (14:27 -0500)]
*: Consolidate all double VIEW_NODE and ENABLE_NODE's

If a command is put into the VIEW_NODE, it is going into the
ENABLE_NODE as well.  This is especially true for show commands.
As such if a command is in both consolidate it down to VIEW_NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Consolidate VIEW_NODE to be ENABLE_NODE as well
Donald Sharp [Fri, 11 Mar 2016 19:27:12 +0000 (14:27 -0500)]
lib: Consolidate VIEW_NODE to be ENABLE_NODE as well

If you are in VIEW_NODE, the command should exist in ENABLE_NODE
as well.  This is being done to reduce chances of code being
added to one but not the other NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd, lib: Remove RESTRICTED_NODE from code base
Donald Sharp [Fri, 11 Mar 2016 19:27:11 +0000 (14:27 -0500)]
bgpd, lib: Remove RESTRICTED_NODE from code base

The RESTRICTED_NODE command is not used, introduces code
complexity and provides no additional levels of security.

The only way to get into RESTRICTED_NODE is to add, under
vty configuration the command 'anonymous restricted', and
then telnet to a daemon, provide a password, then type
'enable' and fail to enter the password three times.
Then the user can enter a very limited set of commands to
monitor bgp and only bgp behavior.

This commit removes both the RESTRICTED_NODE usage as well
as the lib/* usage of the code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoripngd: add support for route tags
Christian Franke [Sat, 1 Oct 2016 20:35:32 +0000 (22:35 +0200)]
ripngd: add support for route tags

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoripd: add support for route tags
Christian Franke [Sat, 1 Oct 2016 19:43:17 +0000 (21:43 +0200)]
ripd: add support for route tags

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoospf6d: add support for route tags
Christian Franke [Sat, 1 Oct 2016 04:41:40 +0000 (06:41 +0200)]
ospf6d: add support for route tags

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years ago*: Consistently support 32-bit route tags
Christian Franke [Sat, 1 Oct 2016 18:42:34 +0000 (20:42 +0200)]
*: Consistently support 32-bit route tags

This patch improves zebra,ripd,ripngd,ospfd and bgpd so that they can
make use of 32-bit route tags in the case of zebra,ospf,bgp or 16-bit
route-tags in the case of ripd,ripngd.

It is based on the following patch:

    commit d25764028829a3a30cdbabe85f32408a63cccadf
    Author: Paul Jakma <paul.jakma@hpe.com>
    Date:   Fri Jul 1 14:23:45 2016 +0100

    *: Widen width of Zserv routing tag field.

But also contains the changes which make this actually useful for all
the daemons.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoospfd: Update route in zebra when tag changes
Christian Franke [Sat, 1 Oct 2016 02:06:03 +0000 (04:06 +0200)]
ospfd: Update route in zebra when tag changes

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agozebra: Fix some warnings found during compile.
Donald Sharp [Tue, 22 Dec 2015 20:24:25 +0000 (15:24 -0500)]
zebra: Fix some warnings found during compile.

This commit fixes some warnings found in Martin's Testbed
that compiles sun solaris and freebsd images.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Remove `show commandtree`, add `list permutations`
Quentin Young [Fri, 7 Oct 2016 21:44:10 +0000 (21:44 +0000)]
lib: Remove `show commandtree`, add `list permutations`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add naive deduplication checks when installing commands
Quentin Young [Fri, 7 Oct 2016 18:41:41 +0000 (18:41 +0000)]
lib: Add naive deduplication checks when installing commands

Since not all duplicate commands can be caught during graph
construction, do a linear search over all commands before
installing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Improve formatting for matcher tracing output
Quentin Young [Fri, 7 Oct 2016 18:40:37 +0000 (18:40 +0000)]
lib: Improve formatting for matcher tracing output

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agotools: Pretty print graph after input permutations
Quentin Young [Fri, 7 Oct 2016 18:39:24 +0000 (18:39 +0000)]
tools: Pretty print graph after input permutations

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Remove unknown protocol.
Donald Sharp [Fri, 7 Oct 2016 16:35:06 +0000 (12:35 -0400)]
lib: Remove unknown protocol.

What is MASC anyways?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix ordering issue in protocol names
Donald Sharp [Fri, 7 Oct 2016 16:20:33 +0000 (12:20 -0400)]
lib: Fix ordering issue in protocol names

The protocol names and enum must be kept
in the same order.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: remove the "exit" at the end of "router bgp"
Daniel Walton [Fri, 7 Oct 2016 14:13:26 +0000 (14:13 +0000)]
bgpd: remove the "exit" at the end of "router bgp"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: use qobj and enable concurrent config edits
David Lamparter [Fri, 30 Sep 2016 13:38:03 +0000 (15:38 +0200)]
zebra: use qobj and enable concurrent config edits

This puts all the proper VTY_DECLVAR_CONTEXT calls in place, removing
all vty->index uses in the process.  With that, vty_config_lockless can
be enabled in zebra.

[v2: fix ordering screw-up in "interface XXX" command]

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: replace global vars w/ qobj for vty context
Renato Westphal [Thu, 29 Sep 2016 17:16:50 +0000 (14:16 -0300)]
ldpd: replace global vars w/ qobj for vty context

ldpd was keeping track of the vty session's position in config editing
with 3 global static variables.  This worked because only one vty could
be in configuration-editing mode before.

Replace with vty->qobj_index infrastructure and enable
vty_config_lockless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: qobj: register everything
Renato Westphal [Wed, 22 Jun 2016 12:59:28 +0000 (09:59 -0300)]
ldpd: qobj: register everything

Place the appropriate QOBJ_* calls.  A bit more complicated for ldpd due
to the dup-merge config scheme.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: add in-process API for creating/deleting
Renato Westphal [Wed, 22 Jun 2016 12:59:28 +0000 (09:59 -0300)]
ldpd: add in-process API for creating/deleting

These functions are currently unused but will be used by the Cap'n Proto
interface.  They're not a particular burden to maintain in-tree, so here
they go.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: merge/dup/reload void **ref support
Renato Westphal [Wed, 22 Jun 2016 12:59:28 +0000 (09:59 -0300)]
ldpd: merge/dup/reload void **ref support

Extend configuration duplication-merge mechanism to allow keeping track
of a single specific object.  A "void **" pointer is passed in; the
"void *" pointer it points to is updated with the new address of the
object it points to.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoldpd: reset interface configuration when it's disabled
Renato Westphal [Thu, 29 Sep 2016 17:52:32 +0000 (14:52 -0300)]
ldpd: reset interface configuration when it's disabled

This is necessary to prevent the same old configuration to come back
when the interface is reactivated later for a given address-family.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agolib, isisd: enable concurrent configuration editing
David Lamparter [Tue, 27 Sep 2016 14:53:25 +0000 (16:53 +0200)]
lib, isisd: enable concurrent configuration editing

Finally, this disables the config editing lock for isisd.  It also
enables deprecation warnings for the lib/ and isisd/ to catch accidental
uses of vty->index.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: use qobj for vty->index context position
David Lamparter [Mon, 26 Sep 2016 16:36:13 +0000 (18:36 +0200)]
isisd: use qobj for vty->index context position

This converts all uses of vty->index over to qobj.  With this, isisd now
supports concurrent configuration editing as there are no more unsafe
references held anywhere while in config-edit mode.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: replace vty->index_sub with qobj
David Lamparter [Tue, 27 Sep 2016 14:51:58 +0000 (16:51 +0200)]
lib: replace vty->index_sub with qobj

The keychain code is the only user of vty->index_sub;  this is also
replaced with a qobj safe-pointer.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: use qobj for vty->index context position
David Lamparter [Mon, 26 Sep 2016 18:17:12 +0000 (20:17 +0200)]
lib: use qobj for vty->index context position

Prepares the library CLI functions for concurrent config access.  Note
the vty->index pointer is still kept functional for the daemons to use.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: vty: add infrastructure for qobj ID "index"
David Lamparter [Mon, 26 Sep 2016 16:36:49 +0000 (18:36 +0200)]
lib: vty: add infrastructure for qobj ID "index"

As mentioned in previous commits, this prepares to replace the vty's
"void *index" context position with a safe qobj pointer.  This will
allow concurrent configuration editing by multiple users, as soon as no
more code (library included) in the daemon uses vty->index anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoisisd: qobj: register everything
David Lamparter [Tue, 5 Apr 2016 21:54:53 +0000 (18:54 -0300)]
isisd: qobj: register everything

Wire up all neccessary isisd first-class objects to be able to use qobj
safe-pointers on them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: qobj: register ifaces, routemaps & keychains
David Lamparter [Tue, 27 Sep 2016 12:51:08 +0000 (14:51 +0200)]
lib: qobj: register ifaces, routemaps & keychains

This places the appropriate calls so library objects can be used with
qobj "pointers", especially in the CLI.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: add "qobj" object-ID infrastructure
David Lamparter [Mon, 26 Sep 2016 15:30:30 +0000 (17:30 +0200)]
lib: add "qobj" object-ID infrastructure

This adds 64-bit random identifiers as "safe pointers" which are also
type-tracked / can have type-specific extension methods.

This will be used by both the CLI (to keep safe references while in
config editing mode) as well as the Cap'n Proto code (to hand out
pointers to the user in a safe way and add per-type handlers)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: Fix `show running-config` and `write terminal`
Quentin Young [Fri, 7 Oct 2016 02:33:37 +0000 (02:33 +0000)]
lib: Fix `show running-config` and `write terminal`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoall: removed all DEFUN command stomps (fix build errors)
Daniel Walton [Thu, 6 Oct 2016 20:23:13 +0000 (20:23 +0000)]
all: removed all DEFUN command stomps (fix build errors)

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoall: removed all DEFUN command stomps
Daniel Walton [Thu, 6 Oct 2016 19:56:13 +0000 (19:56 +0000)]
all: removed all DEFUN command stomps

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Log invalid/unknown commands to log file
Quentin Young [Thu, 6 Oct 2016 18:39:31 +0000 (18:39 +0000)]
lib: Log invalid/unknown commands to log file

Ticket: CM-6855

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agovtysh: extract.pl <0-255> to (0-255) changes
Daniel Walton [Thu, 6 Oct 2016 13:51:52 +0000 (13:51 +0000)]
vtysh: extract.pl <0-255> to (0-255) changes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agobgpd: 'Last write' does not update when we TX a keepalive
Daniel Walton [Thu, 6 Oct 2016 13:20:02 +0000 (13:20 +0000)]
bgpd: 'Last write' does not update when we TX a keepalive

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-5518

8 years agozebra: Fix static route helper function
Quentin Young [Thu, 6 Oct 2016 04:08:34 +0000 (04:08 +0000)]
zebra: Fix static route helper function

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Make <cr> appear first in completions
Quentin Young [Thu, 6 Oct 2016 01:15:48 +0000 (01:15 +0000)]
lib: Make <cr> appear first in completions

When a command is complete and <cr> appears in tab- or
?-completions, make sure it appears first

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Check match level when calculating completions
Quentin Young [Thu, 6 Oct 2016 00:03:39 +0000 (00:03 +0000)]
lib: Check match level when calculating completions

Adds a missing check that resulted in partial token
matches being accepted as exact matches when calculating
input completions.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add tracing capabilities to command matcher
Quentin Young [Wed, 5 Oct 2016 23:56:17 +0000 (23:56 +0000)]
lib: Add tracing capabilities to command matcher

Compile with -DTRACE_MATCHER to enable matcher
debugging to stdout.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Invalid commands are errors, fix msg formatting
Quentin Young [Wed, 5 Oct 2016 23:50:49 +0000 (23:50 +0000)]
lib: Invalid commands are errors, fix msg formatting

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: Fix typo in zebra command desc
Quentin Young [Wed, 5 Oct 2016 23:02:57 +0000 (23:02 +0000)]
zebra: Fix typo in zebra command desc

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Allow / and . to match VARIABLE_TKN, fix range matches
Quentin Young [Tue, 4 Oct 2016 20:56:30 +0000 (20:56 +0000)]
lib: Allow / and . to match VARIABLE_TKN, fix range matches

Range matching function was returning 0 instead of no_match
on failed match, causing all input to match ranges.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add logging for invalid commands
Quentin Young [Tue, 4 Oct 2016 20:41:52 +0000 (20:41 +0000)]
lib: Add logging for invalid commands

Ticket: CM-6855

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoall: Fix various syntax errors
Quentin Young [Tue, 4 Oct 2016 19:21:45 +0000 (19:21 +0000)]
all: Fix various syntax errors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: fix password and enable password syntax
Quentin Young [Tue, 4 Oct 2016 18:47:17 +0000 (18:47 +0000)]
lib: fix password and enable password syntax

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd, ospf6d, ripd: Fix miscellaneous syntax errors
Quentin Young [Tue, 4 Oct 2016 01:13:44 +0000 (01:13 +0000)]
ospfd, ospf6d, ripd: Fix miscellaneous syntax errors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix off-by-one in `clear [ip] bgp...`
Quentin Young [Tue, 4 Oct 2016 00:22:15 +0000 (00:22 +0000)]
bgpd: Fix off-by-one in `clear [ip] bgp...`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Clean up completions code, fix segfault on no match
Quentin Young [Mon, 3 Oct 2016 23:21:11 +0000 (23:21 +0000)]
lib: Clean up completions code, fix segfault on no match

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix crash in vnc_import_bgp_add_route
Donald Sharp [Sun, 2 Oct 2016 22:33:32 +0000 (18:33 -0400)]
bgpd: Fix crash in vnc_import_bgp_add_route

The ordering to check for NULL pointer was
reversed in this function.

I switched the order after examing a couple other
functions to see that they have the 'correct' order.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agosome rfapi compile fixes
Daniel Walton [Wed, 5 Oct 2016 20:54:55 +0000 (20:54 +0000)]
some rfapi compile fixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agozebra: Fix wrong afi used in zebra_static.c
Donald Sharp [Wed, 5 Oct 2016 14:58:43 +0000 (10:58 -0400)]
zebra: Fix wrong afi used in zebra_static.c

When calling a route uninstall in zebra_static.c use the
afi passed in and don't hardcode AFI_IP

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agodebian: Disable build of vnc currently
Donald Sharp [Mon, 3 Oct 2016 12:19:06 +0000 (08:19 -0400)]
debian: Disable build of vnc currently

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovnc: look for librfp.a in builddir
Lou Berger [Thu, 29 Sep 2016 13:03:31 +0000 (09:03 -0400)]
vnc: look for librfp.a in builddir

8 years agovnc: default to enabled
Lou Berger [Wed, 28 Sep 2016 22:16:25 +0000 (18:16 -0400)]
vnc: default to enabled

8 years agovnc: use directories in includes (request from Martin W.)
Lou Berger [Wed, 28 Sep 2016 22:03:43 +0000 (18:03 -0400)]
vnc: use directories in includes (request from Martin W.)

8 years agobgpd: add L3/L2VPN Virtual Network Control feature
Lou Berger [Sat, 7 May 2016 18:18:56 +0000 (14:18 -0400)]
bgpd: add L3/L2VPN Virtual Network Control feature

This feature adds an L3 & L2 VPN application that makes use of the VPN
and Encap SAFIs.  This code is currently used to support IETF NVO3 style
operation.  In NVO3 terminology it provides the Network Virtualization
Authority (NVA) and the ability to import/export IP prefixes and MAC
addresses from Network Virtualization Edges (NVEs).  The code supports
per-NVE tables.

The NVE-NVA protocol used to communicate routing and Ethernet / Layer 2
(L2) forwarding information between NVAs and NVEs is referred to as the
Remote Forwarder Protocol (RFP). OpenFlow is an example RFP.  For
general background on NVO3 and RFP concepts see [1].  For information on
Openflow see [2].

RFPs are integrated with BGP via the RF API contained in the new "rfapi"
BGP sub-directory.  Currently, only a simple example RFP is included in
Quagga. Developers may use this example as a starting point to integrate
Quagga with an RFP of their choosing, e.g., OpenFlow.  The RFAPI code
also supports the ability import/export of routing information between
VNC and customer edge routers (CEs) operating within a virtual
network. Import/export may take place between BGP views or to the
default zebera VRF.

BGP, with IP VPNs and Tunnel Encapsulation, is used to distribute VPN
information between NVAs. BGP based IP VPN support is defined in
RFC4364, BGP/MPLS IP Virtual Private Networks (VPNs), and RFC4659,
BGP-MPLS IP Virtual Private Network (VPN) Extension for IPv6 VPN . Use
of both the Encapsulation Subsequent Address Family Identifier (SAFI)
and the Tunnel Encapsulation Attribute, RFC5512, The BGP Encapsulation
Subsequent Address Family Identifier (SAFI) and the BGP Tunnel
Encapsulation Attribute, are supported. MAC address distribution does
not follow any standard BGB encoding, although it was inspired by the
early IETF EVPN concepts.

The feature is conditionally compiled and disabled by default.
Use the --enable-bgp-vnc configure option to enable.

The majority of this code was authored by G. Paul Ziemba
<paulz@labn.net>.

[1] http://tools.ietf.org/html/draft-ietf-nvo3-nve-nva-cp-req
[2] https://www.opennetworking.org/sdn-resources/technical-library

Now includes changes needed to merge with cmaster-next.

8 years agotools: add copyright header & usage to permutations
Quentin Young [Sun, 2 Oct 2016 19:30:08 +0000 (19:30 +0000)]
tools: add copyright header & usage to permutations

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: allow nesting selectors
Quentin Young [Sun, 2 Oct 2016 19:14:40 +0000 (19:14 +0000)]
lib: allow nesting selectors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agotools: add command permutations generator
Quentin Young [Sun, 2 Oct 2016 19:13:59 +0000 (19:13 +0000)]
tools: add command permutations generator

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: explicitly support the case of empty input for completions
Quentin Young [Sun, 2 Oct 2016 04:47:31 +0000 (04:47 +0000)]
lib: explicitly support the case of empty input for completions

When the user tab- or ?-completes when the character prior to
the position of the cursor is a space, completion logic is
passed null. Explicitly handle this case instead of using
partly_match, which has special logic associated with it to
allow abbreviating certain tokens.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Null-terminate tab completions char*[]
Quentin Young [Sun, 2 Oct 2016 03:27:58 +0000 (03:27 +0000)]
lib: Null-terminate tab completions char*[]

vtysh expects the result of a tab completion to
have a null pointer as the last element

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix command execution npe
Quentin Young [Sat, 1 Oct 2016 20:05:10 +0000 (20:05 +0000)]
lib: Fix command execution npe

Caller may pass NULL if it does not care about what
command was matched.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: fix << in command strings
Daniel Walton [Sat, 1 Oct 2016 05:45:58 +0000 (05:45 +0000)]
bgpd: fix << in command strings

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoall: fix sundry syntax errors
Quentin Young [Sat, 1 Oct 2016 04:20:30 +0000 (04:20 +0000)]
all: fix sundry syntax errors

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix '?'-completion dereferences in vtysh
Quentin Young [Sat, 1 Oct 2016 01:03:24 +0000 (01:03 +0000)]
lib: Fix '?'-completion dereferences in vtysh

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: fix double free in parser
Quentin Young [Fri, 30 Sep 2016 23:16:29 +0000 (23:16 +0000)]
lib: fix double free in parser

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib, vtysh: refactor vtysh.c, allow parser continuance
Quentin Young [Fri, 30 Sep 2016 23:03:05 +0000 (23:03 +0000)]
lib, vtysh: refactor vtysh.c, allow parser continuance

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: initialize cmd_vector and add a root node to graph
Quentin Young [Fri, 30 Sep 2016 19:33:11 +0000 (19:33 +0000)]
lib: initialize cmd_vector and add a root node to graph

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: add skiplist
Lou Berger [Tue, 19 Apr 2016 20:00:37 +0000 (16:00 -0400)]
lib: add skiplist

8 years agobgpd: drop machineparse / random "show" improvements
Lou Berger [Tue, 12 Jan 2016 18:42:08 +0000 (13:42 -0500)]
bgpd: drop machineparse / random "show" improvements

Signed-off-by: Lou Berger <lberger@labn.net>
Fix up a few changed missed in previous merge

8 years agobgp debug: restore printing of memstats on exit, now prints if any debug flag set
Lou Berger [Sat, 24 Sep 2016 13:09:36 +0000 (09:09 -0400)]
bgp debug: restore printing of memstats on exit, now prints if any debug flag set

8 years agobgpd: remove old/duplicate, and now out of order prefixlen test
Lou Berger [Tue, 27 Sep 2016 11:54:56 +0000 (07:54 -0400)]
bgpd: remove old/duplicate, and now out of order prefixlen test

8 years agomemory: restore 'memstats:' keyword when logging memstats - useful in log
Lou Berger [Sat, 24 Sep 2016 13:18:23 +0000 (09:18 -0400)]
memory: restore 'memstats:' keyword when logging memstats - useful in log

8 years agolog.h: restore vzlog extern
Lou Berger [Fri, 23 Sep 2016 17:40:19 +0000 (13:40 -0400)]
log.h: restore vzlog extern

8 years agolib: add route_table_get_default_delegate
Lou Berger [Tue, 19 Apr 2016 20:06:35 +0000 (16:06 -0400)]
lib: add route_table_get_default_delegate

8 years agobgpd: eliminate RD related duplicate code in bgp_encap.c
Lou Berger [Thu, 16 Jun 2016 14:16:52 +0000 (10:16 -0400)]
bgpd: eliminate RD related duplicate code in bgp_encap.c
      decode_rd_... apis are declared global in bgp_mplsvpn.c

8 years agozebra: support FIB override routes
Timo Teräs [Fri, 15 Jan 2016 15:36:31 +0000 (17:36 +0200)]
zebra: support FIB override routes

FIB override routes are for routing protocols that establish
shortcut routes, or establish point-to-point routes that should
not be redistributed. Namely this is useful NHRP daemon to come.

Zebra is extended to select two entries from RIB the "best" entry
from routing protocols, and the FIB entry to install to kernel.
FIB override routes are never selected as best entry, and thus
are never adverticed to other routing daemons. The best FIB
override, or if it does not exist the otherwise best RIB is
selected as FIB entry to be installed.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[CF: Massage to fit cumulus tree]
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agovtysh: fixed compile errors
Daniel Walton [Fri, 30 Sep 2016 16:10:28 +0000 (16:10 +0000)]
vtysh: fixed compile errors

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoospfd: added some missing <>s
Daniel Walton [Fri, 30 Sep 2016 16:05:55 +0000 (16:05 +0000)]
ospfd: added some missing <>s

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoall: added some missing <>s within []s
Daniel Walton [Fri, 30 Sep 2016 15:31:48 +0000 (15:31 +0000)]
all: added some missing <>s within []s

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoospfd: resolve argc CHECK MEs in ospf_vty.c
root [Fri, 30 Sep 2016 15:16:19 +0000 (11:16 -0400)]
ospfd: resolve argc CHECK MEs in ospf_vty.c

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>