]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
8 years agolib: Macroize CLI matcher tracing
Quentin Young [Fri, 2 Dec 2016 18:26:47 +0000 (18:26 +0000)]
lib: Macroize CLI matcher tracing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add back prototypes for lexer helper funcs
Quentin Young [Fri, 2 Dec 2016 18:26:10 +0000 (18:26 +0000)]
lib: Add back prototypes for lexer helper funcs

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: remove misleading copy/del_cmd_element
David Lamparter [Wed, 23 Nov 2016 11:06:34 +0000 (12:06 +0100)]
lib: remove misleading copy/del_cmd_element

struct cmd_element items are static global variables, they are never
allocated, copied or freed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: parser: use reentrant mode on flex & bison
David Lamparter [Wed, 16 Nov 2016 06:03:51 +0000 (15:03 +0900)]
lib: parser: use reentrant mode on flex & bison

This removes remaining global variables from the lexer, pushing the
lexer state into struct parser_ctx too.  At the same time, "cmd_yy" is
used as prefix for all parser & lexer routines.

The result is that (a) there is no collision anymore if a program uses
flex/bison and links libzebra, and (b) the parser is fully encapsulated
and could be called in parallel from multiple threads.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: parser: wrap state in struct parser_ctx
David Lamparter [Wed, 23 Nov 2016 08:02:08 +0000 (09:02 +0100)]
lib: parser: wrap state in struct parser_ctx

This encapsulates all parser state into a new "struct parser_ctx", which
is allocated on stack and passed around as pointer.  The parser no
longer has any global variables with this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: move command_parse_format prototype
David Lamparter [Wed, 23 Nov 2016 07:42:27 +0000 (08:42 +0100)]
lib: move command_parse_format prototype

The function prototype for command_parse_format() is better left in
command.h, so that the bison-generated header file doesn't need to be
included for that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: allow all characters in WORD tokens
David Lamparter [Fri, 18 Nov 2016 10:34:28 +0000 (11:34 +0100)]
lib: allow all characters in WORD tokens

WORD tokens (which are also used for "LINE..." input) should really
accept all characters.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: make DEFUN foobar_cmd symbols static
David Lamparter [Wed, 16 Nov 2016 06:02:04 +0000 (15:02 +0900)]
lib: make DEFUN foobar_cmd symbols static

These are not externally referenced anymore;  this reduces the symbol
count of libzebra by quite a bit.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: make DEFUN installations file-local
David Lamparter [Wed, 16 Nov 2016 06:00:52 +0000 (15:00 +0900)]
*: make DEFUN installations file-local

This moves all install_element calls into the file where the DEFUNs are
located.  This fixes several small related bugs:

- ospf6d wasn't installing a "no interface FOO" command
- zebra had a useless copy of "interface FOO"
- pimd's copy of "interface FOO" was not setting qobj_index, which means
  "description LINE" commands would fail with an error

The next commit will do the actual act of making "foo_cmd" static.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge branch 'stable/2.0'
David Lamparter [Thu, 1 Dec 2016 16:24:03 +0000 (17:24 +0100)]
Merge branch 'stable/2.0'

8 years agolib: replace MIT license with ISC
David Lamparter [Thu, 1 Dec 2016 16:18:57 +0000 (17:18 +0100)]
lib: replace MIT license with ISC

Since other parts (e.g. ldpd) use the ISC license, and the ISC license
is just a simplified form of the MIT license, just move things over and
reduce the number of different licenses we have in use here.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: COMMUNITY.md: add git branch diagram
David Lamparter [Thu, 1 Dec 2016 16:16:24 +0000 (17:16 +0100)]
build: COMMUNITY.md: add git branch diagram

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agozebra: check ZEBRA_IFC_REAL on if_up
Christian Franke [Mon, 7 Nov 2016 12:37:25 +0000 (13:37 +0100)]
zebra: check ZEBRA_IFC_REAL on if_up

Only connected routes which have ZEBRA_IFC_REAL set should
be redistributed.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: fix invalid memory access in peer_free()
Renato Westphal [Mon, 28 Nov 2016 18:47:13 +0000 (16:47 -0200)]
bgpd: fix invalid memory access in peer_free()

We shoult not call bgp_unlock() before calling
bgp_delete_connected_nexthop() in the peer_free() function. Otherwise,
if bgp->lock reaches zero, bgp_free() is called and peer->bgp becomes
an invalid pointer in the bgp_delete_connected_nexthop() function.

To fix this, move the call to bgp_unlock() to the end of peer_free().

Bug exposed by commit 37d361e ("bgpd: plug several memleaks").

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: Fix crashes when no default bgp instance is configured.
Donald Sharp [Thu, 1 Dec 2016 14:11:12 +0000 (09:11 -0500)]
bgpd: Fix crashes when no default bgp instance is configured.

The vnc code assumes that bgp must have a default instance.
This code change checks to make sure that we do before
proceeding.  It makes no assurances that vnc will behave
correctly without a default instance.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agopimd: Fix large integer display of drpriority
Donald Sharp [Wed, 30 Nov 2016 13:23:12 +0000 (08:23 -0500)]
pimd: Fix large integer display of drpriority

When displaying drpriority you can enter unsigned
integer values from 1-2^32.  The display was
turning the unsigned value into a signed value
and thus we were displaying the wrong value.

Ticket: CM-13787
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
(cherry picked from commit db17265f1025e3ec578998ad537c33b49ed33cde)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospfd: Fix memory leak when not using json
Donald Sharp [Wed, 30 Nov 2016 13:23:11 +0000 (08:23 -0500)]
ospfd: Fix memory leak when not using json

When doing a show command under ospf, if
not using json we would have a small memory
leak in show_ip_ospf_common.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 50750712b1ac8364e290c67782eaf371025dc59e)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: drop TODO from redhat/quagga.spec.in
David Lamparter [Tue, 29 Nov 2016 19:31:43 +0000 (20:31 +0100)]
build: drop TODO from redhat/quagga.spec.in

Fixes: 955026c8... "build: ditch outdated documents, including HACKING"
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: fix "show ip bgp" column alignment
Daniel Walton [Tue, 29 Nov 2016 17:47:12 +0000 (12:47 -0500)]
bgpd: fix "show ip bgp" column alignment

The "Weight" column is off:

BGP table version is 0, local router ID is 10.1.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, =
multipath,
              i internal, r RIB-failure, S Stale, R Removed
Origin codes: i - IGP, e - EGP, ? - incomplete
   Network          Next Hop            Metric LocPrf Weight Path
*> 4.1.1.2/32       9.9.9.2                  0          32768 ?
*> 4.1.1.4/32       9.9.9.2                  0          32768 ?
Displayed  2 out of 2 total prefixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 65c7395b07e8c592c847d4a1e22fc89ddf448341)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command
Daniel Walton [Tue, 29 Nov 2016 17:47:11 +0000 (12:47 -0500)]
ospfd: "ip ospf bfd" removes the "ip ospf bfd 3 250 250" command

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-13712
(cherry picked from commit 367b138748e894bbfaae36d1cf7c90eafebfebc9)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: use traditional yacc empty statement
David Lamparter [Tue, 29 Nov 2016 13:45:49 +0000 (14:45 +0100)]
lib: use traditional yacc empty statement

%empty was added in bison 2.7.1, which seems to not be available on some
of the BSDs by default.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: fix CLI copypasta mixups
David Lamparter [Tue, 29 Nov 2016 12:59:25 +0000 (13:59 +0100)]
*: fix CLI copypasta mixups

Nice clang catch:  ospfd/ospf_vty.c:6710:1: error: all paths through
this function will call itself [-Werror,-Winfinite-recursion]

(same in vtysh/vtysh.c)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: fix "uninitialized" warnings
David Lamparter [Tue, 29 Nov 2016 12:42:06 +0000 (13:42 +0100)]
*: fix "uninitialized" warnings

reported by clang for:
- cmd_complete_command()
- show_ip_bgp_ipv4()

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: add #include "command.h" where needed
David Lamparter [Tue, 29 Nov 2016 12:34:52 +0000 (13:34 +0100)]
*: add #include "command.h" where needed

Headers using struct cmd_token should directly include command.h so the
struct is actually defined.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd/rfpapi: update for new CLI
David Lamparter [Tue, 29 Nov 2016 12:32:34 +0000 (13:32 +0100)]
bgpd/rfpapi: update for new CLI

May contain bugs/mistakes.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: improve COMMUNITY.md formatting
David Lamparter [Tue, 29 Nov 2016 09:44:17 +0000 (10:44 +0100)]
build: improve COMMUNITY.md formatting

Add a render_md.py helper to convert it to HTML (needs python "markdown"
module installed).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge branch 'stable/2.0'
David Lamparter [Mon, 28 Nov 2016 18:26:28 +0000 (19:26 +0100)]
Merge branch 'stable/2.0'

8 years agobuild: add markdown-ised version of new guidelines
David Lamparter [Mon, 28 Nov 2016 18:25:21 +0000 (19:25 +0100)]
build: add markdown-ised version of new guidelines

This isn't quite done and renders rather badly on markdown_py.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: ditch outdated documents, including HACKING
David Lamparter [Mon, 28 Nov 2016 18:03:10 +0000 (19:03 +0100)]
build: ditch outdated documents, including HACKING

To be re-added with a clean slate.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: bump version to 2.0-rc0
David Lamparter [Mon, 28 Nov 2016 17:58:52 +0000 (18:58 +0100)]
build: bump version to 2.0-rc0

This isn't quite a release candidate yet, but to get things going let's
set this to "2.0-rc0".

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: bump version to 2.0.999 for development
David Lamparter [Mon, 28 Nov 2016 17:55:31 +0000 (18:55 +0100)]
build: bump version to 2.0.999 for development

2.0 will be the release just forked off, so this can be 2.0.999 to flag
it as in-progress tree.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: temporary-catch a SEGV in command completion
David Lamparter [Mon, 28 Nov 2016 17:41:34 +0000 (18:41 +0100)]
lib: temporary-catch a SEGV in command completion

Getting FULL_MATCH with matched[0] == NULL in tests/testcli.  Catch and
print error for now.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agotests: update testcli reference output
David Lamparter [Mon, 28 Nov 2016 17:40:25 +0000 (18:40 +0100)]
tests: update testcli reference output

These are expected changes in CLI behaviour.  There's still a diff of
unexpected changes that need fixing (or are missing features, e.g.
keyword arguments).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agotests: fixup for vtysh-grammar merge
David Lamparter [Mon, 28 Nov 2016 17:32:45 +0000 (18:32 +0100)]
tests: fixup for vtysh-grammar merge

Tests weren't updated for vtysh-grammar yet...
NB: things still fail since some CLI behaviour changed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoxml2cli/ldpd: sync with the latest changes in CLI code
Renato Westphal [Fri, 25 Nov 2016 13:13:15 +0000 (11:13 -0200)]
xml2cli/ldpd: sync with the latest changes in CLI code

* use argv[N]->arg instead of argv[N];
* don't skip over non-variable args anymore;
* convert <>s to ()s and ()s to <>s;

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge commit '34d5ef459140ee7e'
David Lamparter [Mon, 28 Nov 2016 17:10:21 +0000 (18:10 +0100)]
Merge commit '34d5ef459140ee7e'

(some build fixups for vtysh-grammar)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge branch 'vtysh-grammar'
David Lamparter [Mon, 28 Nov 2016 16:56:29 +0000 (17:56 +0100)]
Merge branch 'vtysh-grammar'

Conflicts:
isisd/isisd.c
lib/Makefile.am
lib/thread.c

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: merge-prep lib/command.c (partial revert)
David Lamparter [Mon, 28 Nov 2016 16:51:45 +0000 (17:51 +0100)]
lib: merge-prep lib/command.c (partial revert)

This reverts commit 45ef43000030a5801efc6c158786595c31355335,
for lib/command.c (to make a merge conflict go away).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: pre-remove str.[ch] for merge, move strmatch()
David Lamparter [Mon, 28 Nov 2016 16:46:55 +0000 (17:46 +0100)]
lib: pre-remove str.[ch] for merge, move strmatch()

lib/str.[ch] was removed in cleaning up autoconf deadweight.
best place for strmatch seems to be a #define in zebra.h

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoMerge branch 'cmaster-next-isisd-bpf' into cmaster-next-releng
David Lamparter [Mon, 28 Nov 2016 16:36:04 +0000 (17:36 +0100)]
Merge branch 'cmaster-next-isisd-bpf' into cmaster-next-releng

8 years agoMerge remote-tracking branch 'cmaster-next' into cmaster-next-releng
David Lamparter [Mon, 28 Nov 2016 16:35:08 +0000 (17:35 +0100)]
Merge remote-tracking branch 'cmaster-next' into cmaster-next-releng

8 years agozebra: add missing license headers to two files
Renato Westphal [Mon, 21 Nov 2016 21:24:09 +0000 (19:24 -0200)]
zebra: add missing license headers to two files

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoisisd: fix loss of packets after circuit is brought up
Renato Westphal [Thu, 24 Nov 2016 23:28:03 +0000 (21:28 -0200)]
isisd: fix loss of packets after circuit is brought up

The last parameter of THREAD_TIMER_ON() is the timeout, and we were
using circuit->fd for that. So, when a circuit was brought up, isisd
would miss all received packets on this circuit for quite a few seconds,
slowing down the convergence process.

To fix this, use the same logic we use in isis_receive() to calculate
this timeout.

This bug doesn't happen on Linux, which uses a different method to read
packets from the network.

Fixes the following ANVL tests on FreeBSD: ISIS-17.1, ISIS-18.6 (and
probably others too).

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agolib: Fix nexthop strings to coincide with enum
vivek [Wed, 23 Nov 2016 20:14:07 +0000 (12:14 -0800)]
lib: Fix nexthop strings to coincide with enum

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agovtysh: fix some macro breakage
David Lamparter [Fri, 11 Nov 2016 06:23:02 +0000 (07:23 +0100)]
vtysh: fix some macro breakage

vtysh's extract.pl script doesn't cope with install_element(var, ) where
"var" is not one of the FOO_NODE constants.  Also, the future defun_lex
tool doesn't deal well with preprocessor expansions in the same regard.

This tries simplifying out some of these.  lib/distribute.c needs
further thinking.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agovtysh: initialise readline before binding key
David Lamparter [Sat, 19 Nov 2016 09:42:52 +0000 (10:42 +0100)]
vtysh: initialise readline before binding key

when libreadline initialises itself, it also reads .inputrc, which may
result in keybindings being set up.  This means the builtin help on the
'?' key can be overridden by that.  Consistent availability of '?'
behaviour trumps .inputrc setup here, so let's initialise readline
first before binding that key (which means our keybinding wins).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: remove memtypes.h, put back in .gitignore
David Lamparter [Wed, 23 Nov 2016 07:30:10 +0000 (08:30 +0100)]
build: remove memtypes.h, put back in .gitignore

The file crept back in, better to keep it in .gitignore I guess.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: drop and ignore ylwrap
David Lamparter [Fri, 18 Nov 2016 15:26:01 +0000 (16:26 +0100)]
build: drop and ignore ylwrap

ylwrap is a YACC wrapper that is automatically installed by autoreconf /
bootstrap.sh.  It shouldn't really be kept around in git.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: Fix ambiguous commands for `...attribute-unchanged...`
Quentin Young [Tue, 22 Nov 2016 22:43:39 +0000 (22:43 +0000)]
bgpd: Fix ambiguous commands for `...attribute-unchanged...`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge branch 'cmaster-next' into vtysh-grammar
Quentin Young [Tue, 22 Nov 2016 21:36:54 +0000 (21:36 +0000)]
Merge branch 'cmaster-next' into vtysh-grammar

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
zebra/interface.c

8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Sat, 19 Nov 2016 17:31:41 +0000 (12:31 -0500)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

Conflicts:
debian/changelog
zebra/zebra_rnh.c

8 years agoMerge remote-tracking branch 'cmaster-next' into cmaster-next-releng
David Lamparter [Sat, 19 Nov 2016 10:58:52 +0000 (11:58 +0100)]
Merge remote-tracking branch 'cmaster-next' into cmaster-next-releng

8 years agolib: Fix `ipv6 access-list...` and `ipv6 prefix-list...`
Quentin Young [Fri, 18 Nov 2016 21:27:30 +0000 (21:27 +0000)]
lib: Fix `ipv6 access-list...` and `ipv6 prefix-list...`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix `no ip as-path access-list...`
Quentin Young [Fri, 18 Nov 2016 20:51:40 +0000 (20:51 +0000)]
bgpd: Fix `no ip as-path access-list...`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agovtysh, zebra: Fix link-params to use exit-link-params
Donald Sharp [Fri, 18 Nov 2016 20:42:41 +0000 (15:42 -0500)]
vtysh, zebra: Fix link-params to use exit-link-params

Fix the link-params submode to use the 'exit-link-params'
to indicate we are exiting a submode.

Fixup all the relevant bits.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge remote-tracking branch 'opensourcerouting/cmaster-next-linkpar' into cmaster...
Donald Sharp [Fri, 18 Nov 2016 18:51:33 +0000 (13:51 -0500)]
Merge remote-tracking branch 'opensourcerouting/cmaster-next-linkpar' into cmaster-next

8 years ago*: Fix up licensing to be right
Donald Sharp [Fri, 18 Nov 2016 15:11:46 +0000 (10:11 -0500)]
*: Fix up licensing to be right

These files were submitted by Cumulus but did
not properly setup the licensing of them.
This fixes that issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix incorrect config dumps for `dump bgp...`
Quentin Young [Fri, 18 Nov 2016 00:23:29 +0000 (00:23 +0000)]
bgpd: Fix incorrect config dumps for `dump bgp...`

* Correct dump type was not showing for routes-mrt &
  updates-et
* Could not unconfigure most of them

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix `ip as-path access-list ...` breakage
Quentin Young [Thu, 17 Nov 2016 22:51:32 +0000 (22:51 +0000)]
bgpd: Fix `ip as-path access-list ...` breakage

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: Fix `no ip nht ...` commands
Quentin Young [Thu, 17 Nov 2016 21:54:36 +0000 (21:54 +0000)]
zebra: Fix `no ip nht ...` commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Add missing [ip] qualifiers to a couple BGP commands
Quentin Young [Thu, 17 Nov 2016 21:33:04 +0000 (21:33 +0000)]
bgpd: Add missing [ip] qualifiers to a couple BGP commands

Missed these when I was unifying the `show bgp` and
`show ip bgp` command trees.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib, ospf6d: Change SECONDS_STR to be more generic
Quentin Young [Thu, 17 Nov 2016 20:39:41 +0000 (20:39 +0000)]
lib, ospf6d: Change SECONDS_STR to be more generic

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd, ospf6d: Clean up and unify doc strings
Quentin Young [Thu, 17 Nov 2016 20:19:27 +0000 (20:19 +0000)]
ospfd, ospf6d: Clean up and unify doc strings

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd: Fix typo in retransmit-interval arg parsing
Quentin Young [Thu, 17 Nov 2016 20:18:34 +0000 (20:18 +0000)]
ospfd: Fix typo in retransmit-interval arg parsing

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: 'show ip bgp neighbor json' some keys are in the wrong place
Daniel Walton [Wed, 16 Nov 2016 15:33:35 +0000 (15:33 +0000)]
bgpd: 'show ip bgp neighbor json' some keys are in the wrong place

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Sam Tannous <stannous@cumulusnetworks.com>
Ticket: CM-13511

8 years agobgpd: 'show ip bgp neighbor json' some keys are in the wrong place
Daniel Walton [Wed, 16 Nov 2016 14:25:04 +0000 (14:25 +0000)]
bgpd: 'show ip bgp neighbor json' some keys are in the wrong place

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

connectionsEstablished, etc are no longer under the addressFamilyInfo
keyword, they are now at the top level

8 years agoospfd: Use sane cmd names and organize install_element's
Quentin Young [Wed, 16 Nov 2016 08:09:32 +0000 (08:09 +0000)]
ospfd: Use sane cmd names and organize install_element's

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd: Clean up ospf_vty.c
Quentin Young [Wed, 16 Nov 2016 07:46:49 +0000 (07:46 +0000)]
ospfd: Clean up ospf_vty.c

Refactor a bunch of commands.

* Make hidden configuration items consistent
* Remove duplicate code
* Make unconfig consistent with config

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd: Fix and consolidate ospf cost commands
Quentin Young [Wed, 16 Nov 2016 01:05:39 +0000 (01:05 +0000)]
ospfd: Fix and consolidate ospf cost commands

Also hide deprecated unconfiguration forms.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix nondeterministic command matches in rare cases
Quentin Young [Tue, 15 Nov 2016 22:15:18 +0000 (22:15 +0000)]
lib: Fix nondeterministic command matches in rare cases

When a user erroneously defines two commands which can
match the same input and at least one of the tokens defined
last in the command is a selector or option, the matcher
does not detect an ambiguous match and matches the command
installed first (leftmost in the graph).

Fix is to do a full walkthrough of the follow set when
matching the final token in a command to check that there
is exactly one possible match, and to throw an ambiguity
error otherwise.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoisisd: use BPF on Linux/PF_PACKET
David Lamparter [Mon, 14 Nov 2016 23:26:56 +0000 (08:26 +0900)]
isisd: use BPF on Linux/PF_PACKET

we *really* don't want to receive every single packet (of any protocol
type) coming in on an IS-IS enabled interface.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: replace strlcpy & strlcat with glibc versions
David Lamparter [Tue, 15 Nov 2016 08:15:49 +0000 (17:15 +0900)]
lib: replace strlcpy & strlcat with glibc versions

It seems these two were at some point copied in from rsync; replace with
more recent versions that will hopefully become available in glibc as
well.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: remove LGPL v2.0, add LGPL v2.1
David Lamparter [Tue, 15 Nov 2016 08:19:10 +0000 (17:19 +0900)]
build: remove LGPL v2.0, add LGPL v2.1

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: use ac_configure_args for CONFIG_ARGS
David Lamparter [Tue, 15 Nov 2016 05:05:28 +0000 (14:05 +0900)]
build: use ac_configure_args for CONFIG_ARGS

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: massively remove needless checks
David Lamparter [Tue, 15 Nov 2016 04:37:14 +0000 (13:37 +0900)]
build: massively remove needless checks

Since we have autoconf results from a wide swath of target platforms, we
can go remove checks that have the same result on all systems.

This also removes several "fallback" implementations of functions that,
at some point in the history, weren't available on all target platforms.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: chop down complicated CFLAGS logic
David Lamparter [Tue, 15 Nov 2016 02:18:43 +0000 (11:18 +0900)]
build: chop down complicated CFLAGS logic

Other packages don't have --with-cflags; we don't need it either.  The
user can specify CFLAGS= in the environment or on ./configure and that
would work perfectly fine.  If only it weren't for autoconf being an
idiot and adding its own "-g -O2" ... so we work around that.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd/rfapi: Fix missing files in distribution ("make dist") package
Martin Winter [Mon, 14 Nov 2016 08:21:47 +0000 (00:21 -0800)]
bgpd/rfapi: Fix missing files in distribution ("make dist") package

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: don't use deprecation warning on ICC
David Lamparter [Tue, 15 Nov 2016 05:03:11 +0000 (14:03 +0900)]
build: don't use deprecation warning on ICC

icc doesn't do the pragma warning push/pop thing to selectively disable
the warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agozebra: fix sign warning in SNMP code
David Lamparter [Tue, 15 Nov 2016 04:49:34 +0000 (13:49 +0900)]
zebra: fix sign warning in SNMP code

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: fix -Wmaybe-uninitialized warnings
David Lamparter [Tue, 15 Nov 2016 02:17:50 +0000 (11:17 +0900)]
build: fix -Wmaybe-uninitialized warnings

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: unconditionally try -rdynamic
David Lamparter [Tue, 15 Nov 2016 01:52:09 +0000 (10:52 +0900)]
build: unconditionally try -rdynamic

-rdynamic is needed for useful backtraces and future plugin loading
support.  Try and enable it unconditionally.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospfd: Fix bad index for ospf message-digest-key
Quentin Young [Tue, 15 Nov 2016 01:45:58 +0000 (01:45 +0000)]
ospfd: Fix bad index for ospf message-digest-key

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobuild: fix some minor autoconf & automake breakage
David Lamparter [Thu, 10 Nov 2016 12:14:48 +0000 (13:14 +0100)]
build: fix some minor autoconf & automake breakage

- use AS_HELP_STRING in configure.ac
- don't define HAVE_SETNS twice
- remove unused AM_LDFLAGS
- AC_PROG_RANLIB is automatically called by LT_INIT

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: Fix partial match on <external|internal> for remote-as
Quentin Young [Mon, 14 Nov 2016 19:15:43 +0000 (19:15 +0000)]
bgpd: Fix partial match on <external|internal> for remote-as

Ticket: CM-8545

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Mon, 14 Nov 2016 16:37:47 +0000 (08:37 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agozebra: remove recursively derived static routes correctly
Don Slice [Thu, 10 Nov 2016 23:49:45 +0000 (15:49 -0800)]
zebra: remove recursively derived static routes correctly

Problem reported that in certain configs, when a router is initially
booted and the link is bounced, we can end up with a bogus static route
in the table.  This was due to the assumption in zebra_rnh that a static
route would not be recursively resolved through another static route with
a different next-hop. This fix changes this assumption.  Tested manually
and bgp-min, ospf-min, and vrf-min run with no new failures.

Ticket: CM-13328
Signed-off-by: Don Slice
Reviewed-by: CCR-5338
8 years agoisisd: remove topology generator
David Lamparter [Mon, 14 Nov 2016 02:14:00 +0000 (11:14 +0900)]
isisd: remove topology generator

Licensing is unclear and the tool is a testbed-only half-broken pile of
goo.  Remove.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: fix some licensing SNAFUs
David Lamparter [Mon, 14 Nov 2016 02:07:41 +0000 (11:07 +0900)]
*: fix some licensing SNAFUs

bgpd/bgpd.c had a typo
zebra/zebra_mpls_netlink.c was derived from rt_netlink.c
isisd/include-netbsd/* are not needed (2 constants moved over)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: Rework bgp 'attribute-unchanged' commands
Quentin Young [Sun, 13 Nov 2016 09:37:43 +0000 (09:37 +0000)]
bgpd: Rework bgp 'attribute-unchanged' commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agotools: Remove CLI refactoring tools
Quentin Young [Sat, 12 Nov 2016 09:17:48 +0000 (09:17 +0000)]
tools: Remove CLI refactoring tools

No longer need automatic refactoring tools for CLI backend.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: fix link-params CLI handling
David Lamparter [Sat, 12 Nov 2016 08:43:15 +0000 (17:43 +0900)]
zebra: fix link-params CLI handling

vtysh was breaking in a rather ugly way, and some "no" forms were
missing too.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobgpd: Require `confed` or `missing-as-worst`
Quentin Young [Sat, 12 Nov 2016 05:55:05 +0000 (05:55 +0000)]
bgpd: Require `confed` or `missing-as-worst`

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge branch 'cmaster-next' into vtysh-grammar
Quentin Young [Sat, 12 Nov 2016 05:17:37 +0000 (05:17 +0000)]
Merge branch 'cmaster-next' into vtysh-grammar

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Conflicts:
lib/command.c
lib/vty.c

8 years agolib, vtysh: Fix memory leaks, change cmd_element to const
Quentin Young [Sat, 12 Nov 2016 01:06:32 +0000 (01:06 +0000)]
lib, vtysh: Fix memory leaks, change cmd_element to const

Fix a few memory issues:

* Not freeing tab-completions upon input match failure
* Invalid write when null-terminating tab-completions
* Not freeing argv[] itself in additinon to elements
* Use XFREE() instead of free() as appropriate
* Not freeing final token of an [option] during parsing

Make a few minor changes to CLI internals:

* Improve documentation on matching & completion functions
* Only make one copy of cmd_token's when building argv,
  instead of three
* Don't make a copy of the matching cmd_element

Make one major(ish) change to CLI internals:

* Change all pointers to struct cmd_element to const

Code outside of the core CLI units should never have an
occasion to modify the internal state of the command system.
Doing so could easily amount to having a CLI interface that
changes during runtime, and could conceivably lead to security
issues. Explicitly disallowing this removes any chance of
confusion.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoCumulus: Fixup changelog and version string.
Donald Sharp [Sat, 12 Nov 2016 00:31:05 +0000 (19:31 -0500)]
Cumulus: Fixup changelog and version string.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Allow '-' to match VARIABLE_TKN
Quentin Young [Fri, 11 Nov 2016 20:37:43 +0000 (20:37 +0000)]
lib: Allow '-' to match VARIABLE_TKN

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix `bgp bestpath med ...` commands
Quentin Young [Fri, 11 Nov 2016 20:20:36 +0000 (20:20 +0000)]
bgpd: Fix `bgp bestpath med ...` commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agobgpd: Fix ambiguous command definition
Quentin Young [Fri, 11 Nov 2016 00:46:38 +0000 (00:46 +0000)]
bgpd: Fix ambiguous command definition

* neighbor ... attribute-unchanged

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Update `list [permutations]`
Quentin Young [Thu, 10 Nov 2016 23:30:20 +0000 (23:30 +0000)]
lib: Update `list [permutations]`

Don't show hidden or deprecated commands.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agotools: Update permutations generator for hidden/deprecated
Quentin Young [Thu, 10 Nov 2016 23:21:06 +0000 (23:21 +0000)]
tools: Update permutations generator for hidden/deprecated

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>