]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years agoripngd: argv update
Daniel Walton [Thu, 22 Sep 2016 23:51:23 +0000 (23:51 +0000)]
ripngd: argv update

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: argv update for routemap.c
Quentin Young [Thu, 22 Sep 2016 22:53:09 +0000 (22:53 +0000)]
lib: argv update for routemap.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: argv update for if.c
Quentin Young [Thu, 22 Sep 2016 21:40:28 +0000 (21:40 +0000)]
lib: argv update for if.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: argv update for thread.c
Quentin Young [Thu, 22 Sep 2016 20:32:34 +0000 (20:32 +0000)]
lib: argv update for thread.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: argv fixes, XFREE -> free, rm decl in matcher
Quentin Young [Thu, 22 Sep 2016 20:26:07 +0000 (20:26 +0000)]
lib: argv fixes, XFREE -> free, rm decl in matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: distribute.c, smux.c, vty.c grammar refactor
Quentin Young [Thu, 22 Sep 2016 20:17:48 +0000 (20:17 +0000)]
lib: distribute.c, smux.c, vty.c grammar refactor

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: argv update for all but zebra_vty.c
Daniel Walton [Thu, 22 Sep 2016 20:00:23 +0000 (20:00 +0000)]
zebra: argv update for all but zebra_vty.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoospfd: argv update for all but ospf_vty.c
Daniel Walton [Thu, 22 Sep 2016 19:15:24 +0000 (19:15 +0000)]
ospfd: argv update for all but ospf_vty.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: Remove last remnants of NUMBER_TKN...again
Quentin Young [Thu, 22 Sep 2016 18:26:11 +0000 (18:26 +0000)]
lib: Remove last remnants of NUMBER_TKN...again

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoRevert "lib: Get thread.c to compile"
Daniel Walton [Thu, 22 Sep 2016 18:23:29 +0000 (18:23 +0000)]
Revert "lib: Get thread.c to compile"

This reverts commit 9c5f6b578e9c8df1186a89cee51c02348beb480a.

8 years agoRevert "lib, zebra: Fixup if.c to work in the new regime"
Daniel Walton [Thu, 22 Sep 2016 18:23:21 +0000 (18:23 +0000)]
Revert "lib, zebra: Fixup if.c to work in the new regime"

This reverts commit 2511cb40e6b0e88620f26b3506b2a454a773c93d.

8 years agoRevert "lib: Fix vty.c to compile with new parser"
Daniel Walton [Thu, 22 Sep 2016 18:23:14 +0000 (18:23 +0000)]
Revert "lib: Fix vty.c to compile with new parser"

This reverts commit c1ad0838e8de8184f6122b13472a60dbca009aa7.

8 years agoRevert "lib: Fixup ns.c"
Daniel Walton [Thu, 22 Sep 2016 18:23:08 +0000 (18:23 +0000)]
Revert "lib: Fixup ns.c"

This reverts commit 5720e4ff9518275b23c28a3107a46d833eb387fa.

8 years agoRevert "lib: Fixup plist.c"
Daniel Walton [Thu, 22 Sep 2016 18:22:59 +0000 (18:22 +0000)]
Revert "lib: Fixup plist.c"

This reverts commit c65a0fe1c664b5438a13aa1d756c121ff2fb7a80.

8 years agoRevert "lib: Fixup more files"
Daniel Walton [Thu, 22 Sep 2016 18:22:50 +0000 (18:22 +0000)]
Revert "lib: Fixup more files"

This reverts commit f68cec764abf50b35945b907a2e005bc50c50831.

8 years agoRevert "zebra: Fixup to use the new parser"
Daniel Walton [Thu, 22 Sep 2016 18:21:59 +0000 (18:21 +0000)]
Revert "zebra: Fixup to use the new parser"

This reverts commit 5c94274ff77b7ba53a27ed68eb4b0bcdafba47b2.

8 years agoRevert "pimd: Convert to the new way of working"
Daniel Walton [Thu, 22 Sep 2016 18:21:49 +0000 (18:21 +0000)]
Revert "pimd: Convert to the new way of working"

This reverts commit 0564b02e432cba04f1245a5df77c2cf2893b51a3.

8 years agoRevert "ripd: Fixup code to work under new way"
Daniel Walton [Thu, 22 Sep 2016 18:21:43 +0000 (18:21 +0000)]
Revert "ripd: Fixup code to work under new way"

This reverts commit 224a3ed809ae23539cd49b85ada8516cb0b0a762.

8 years agoRevert "isisd: Make work under new regime"
Daniel Walton [Thu, 22 Sep 2016 18:21:30 +0000 (18:21 +0000)]
Revert "isisd: Make work under new regime"

This reverts commit 38c249987301aac93bebc0cb7b51784d5827c066.

8 years agobgpd: more bgp_vty.c parser conversion
Daniel Walton [Thu, 22 Sep 2016 18:16:18 +0000 (18:16 +0000)]
bgpd: more bgp_vty.c parser conversion

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agobgpd: argv update for all but bgp_vty.c
Daniel Walton [Thu, 22 Sep 2016 15:15:50 +0000 (15:15 +0000)]
bgpd: argv update for all but bgp_vty.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoAdded argv_translator.py
Daniel Walton [Thu, 22 Sep 2016 14:00:39 +0000 (14:00 +0000)]
Added argv_translator.py

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
To use this run:
../tools/argv_translator.py bgp_route.c

It will update the argv[] instances with the corrent index and adds
'->arg'

8 years agoisisd: Make work under new regime
Donald Sharp [Wed, 21 Sep 2016 03:46:23 +0000 (23:46 -0400)]
isisd: Make work under new regime

8 years agoripd: Fixup code to work under new way
Donald Sharp [Wed, 21 Sep 2016 03:41:24 +0000 (23:41 -0400)]
ripd: Fixup code to work under new way

8 years agopimd: Convert to the new way of working
Donald Sharp [Wed, 21 Sep 2016 03:35:51 +0000 (23:35 -0400)]
pimd: Convert to the new way of working

8 years agozebra: Fixup to use the new parser
Donald Sharp [Wed, 21 Sep 2016 03:29:43 +0000 (23:29 -0400)]
zebra: Fixup to use the new parser

8 years agolib: Fixup json code to use struct cmd_token
Donald Sharp [Wed, 21 Sep 2016 03:20:02 +0000 (23:20 -0400)]
lib: Fixup json code to use struct cmd_token

8 years agolib: Fixup more files
Donald Sharp [Wed, 21 Sep 2016 02:26:30 +0000 (22:26 -0400)]
lib: Fixup more files

8 years agoMerge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/quagga...
Quentin Young [Thu, 22 Sep 2016 00:28:16 +0000 (00:28 +0000)]
Merge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into vtysh-grammar

8 years agolib: Remove NUMBER_TKN leftovers
Quentin Young [Thu, 22 Sep 2016 00:27:22 +0000 (00:27 +0000)]
lib: Remove NUMBER_TKN leftovers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Use listnode_add_before for prepending nodes
Quentin Young [Wed, 21 Sep 2016 23:55:39 +0000 (23:55 +0000)]
lib: Use listnode_add_before for prepending nodes

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Update copyright headers
Quentin Young [Wed, 21 Sep 2016 23:55:29 +0000 (23:55 +0000)]
lib: Update copyright headers

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fixup plist.c
Donald Sharp [Wed, 21 Sep 2016 01:58:16 +0000 (21:58 -0400)]
lib: Fixup plist.c

8 years agolib: Fixup ns.c
Donald Sharp [Wed, 21 Sep 2016 01:52:22 +0000 (21:52 -0400)]
lib: Fixup ns.c

8 years agolib: Fix vty.c to compile with new parser
Donald Sharp [Wed, 21 Sep 2016 01:49:32 +0000 (21:49 -0400)]
lib: Fix vty.c to compile with new parser

8 years agolib, zebra: Fixup if.c to work in the new regime
Donald Sharp [Wed, 21 Sep 2016 01:43:46 +0000 (21:43 -0400)]
lib, zebra: Fixup if.c to work in the new regime

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Get thread.c to compile
Donald Sharp [Wed, 21 Sep 2016 01:23:53 +0000 (21:23 -0400)]
lib: Get thread.c to compile

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge remote-tracking branch 'origin/cmaster-next' into vtysh-grammar
Donald Sharp [Wed, 21 Sep 2016 01:17:34 +0000 (21:17 -0400)]
Merge remote-tracking branch 'origin/cmaster-next' into vtysh-grammar

8 years agoMerge branch 'cmaster-next' into vtysh-grammar
Quentin Young [Wed, 21 Sep 2016 22:11:53 +0000 (22:11 +0000)]
Merge branch 'cmaster-next' into vtysh-grammar

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

8 years agobgpd: Additional Show Commands
Lou Berger [Wed, 21 Sep 2016 13:51:30 +0000 (09:51 -0400)]
bgpd: Additional Show Commands

These commands were ported forward from these
commits:
f9b6c39 bgpd: Add back old forms of 'show <afi> <safi>' for compatibility
bf1ae6c bgpd: drop machineparse / random "show" improvements
651b402 bgpd: encap show commands
35c3686 bgpd: VPNv6 show commands
135ca15 bgpd: cleanup vty bgp_node_afi/safi utils

This is the first drop of those commits.  The files have
changed too much and the diffs to extensive to try to do it
in one piece.  Break it up into smaller code chunks.

Original Code:
Signed-off-by: Lou Berger <lberger@labn.net>
Forward Port:
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Add #define str for JavaScript help string
Donald Sharp [Wed, 21 Sep 2016 12:48:04 +0000 (08:48 -0400)]
lib: Add #define str for JavaScript help string

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospfd: Do not print warning on new interface
Donald Sharp [Tue, 20 Sep 2016 07:11:02 +0000 (03:11 -0400)]
ospfd: Do not print warning on new interface

The new TE functions will always print out a warning
that TE has not been configured on an interface.  This
should be a debug not a warn.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Revert --enable-bgp-standalone
Donald Sharp [Tue, 20 Sep 2016 11:57:41 +0000 (07:57 -0400)]
bgpd: Revert --enable-bgp-standalone

Reverts the --enable-bgp-standalone and makes it so that you
need to use --enable-cumulus to get the cumulus behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Initial refactor pass on CLI backend
Quentin Young [Mon, 19 Sep 2016 23:46:51 +0000 (23:46 +0000)]
lib: Initial refactor pass on CLI backend

Shotgun commit:
* Remove shim sources from Makefile.am
* Move new types to command.c / command.h
* Rewrite command.c / command.h
* Refactor shim types to real types in matcher
  and parser
* Initial refactor pass on vty.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agovtysh: work around gcc bug #69981
David Lamparter [Tue, 16 Aug 2016 15:48:44 +0000 (17:48 +0200)]
vtysh: work around gcc bug #69981

The memtypes changes break gcc -O0 build (none of the other optimisation
levels are affected, *any* of -Og, -Os, -O1, etc. make this go away).
Unfortunately, the option supposed to control this doesn't actually work
(-fno-keep-static-const; that not working is the actual gcc bug).

The workaround is to avoid DECLARE_MTYPE statements when their paired
DEFINE_MTYPE isn't linked in.  Thankfully, that's only a problem in a
single place in vtysh where bgp_memory.h gets chain-included.
(vtysh.c -> bgp_vty.h -> bgpd.h -> bgp_memory.h)

So, this just breaks the chain at bgp_vty.h.

No other compiler (clang & icc tested) has exhibited this problem.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: deregister memtypes on exit/unload
David Lamparter [Sun, 20 Mar 2016 09:09:18 +0000 (10:09 +0100)]
lib: deregister memtypes on exit/unload

This is useful for DSO modules in order to get support for unloading
them dynamically.  It also runs on exit, which doesn't matter much.

At some future point, the code could be extended to check that
allocation counts are 0 on unloading a module.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agobuild: goodbye, gawk
David Lamparter [Fri, 29 May 2015 03:16:41 +0000 (05:16 +0200)]
build: goodbye, gawk

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: clean/restore memory debugging functions
David Lamparter [Thu, 11 Feb 2016 16:12:44 +0000 (17:12 +0100)]
lib: clean/restore memory debugging functions

This adapts the dump-at-exit handler and removes the old leftover code.

(Note the text in log_memtype_stderr was actually incorrect as the only
caller in bgpd cleans up configuration before calling it, i.e. any
remaining allocations are missing-cleanup bugs.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs
David Lamparter [Fri, 29 May 2015 03:48:31 +0000 (05:48 +0200)]
*: split & distribute memtypes and stop (re|ab)using lib/ MTYPEs

This is a rather large mechanical commit that splits up the memory types
defined in lib/memtypes.c and distributes them into *_memory.[ch] files
in the individual daemons.

The zebra change is slightly annoying because there is no nice place to
put the #include "zebra_memory.h" statement.

bgpd, ospf6d, isisd and some tests were reusing MTYPEs defined in the
library for its own use.  This is bad practice and would break when the
memtype are made static.

Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[CF: rebased for cmaster-next]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agolib: migrate to new memory-type handling
David Lamparter [Wed, 6 Jan 2016 09:37:22 +0000 (10:37 +0100)]
lib: migrate to new memory-type handling

Move over to the new allocation counting added in the previous commit.

(This commit is mostly mechanical.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
8 years agolib: add new extensible memory-type handling
David Lamparter [Wed, 27 May 2015 01:45:30 +0000 (03:45 +0200)]
lib: add new extensible memory-type handling

This rewrites Quagga's memory per-type allocation counting, without
using a fixed global list of types.  Instead, source files can declare
memory types which get handled through constructor functions called by
the dynamic linker during startup.

Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[DL: v3: forgot "nonnull" attribute on XFREE]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: move memory.[ch] out of the way
David Lamparter [Fri, 29 May 2015 02:32:33 +0000 (04:32 +0200)]
lib: move memory.[ch] out of the way

The following commit will recreate memory.[ch].

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Allow nesting options in selectors
Quentin Young [Sun, 18 Sep 2016 20:32:21 +0000 (20:32 +0000)]
lib: Allow nesting options in selectors

Options may now be nested in selectors as long
as they are not the first token in sequence.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add edge removal to graph data structure
Quentin Young [Sun, 18 Sep 2016 20:31:20 +0000 (20:31 +0000)]
lib: Add edge removal to graph data structure

Ability to remove directed edge between two nodes.
Also ensures that adjacency vectors have no null entries.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoisisd, lib, vtysh: Allow extract.pl to fully work
Donald Sharp [Sat, 17 Sep 2016 11:25:35 +0000 (07:25 -0400)]
isisd, lib, vtysh: Allow extract.pl to fully work

The regular expression for finding DEFUN/ALIAS in
extract.pl looks for "DEFUN (" or "ALIAS (" if
the *.c file does not have this then it will just
silently ignore the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd, vtysh: Fix isis routemaps
Donald Sharp [Sat, 17 Sep 2016 11:11:19 +0000 (07:11 -0400)]
isisd, vtysh: Fix isis routemaps

Apparently extract.pl requires in it's regular expression
a space after the DEFUN or ALIAS before the opening (
or it completely skips the command.  Brilliant?

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: Remove duplicate "no debug isis lsp-gen"
Donald Sharp [Sat, 17 Sep 2016 02:21:29 +0000 (22:21 -0400)]
isisd: Remove duplicate "no debug isis lsp-gen"

The code for 'no debug isis lsp-gen' is in
isisd.c twice.  No need for this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, bgpd: Remove 'struct fifo' from lib/zebra.h
Donald Sharp [Fri, 8 Jan 2016 12:37:14 +0000 (07:37 -0500)]
lib, bgpd: Remove 'struct fifo' from lib/zebra.h

The 'struct fifo' and it's accompanying #defines do not
belong in lib/zebra.h.  Move them into their own header.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit b0d02889624eaafa0984873dcd78c086418bdf13)

8 years agolib: Remove ZEBRA_INTERFACE_RENAME
Donald Sharp [Sat, 17 Sep 2016 01:07:28 +0000 (21:07 -0400)]
lib: Remove ZEBRA_INTERFACE_RENAME

Api in name only.  No code, so let's remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, ospfd: Remove ospf specific #define from zebra.h
Donald Sharp [Sat, 17 Sep 2016 00:59:35 +0000 (20:59 -0400)]
lib, ospfd: Remove ospf specific #define from zebra.h

zebra.h should not know or care about ospf specific code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix afi mistake
Donald Sharp [Sat, 17 Sep 2016 00:45:35 +0000 (20:45 -0400)]
zebra: Fix afi mistake

When sending the received route in to be added to the rib,
actually use the correct Address family.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Refactor interface statistic calling
Donald Sharp [Sat, 6 Feb 2016 02:17:08 +0000 (21:17 -0500)]
zebra: Refactor interface statistic calling

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, zebra: Remove ZEBRA_IPV[4|6]_IMPORT_NEXTHOP
Donald Sharp [Wed, 14 Sep 2016 23:13:11 +0000 (19:13 -0400)]
lib, zebra: Remove ZEBRA_IPV[4|6]_IMPORT_NEXTHOP

Zebra api that was never used.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 33361d3992c8bff66247b76e5adaf4b0de8217df)

8 years agolib, zebra: Remove unused zserv/zclient calls
Donald Sharp [Wed, 14 Sep 2016 20:04:07 +0000 (16:04 -0400)]
lib, zebra: Remove unused zserv/zclient calls

ZEBRA_IPV4_NEXTHOP_LOOKUP and ZEBRA_IPV6_NEXTHOP_LOOKUP
were never used by any protocol.  Remove dead code

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 22cd6214bf44863bfb5a34b40ab4abba3c5c4574)

8 years agolib: Make zebra messages types a enum
Donald Sharp [Wed, 14 Sep 2016 19:57:31 +0000 (15:57 -0400)]
lib: Make zebra messages types a enum

The #define nature of zebra message types makes
it stupidly difficult to add /remove message
types.  Switch to enum

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 0d63e3c7df981f5b50f27789672f30987911a8cd)

8 years agolib: Add support for selectors inside options
Quentin Young [Wed, 14 Sep 2016 22:04:53 +0000 (22:04 +0000)]
lib: Add support for selectors inside options

Selectors may be nested inside options [<like|so>].
Removed the ability to make multipart options [like|so].

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agozebra: Pass in vrf to rib_match_ipv4_multicast
Donald Sharp [Wed, 14 Sep 2016 19:34:25 +0000 (15:34 -0400)]
zebra: Pass in vrf to rib_match_ipv4_multicast

Pass around the vrf_id to rib_match_ipv4_multicast
so that proper lookup can be maintained.  Not really
needed yet, but future fixing now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix broken rib_match
Donald Sharp [Wed, 14 Sep 2016 19:17:50 +0000 (15:17 -0400)]
zebra: Fix broken rib_match

rib_match is broken because the prefix is being
treated as a char * pointer instead of the
correct data type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 8b5d6c95781b7c55faa957a2d3edf00c1ecb5c5a)

8 years agozebra: Refactor nexthop sending
Donald Sharp [Wed, 14 Sep 2016 12:23:27 +0000 (08:23 -0400)]
zebra: Refactor nexthop sending

When building a stream of nexthop information,
refactor the code that writes it to 1 function.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: Fix memory leak in ipv6_prefix_match
Quentin Young [Tue, 13 Sep 2016 21:22:34 +0000 (21:22 +0000)]
lib: Fix memory leak in ipv6_prefix_match

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoUpdate isis_te.[c,h] to newly RFC7810
Olivier Dugeon [Tue, 14 Jun 2016 13:57:31 +0000 (15:57 +0200)]
Update isis_te.[c,h] to newly RFC7810
  draft-ietf-isis-te-metric-extensions-11 has been published as RFC 7810

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
(cherry picked from commit b2d48d2838ef4813f4c7c7d0ce1d55dc25e3acf1)

8 years agoospfd: Fix malformed link TLV when LP_USE_BW is set
David Lebrun [Tue, 24 May 2016 09:02:43 +0000 (11:02 +0200)]
ospfd: Fix malformed link TLV when LP_USE_BW is set

(cherry picked from commit 6e88e97786e1223e2b59a995ec330c1f49c55b26)

8 years agolib: Fix various memory leaks
Quentin Young [Tue, 13 Sep 2016 19:55:37 +0000 (19:55 +0000)]
lib: Fix various memory leaks

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agodoc: Get isisd.text included properly
Donald Sharp [Tue, 13 Sep 2016 19:43:54 +0000 (15:43 -0400)]
doc: Get isisd.text included properly

When building from a 'make dist' allow
the proper distribution of the new
isisd.texi to build documentation properly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix memory leak in matcher
Quentin Young [Tue, 13 Sep 2016 18:39:56 +0000 (18:39 +0000)]
lib: Fix memory leak in matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Move string completions out of command_match.c
Quentin Young [Tue, 13 Sep 2016 18:33:55 +0000 (18:33 +0000)]
lib: Move string completions out of command_match.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix various matching bugs
Quentin Young [Tue, 13 Sep 2016 01:16:22 +0000 (01:16 +0000)]
lib: Fix various matching bugs

Missed a copy, disambigs forgot to walkback

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Fix tab completions memleak, memory stats corruption
Quentin Young [Fri, 9 Sep 2016 21:58:33 +0000 (21:58 +0000)]
lib: Fix tab completions memleak, memory stats corruption

Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoMerge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into...
Daniel Walton [Fri, 9 Sep 2016 20:25:24 +0000 (20:25 +0000)]
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster-next

8 years agoUnable to remove route-map from quagga
Daniel Walton [Fri, 9 Sep 2016 20:24:31 +0000 (20:24 +0000)]
Unable to remove route-map from quagga

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

pim was missing route-map hooks

8 years agobgpd: Add flag to not change e{u,g}id on startup and run as unprivileged user
Lou Berger [Tue, 6 Sep 2016 14:52:31 +0000 (10:52 -0400)]
bgpd: Add flag to not change e{u,g}id on startup and run as unprivileged user

* bgp_main.c: add -S / --skip_runas flag to not change effective user/group
  on start up.  Enables bgpd to be run by unprivileged user.

8 years agobgpd: Fix startup a bit more
Donald Sharp [Fri, 9 Sep 2016 20:01:27 +0000 (16:01 -0400)]
bgpd: Fix startup a bit more

There were several issues here.  The zprivs_init is being
called *before* the cli is read in to influence the user
we are running as.  This needs to be rectified.  Additionally
we need to move the log creation till after cli arguments
are read.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Reorganize grammar sandbox
Quentin Young [Fri, 9 Sep 2016 19:57:54 +0000 (19:57 +0000)]
lib: Reorganize grammar sandbox

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add testing shim for graph deletion
Quentin Young [Fri, 9 Sep 2016 19:46:36 +0000 (19:46 +0000)]
lib: Add testing shim for graph deletion

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Add nullcheck before graph node deletion
Quentin Young [Fri, 9 Sep 2016 19:45:43 +0000 (19:45 +0000)]
lib: Add nullcheck before graph node deletion

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoospfd: Fix crash with usage of incorrect command
Donald Sharp [Fri, 9 Sep 2016 16:41:35 +0000 (12:41 -0400)]
ospfd: Fix crash with usage of incorrect command

Entering 'show ip ospf interface json' causes ospf
to crash.

Entering 'show ip ospf interface <intf> json' causes
ospf to crash if intf has no neighbors on the otherside

Modify the code to not crash in these cases.

Ticket: CM-12776
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agovrf: add a runtime check before playing with netns
Nicolas Dichtel [Thu, 3 Sep 2015 08:47:43 +0000 (10:47 +0200)]
vrf: add a runtime check before playing with netns

This patch adds a runtime check to determine if netns are available. Some
systems like OpenWRT have the system call setns() but don't have the kernel
option CONFIG_NET_NS enabled.

Reported-by: Christian Franke <chris@opensourcerouting.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Tested-by: Christian Franke <chris@opensourcerouting.org>
(cherry picked from commit 04a3aabf58d95d01c4c8168eeff43cf9d9892eee)

8 years agolib, vtysh: support multiple VRFs by using linux netns
Feng Lu [Thu, 3 Jul 2014 10:24:34 +0000 (18:24 +0800)]
lib, vtysh: support multiple VRFs by using linux netns

We realize VRFs with linux netns by default. The main job is
to associate a VRF with a netns. Currently this is done by
the configuration:

  [no] vrf N netns <netns-name>

This command is also available in vtysh and goes to only
zebra, because presently only zebra supports multiple VRF.

A file descriptor is added to "struct vrf". This is for the
associated netns file. Once the command "vrf N netns NAME"
is executed, the specified file is opened and the file
descriptor is stored in the VRF N. In this way the
association is formed.

In vrf_socket(), we first switch to the specified VRF by
using the stored file descriptor, and then can allocate
a socket which is working in the associated netns.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
(cherry picked from commit 55cfa2f190620f7c711944637659bc208970324d)

8 years agolib: Create ns.c
Donald Sharp [Sun, 4 Sep 2016 00:45:35 +0000 (20:45 -0400)]
lib: Create ns.c

Create the ns.c files from the original vrf.c code
to allow us to create the 'logical-router' command
to work within namespaces.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: assorted parts of 0abf6796c
Christian Franke [Wed, 24 Aug 2016 15:09:14 +0000 (17:09 +0200)]
zebra: assorted parts of 0abf6796c

    Author: Timo Teräs <timo.teras@iki.fi>
    Date:   Fri Jan 15 17:36:29 2016 +0200

        zebra: atomic FIB updates

        This commit updates the kernel API so that route changes are
        atomically updated using change/replaces messages instead
        of first sending a withdraw followed with update.

        Same for zclient updates, changes are sent as single ADD
        instead of DELETE + ADD.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
8 years agozebra: remove unused code from zebra netlink
Christian Franke [Wed, 24 Aug 2016 13:32:00 +0000 (15:32 +0200)]
zebra: remove unused code from zebra netlink

8 years agobgpd: Allow connections with no v4|6 addr's in some conditions
Donald Sharp [Fri, 9 Sep 2016 15:02:54 +0000 (11:02 -0400)]
bgpd: Allow connections with no v4|6 addr's in some conditions

When compiling/running in with --enable-bgp-standalone=yes allow
v4 sessions to be established with no v4 address configured.
Additionally allow v6 connections with no v6 addresses
configured.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Display 'no neighbor 192.168.33.44 activate'
Donald Sharp [Fri, 9 Sep 2016 13:46:28 +0000 (09:46 -0400)]
bgpd: Display 'no neighbor 192.168.33.44 activate'

Since the default for ipv4 unicast is to now assume
that the neighbor is activated, print out the
no neighbor 192.168.33.44 activate
line when it is explicitly turned off.

Ticket: CM-12809
Reported-by: Lou Berger <lberger@labn.net>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by:

8 years agobgpd: Fix standalone to better handle getsockopt failure
Donald Sharp [Fri, 9 Sep 2016 12:48:23 +0000 (08:48 -0400)]
bgpd: Fix standalone to better handle getsockopt failure

When getsockopt(...,SO_BINDTODEVICE,...); fails
assume the bgp instance we are interested is the default
one.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix dangling pointer in matcher
Quentin Young [Thu, 8 Sep 2016 23:53:06 +0000 (23:53 +0000)]
lib: Fix dangling pointer in matcher

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agoquagga: remove refix directory from git status
Donald Sharp [Fri, 19 Aug 2016 18:46:34 +0000 (14:46 -0400)]
quagga: remove refix directory from git status

During one of our build processes we are getting
a refix directory in some places.  Remove these
from files that git considers

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 844cbf5d6cdfc6961e99e1c9ed35b826f3aa7562)

8 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Thu, 8 Sep 2016 23:37:42 +0000 (19:37 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

8 years agobgpd: Allow bgp to work standalone
Donald Sharp [Thu, 8 Sep 2016 22:48:02 +0000 (18:48 -0400)]
bgpd: Allow bgp to work standalone

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix uninitialized pointer segfault
Quentin Young [Thu, 8 Sep 2016 21:07:55 +0000 (21:07 +0000)]
lib: Fix uninitialized pointer segfault

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
8 years agolib: Update grammar sandbox driver
Quentin Young [Thu, 8 Sep 2016 20:27:57 +0000 (20:27 +0000)]
lib: Update grammar sandbox driver

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