]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoExpand #defines in command strings
Daniel Walton [Sun, 25 Sep 2016 14:10:48 +0000 (14:10 +0000)]
Expand #defines in command strings

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agozebra: CHECK ME fixes
Daniel Walton [Sun, 25 Sep 2016 03:00:04 +0000 (03:00 +0000)]
zebra: CHECK ME fixes

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agobgpd: fixed more CHECK MEs in bgp_vty.c
Daniel Walton [Sun, 25 Sep 2016 02:29:38 +0000 (02:29 +0000)]
bgpd: fixed more CHECK MEs in bgp_vty.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agozebra: refactor rtadv.c
Quentin Young [Sun, 25 Sep 2016 02:13:43 +0000 (02:13 +0000)]
zebra: refactor rtadv.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: refactor zserv.c
Quentin Young [Sat, 24 Sep 2016 21:58:50 +0000 (21:58 +0000)]
zebra: refactor zserv.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: fix zebra_routemap.c checkme's
Quentin Young [Sat, 24 Sep 2016 17:42:34 +0000 (17:42 +0000)]
zebra: fix zebra_routemap.c checkme's

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agobgpd: fixed some CHECK MEs
Daniel Walton [Sat, 24 Sep 2016 03:14:42 +0000 (03:14 +0000)]
bgpd: fixed some CHECK MEs

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: added strmatch()
Daniel Walton [Fri, 23 Sep 2016 22:12:11 +0000 (22:12 +0000)]
lib: added strmatch()

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: lib compiles
Quentin Young [Fri, 23 Sep 2016 21:34:33 +0000 (21:34 +0000)]
lib: lib compiles

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agozebra: zebra_vty.c compiles
Daniel Walton [Fri, 23 Sep 2016 21:17:10 +0000 (21:17 +0000)]
zebra: zebra_vty.c compiles

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 20:17:29 +0000 (20:17 +0000)]
lib: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoMerge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/quagga...
Quentin Young [Fri, 23 Sep 2016 20:11:04 +0000 (20:11 +0000)]
Merge branch 'vtysh-grammar' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into vtysh-grammar

7 years agolib: Implement removed ALIAS into DEFUN
Quentin Young [Fri, 23 Sep 2016 20:08:47 +0000 (20:08 +0000)]
lib: Implement removed ALIAS into DEFUN

N.B.: some of these are de-facto ALIAS resurrections
that are necessary due to some parser limitations; these
are marked with ALIAS_FIXME so I can go back and add
capability to the parser to handle these special cases.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoripd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 20:06:40 +0000 (20:06 +0000)]
ripd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoripngd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 20:04:42 +0000 (20:04 +0000)]
ripngd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agopimd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 20:03:41 +0000 (20:03 +0000)]
pimd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoospfd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 20:01:26 +0000 (20:01 +0000)]
ospfd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoospf6d: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 19:56:31 +0000 (19:56 +0000)]
ospf6d: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoisisd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 19:50:58 +0000 (19:50 +0000)]
isisd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agobgpd: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 19:45:50 +0000 (19:45 +0000)]
bgpd: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agozebra: add 'int idx_foo' argv index variables
Daniel Walton [Fri, 23 Sep 2016 19:26:31 +0000 (19:26 +0000)]
zebra: add 'int idx_foo' argv index variables

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agozebra: fix vrf argv index numbers
Daniel Walton [Fri, 23 Sep 2016 17:22:42 +0000 (17:22 +0000)]
zebra: fix vrf argv index numbers

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agozebra: compress multiple whitespaces in command string
Daniel Walton [Fri, 23 Sep 2016 14:02:55 +0000 (14:02 +0000)]
zebra: compress multiple whitespaces in command string

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agobgpd: fix hosed CMD_RANGE_STR
Daniel Walton [Fri, 23 Sep 2016 14:02:28 +0000 (14:02 +0000)]
bgpd: fix hosed CMD_RANGE_STR

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoconvert <1-255> to (1-255), ()s to <>s, etc
Daniel Walton [Fri, 23 Sep 2016 13:47:20 +0000 (13:47 +0000)]
convert <1-255> to (1-255), ()s to <>s, etc

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agotools: argv_translator convert <1-255> to (1-255), ()s to <>s, etc
Daniel Walton [Fri, 23 Sep 2016 13:27:26 +0000 (13:27 +0000)]
tools: argv_translator convert <1-255> to (1-255), ()s to <>s, etc

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoChange {json} to [json]
Daniel Walton [Fri, 23 Sep 2016 11:39:50 +0000 (11:39 +0000)]
Change {json} to [json]

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: undo <> -> () change I made yesterday
Daniel Walton [Fri, 23 Sep 2016 11:33:50 +0000 (11:33 +0000)]
lib: undo <> -> () change I made yesterday

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agotools: alias_destroyer re_install_element None check
Daniel Walton [Fri, 23 Sep 2016 04:12:43 +0000 (04:12 +0000)]
tools: alias_destroyer re_install_element None check

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra
Daniel Walton [Fri, 23 Sep 2016 03:55:26 +0000 (03:55 +0000)]
ALIAS removal for bgp, ospf, pim, isis, rip, ripng, lib and zebra

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agotools: added alias_destroyer.py
Daniel Walton [Fri, 23 Sep 2016 03:27:05 +0000 (03:27 +0000)]
tools: added alias_destroyer.py

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: argv update for distribute.c and ns.c
Daniel Walton [Fri, 23 Sep 2016 01:20:49 +0000 (01:20 +0000)]
lib: argv update for distribute.c and ns.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoisisd: argv update
Daniel Walton [Fri, 23 Sep 2016 01:07:05 +0000 (01:07 +0000)]
isisd: argv update

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agolib: argv update for filter.c, if_rmap.c keychain.c and plist.c
Daniel Walton [Fri, 23 Sep 2016 00:58:26 +0000 (00:58 +0000)]
lib: argv update for filter.c, if_rmap.c keychain.c and plist.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoospf6d: argv update
Daniel Walton [Fri, 23 Sep 2016 00:45:56 +0000 (00:45 +0000)]
ospf6d: argv update

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agopimd: argv update
Daniel Walton [Fri, 23 Sep 2016 00:14:41 +0000 (00:14 +0000)]
pimd: argv update

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agoripd: argv update
Daniel Walton [Fri, 23 Sep 2016 00:01:25 +0000 (00:01 +0000)]
ripd: argv update

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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.

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

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

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

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

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

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

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

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

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

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

7 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

7 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

7 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

7 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

7 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

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

7 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

7 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>
7 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>
7 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>
7 years agolib: Fixup plist.c
Donald Sharp [Wed, 21 Sep 2016 01:58:16 +0000 (21:58 -0400)]
lib: Fixup plist.c

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

7 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

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

7 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

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

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