]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years ago*: add/cleanup initialisers
David Lamparter [Tue, 3 Mar 2015 08:07:25 +0000 (09:07 +0100)]
*: add/cleanup initialisers

There were some (inconsequential) warnings about uninitialised use of
variables.  Also, in one case, sub-structs were mixed in initialisation,
which doesn't quite work as intended.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: add missing includes
David Lamparter [Tue, 3 Mar 2015 07:55:54 +0000 (08:55 +0100)]
*: add missing includes

Some places, particularly headers, were spewing warnings since they
don't include neccessary other headers to get struct/enum definitions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 388f8857eb81ef75014060976776523a58a99389)

8 years ago*: fix signedness mix-ups
David Lamparter [Tue, 3 Mar 2015 07:55:26 +0000 (08:55 +0100)]
*: fix signedness mix-ups

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 21401f3215be26dcb0f787105f5907745498e966)

8 years agobgpd, lib, vtysh: hook up bgp VPNv6 CLI node
vivek [Tue, 7 Jun 2016 02:29:05 +0000 (19:29 -0700)]
bgpd, lib, vtysh: hook up bgp VPNv6 CLI node

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 13c378d96a57017f5995b2e0df46cfc31123f0e8)

Conflicts:
bgpd/bgp_vty.c
bgpd/bgpd.c
vtysh/vtysh_config.c

8 years agobgpd: wire up VPNv6 protocol processing
Lou Berger [Tue, 12 Jan 2016 18:41:55 +0000 (13:41 -0500)]
bgpd: wire up VPNv6 protocol processing

There wasn't much missing for VPNv6 to begin with; just a few bits of
de- & encoding and a few lists to be updated.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
[Editorial note: Signed-off-by may imply an authorship claim, but need not]

Edited-by: Paul Jakma <paul.jakma@hpe.com> / <paul@jakma.org>
(cherry picked from commit 9da04bca0e994ec92b9242159bf27d89c6743354)

Conflicts:
bgpd/bgp_attr.c
bgpd/bgp_mplsvpn.c
bgpd/bgpd.c

8 years agobgpd: handle AS4 and EOI route distinguishers
Lou Berger [Tue, 12 Jan 2016 18:41:54 +0000 (13:41 -0500)]
bgpd: handle AS4 and EOI route distinguishers

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit a03bd16eedc5077e98716509b8918ed365227e02)

Conflicts:
bgpd/bgp_mplsvpn.c

8 years agobgpd: make _vpnv4 static handling SAFI-agnostic
Lou Berger [Tue, 12 Jan 2016 18:41:53 +0000 (13:41 -0500)]
bgpd: make _vpnv4 static handling SAFI-agnostic

This changes the existing _vpnv4 functions for MPLS-VPN into
SAFI-agnostic functions, renaming them from *_vpnv4 to *_safi.

Also adds route-map support while at it.

Signed-off-by: Lou Berger <lberger@labn.net>
Reviewed-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit a76d9ca3584c1751a592457c167c1e146648ceb6)

Conflicts:
bgpd/bgp_route.c

8 years agolib: add "show commandtree" CLI command
Lou Berger [Tue, 12 Jan 2016 18:41:48 +0000 (13:41 -0500)]
lib: add "show commandtree" CLI command

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit f9ec4190f1eaf2dba355a9808bca8d7148bc8a55)

8 years agolib: fix bookkeeping for libreadline malloc()s
Lou Berger [Tue, 12 Jan 2016 18:41:46 +0000 (13:41 -0500)]
lib: fix bookkeeping for libreadline malloc()s

When libreadline is used, we mistakenly mix in strdup() done in
libreadline with Quagga's lib/memory bookkeeping/counting, leading to
counter underflows on MTYPE_TMP.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 672900382d47137638086bd8351b2678f589a546)

Conflicts:
lib/command.c

8 years agobgpd: Fix graceful restart capability minsize
Lou Berger [Wed, 10 Feb 2016 14:24:00 +0000 (14:24 +0000)]
bgpd: Fix graceful restart capability minsize

* bgp_open.c: cap_minsize should be CAPABILITY_CODE_RESTART_LEN for RESTART
  not 6.

(cherry picked from commit 7748fdc757a2181649dd4956f2767545673ef28d)

8 years agolib, bgpd: Fixup afi_t to be an enum and cleanup zebra.h
Donald Sharp [Thu, 7 Jan 2016 14:33:28 +0000 (09:33 -0500)]
lib, bgpd: Fixup afi_t to be an enum and cleanup zebra.h

This code change does two things:

1) Removes ZEBRA_AFI_XXX #defines since they were redundant information
2) Switches afi_t to an enumerated type so that the compiler
can do a bit more compile time checking.

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

Conflicts:
bgpd/bgp_open.c
bgpd/bgp_open.h
bgpd/bgp_routemap.c

8 years agobgpd: bgp_scan shouldn't queue up route_nodes with no routes for processing
Paul Jakma [Tue, 1 Dec 2015 14:32:11 +0000 (14:32 +0000)]
bgpd: bgp_scan shouldn't queue up route_nodes with no routes for processing

* bgp_nexthop.c: (bgp_scan) There is little point queueing an rn with no routing
  information for processing.
* bgp_route.c: (bgp_process) Do nothing on rn's with no routes. Add an assert
  for now, to try catch any other cases, but prob should be removed.
  (bgp_best_selection) rn with no routes == finish early.

(cherry picked from commit 91b9e8547a7c5697d5d7481f9476778077024019)

Conflicts:
bgpd/bgp_nexthop.c
bgpd/bgp_route.c

8 years agobgpd: Update error subcode for OPEN message
vivek [Mon, 6 Jun 2016 19:14:21 +0000 (12:14 -0700)]
bgpd: Update error subcode for OPEN message

Updates: 695ef95fd7d5d8e48e2406092a2f52c8c9c784f3

8 years agobgpd: Check capability falls on right multiple of size, where possible.
Paul Jakma [Wed, 25 Nov 2015 17:14:35 +0000 (17:14 +0000)]
bgpd: Check capability falls on right multiple of size, where possible.

* bgp_open.c: (cap_modsizes) Table of multiple a capability's data size
  should fall on, if applicable.
  (bgp_capability_parse) Check the header lengthcap_modsizes should fall on.

  Inspiration from Cumulus bgpd-capability-cleanup.patch patch, with a
  slightly different approach.

Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 4078f2eb7a3a94ddb30cfd8b76b054e790aab524)

8 years agoMerge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into...
vivek [Mon, 6 Jun 2016 17:41:13 +0000 (10:41 -0700)]
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster-next

8 years agobgpd: update rtt on soft clear
Timo Teräs [Thu, 22 Oct 2015 08:35:18 +0000 (11:35 +0300)]
bgpd: update rtt on soft clear

rtt is calculated dynamically by the kernel. Refresh it on
soft clear.

Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric"
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
(cherry picked from commit 5a2a1ec18c89daec5de6690a9b0f47c0d11a0f2d)

Conflicts:
bgpd/bgpd.c

8 years agopimd: Allow (*,G) igmp joins to work.
Donald Sharp [Mon, 6 Jun 2016 16:27:11 +0000 (12:27 -0400)]
pimd: Allow (*,G) igmp joins to work.

Start the implementation of accepting (*,G)
igmpv3 joins.

Ticket: CM-7894
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: check rtt later after the real peer is known
Timo Teräs [Thu, 22 Oct 2015 08:35:17 +0000 (11:35 +0300)]
bgpd: check rtt later after the real peer is known

OPEN message handler moves the connection from the temporary
"struct peer" (used to accept it) to the real "struct peer" based
on the configuration. RTT needs to be updated only to the real
struct peer, and this patch moves the RTT query to point where
realpeer is known.

Fixes: ef757700d0 "bgpd: allow using rtt in route-map's set metric"
Signed-off-by: Timo Teräs <timo.teras@iki.fi>
(cherry picked from commit 0edba8b6ad9c83fa0a3cc58765fe9f123f4109ac)

Conflicts:
bgpd/bgp_packet.c

8 years agobgpd: Make bgp_info_cmp robust to paths that do not have su_remote info
Timo Teräs [Wed, 24 Jun 2015 12:27:21 +0000 (15:27 +0300)]
bgpd: Make bgp_info_cmp robust to paths that do not have su_remote info

My original su_remote == NULL check is not correct. It seems that

* bgp_route.c: (bgp_info_cmp) Some bgp_info is compared with su_remote=NULL
  and it's supposed to be perfectly legal.  E.g.  configured subnet announces
  ("network a.b.c.d/n"). Ensure bgp_info_cmp is robust if such a path gets
  as far as the neighbour address comparison step.

(cherry picked from commit 2820a01eed1c616d490ddbfd17793c19597459d1)

Conflicts:
bgpd/bgp_route.c

8 years agobgpd: Compile fix for clearing-completion FSM fix, using workqueue helper.
Paul Jakma [Tue, 15 Sep 2015 15:17:22 +0000 (16:17 +0100)]
bgpd: Compile fix for clearing-completion FSM fix, using workqueue helper.

(cherry picked from commit 782fb0770080d0e2970fc63af8645e82543aa4d0)

Conflicts:
bgpd/bgp_fsm.c

8 years agozebra: simplify redistribution code
Timo Teräs [Fri, 22 May 2015 10:41:00 +0000 (13:41 +0300)]
zebra: simplify redistribution code

Merge the conditionals as one to avoid code duplication.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit f85592e05ae6463727433893e61afd1081fcf7e0)

Conflicts:
zebra/redistribute.c

8 years agoMerge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into...
vivek [Mon, 6 Jun 2016 15:43:54 +0000 (08:43 -0700)]
Merge branch 'cmaster-next' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster-next

8 years agopimd: igmp_add_group_by_addr remove unneeded parameter
Donald Sharp [Mon, 6 Jun 2016 13:28:43 +0000 (09:28 -0400)]
pimd: igmp_add_group_by_addr remove unneeded parameter

We were passing in the interface name when we were also
passing in the igmp pointer which has this information.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove unnecessary parameter
Donald Sharp [Mon, 6 Jun 2016 13:17:40 +0000 (09:17 -0400)]
pimd: Remove unnecessary parameter

We were already passing in the interface name, no need
to do it twice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Remove dead code.
Donald Sharp [Mon, 6 Jun 2016 12:32:21 +0000 (08:32 -0400)]
pimd: Remove dead code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: allow using rtt in route-map's set metric
Timo Teräs [Wed, 29 Apr 2015 06:43:04 +0000 (09:43 +0300)]
bgpd: allow using rtt in route-map's set metric

Useful when the BGP neighbors are over tunnels that have large
differences in geographic distances and RTTs. Especially useful
for DMVPN setups to allow preferring closes hub.

The parameter is added as new alias command as otherwise it seems
the command parser is not able to match it properly (it seems
merging is done for the various 'set metric' route-map objects in
different routing engines). For same reason also they are listed
as three separate options: optional +/- seems not possibly easily.

Related research papers:
http://www.pps.univ-paris-diderot.fr/~jch/research/delay-based.pdf
http://arxiv.org/pdf/1309.0632.pdf

Paper on similar extension to Babel:
http://www.pps.univ-paris-diderot.fr/~jch/research/rapport-jonglez-2013.pdf

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit ef757700d0fd51dc0b46df9d3631208919f9b779)

8 years agobgpd: refactor route-map objects modifying integer values
Timo Teräs [Wed, 29 Apr 2015 06:43:02 +0000 (09:43 +0300)]
bgpd: refactor route-map objects modifying integer values

Use common code to parse, validate and adjust the route-map
objects that contain a simple integer value. This also allows
compiling the add/sub format metric object.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 38f22ab07c8e1f0f12e23c2e2d0a3e1f71bef695)

Conflicts:
bgpd/bgp_routemap.c

8 years agolib, bgpd: Fixup some more compile errors due to warnings
Donald Sharp [Sat, 4 Jun 2016 23:12:18 +0000 (19:12 -0400)]
lib, bgpd: Fixup some more compile errors due to warnings

Original cherry-pick done on a fedora box with a completely
different compiler.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years ago*: use void * for printing pointers
David Lamparter [Tue, 3 Mar 2015 07:51:53 +0000 (08:51 +0100)]
*: use void * for printing pointers

On higher warning levels, compilers expect %p printf arguments to be
void *.  Since format string / argument warnings can be useful
otherwise, let's get rid of this noise by sprinkling casts to void *
over printf calls.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years ago*: use long long to print time_t
David Lamparter [Tue, 3 Mar 2015 07:48:11 +0000 (08:48 +0100)]
*: use long long to print time_t

Since we can't assume time_t to be long, int, or even long long, this
consistently uses %lld/long long (or %llu/unsigned long long in a few
cases) to print time_t/susecond_t values.  This should fix a bunch of
warnings, on NetBSD in particular.

(Unfortunately, there seems to be no "PRId64" style printing macro for
time_t...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit ef008d2f8dc8f7160d8a3d24a15f2fad79ef3242)

8 years agozclient: Revert lib export of zclient_socket()/zclient_socket_un().
Everton Marques [Tue, 23 Sep 2014 17:33:34 +0000 (14:33 -0300)]
zclient: Revert lib export of zclient_socket()/zclient_socket_un().

8 years agozebra_rib: Revert work-around for zebra marking recursive static route as inactive.
Everton Marques [Tue, 23 Sep 2014 17:05:55 +0000 (14:05 -0300)]
zebra_rib: Revert work-around for zebra marking recursive static route as inactive.

8 years agozebra_rib: Revert debug hooks.
Everton Marques [Mon, 22 Sep 2014 21:00:15 +0000 (18:00 -0300)]
zebra_rib: Revert debug hooks.

8 years agozebra: Export zclient_socket_un().
Everton Marques [Thu, 3 Jul 2014 17:53:44 +0000 (14:53 -0300)]
zebra: Export zclient_socket_un().

8 years agoospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant log
Paul Jakma [Thu, 9 Oct 2014 15:05:15 +0000 (16:05 +0100)]
ospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant log

* linklist.{c,h}: (listnode_move_to_tail) new unction to move a
  listnode to tail of list.
* ospf_packet.c: (ospf_write) remove debug that seemed to be mostly covered
  by existing debug.
  Use listnode_move_to_tail to just move the list node to the end of the
  tail, rather than freeing the one to hand and allocing a new one.

8 years agobgpd: Fix useless call in bgpd/bgp_mplsvpn.c
Denil Vira [Thu, 23 Jul 2015 13:52:18 +0000 (06:52 -0700)]
bgpd: Fix useless call in bgpd/bgp_mplsvpn.c

Coverity scan ID : 1302528. Calling "decode_label(pnt)" is only useful for its return value, which is
ignored. Removed the call.

Signed-off-by: Denil Vira <denil@cumulusnetworks.com>
(cherry picked from commit 7053d8176ce502aabe39bf167f01354654bde5df)

8 years agoAdd code to extract.pl.in to prevent further cli function overwrites
Donald Sharp [Wed, 10 Jun 2015 00:22:42 +0000 (20:22 -0400)]
Add code to extract.pl.in to prevent further cli function overwrites

Currently extract.pl.in is used to build the vtysh cli.  When two
different cli's collide with the same command name, the original
cli is never called, because it is dropped.  This code notes the
silent drop and tracks the number of drops.  If they change then
the code will fail the build.  The current number of drops was
figured out by running extract.pl and counting up the drops
then adding code to compare the numbers returned.

If you have added to the problem, the solution is to fix your cli
command to not stomp on someone else's command.  If you have removed
a stomp, safely modify extract.pl.in as part of your commit.

Signed-off-by: Donald Sharp <sharpd at cumulusnetworks.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
8 years agoQuagga: Fix code to use srandom/random
Donald Sharp [Fri, 19 Jun 2015 23:26:19 +0000 (19:26 -0400)]
Quagga: Fix code to use srandom/random

Quagga was using a mix of srand/rand and srandom/random.
Consolidate to use srandom/random which are the POSIX
versions of random number generators

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: include thread information in backtraces
David Lamparter [Mon, 18 Nov 2013 22:52:02 +0000 (23:52 +0100)]
lib: include thread information in backtraces

now that we know what thread we're currently executing, let's add that
information to SEGV / assert backtraces.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 615f9f18fc025757a255f936748fc1e86e922783)

8 years agolib: unstupidify thread debug information
David Lamparter [Mon, 18 Nov 2013 22:04:27 +0000 (23:04 +0100)]
lib: unstupidify thread debug information

the library's thread scheduling functions keep track of the thread
function's name, so far so good.  However, copying the compiler-provided
constant into a buffer inside the thread structure is plain useless.
Also, strip_funcname() was trying to support something that never
happens.

Instead, let's use some bytes here to track where threads are scheduled
from.  Another commit will print that information on crashes.

Ripping out useless stuff:  -64 bytes in the thread structure
Re-add as const ptr:         +8 bytes
Extra debug info:           +12 bytes

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3493b7731b750cbc62f00be94b624a08ccccf0b2)

8 years agobgpd: don't use #ifdef inside macro args
David Lamparter [Tue, 3 Mar 2015 07:52:22 +0000 (08:52 +0100)]
bgpd: don't use #ifdef inside macro args

Using #ifdef inside preprocessor macro argument lists is not guaranteed
to work.  In reality it mostly does, but we don't need these ifdefs for
HAVE_IPV6 anymore, so let's get rid of the warning nonetheless.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 94bad67cd8fe7ad023a40547a1153a414d70fa0a)

Conflicts:
bgpd/bgp_route.c

8 years agobgpd: fix negative values in output
Milan Kocian [Mon, 1 Dec 2014 12:48:25 +0000 (12:48 +0000)]
bgpd: fix negative values in output

Negative value in output of ecommunities (and as numbers)
seems odd :-). This patch fixes it. And add minor formating
modification, better for big as numbers.

Signed-off-by: Milan Kocian <milon@wq.cz>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit cb4fc59c8a0f9df81109d38acbeaab5627e361f5)

Conflicts:
bgpd/bgp_vty.c

8 years agolib/workqueue: Add trivial work_queue_is_scheduled helper
Paul Jakma [Tue, 15 Sep 2015 15:16:42 +0000 (16:16 +0100)]
lib/workqueue: Add trivial work_queue_is_scheduled helper

(cherry picked from commit 13c2a3db503fde67f647fa58fd4e1077517ebb5c)

8 years agotests: add testcli reference in/out & do DejaGNU
David Lamparter [Thu, 14 May 2015 12:47:05 +0000 (14:47 +0200)]
tests: add testcli reference in/out & do DejaGNU

This adds reference in & output for the previously added testcli tool,
to check basic CLI parsing/help functions.  Unlike "testcommands", this
one doesn't depend on compile-time system details.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit d79668fb440ae2689b54f52c076dbd79a8689135)

8 years agotests: add CLI dummy command-exec tool
David Lamparter [Tue, 5 May 2015 09:04:59 +0000 (11:04 +0200)]
tests: add CLI dummy command-exec tool

This adds some common CLI testtool code as well as a tool that has a
bunch of commands to be poked for their correct processing.

The tool doesn't work correctly from a script at stdin at this point
because the vty code will throw away all buffered when it sees EOF, so
the tail end of the input file is lost.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit db93eec18d8f1e840b32ba2cdf8baf2510f6e1a5)

8 years agorelease: 0.99.24
David Lamparter [Mon, 2 Mar 2015 23:50:57 +0000 (00:50 +0100)]
release: 0.99.24

8 years agobuild: enable isisd by default
David Lamparter [Mon, 9 Feb 2015 10:36:10 +0000 (11:36 +0100)]
build: enable isisd by default

Most distributors enable it anyway, and it's not THAT broken anymore to
mandate disabling it by default.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: track config args
David Lamparter [Sat, 22 Nov 2014 18:43:29 +0000 (10:43 -0800)]
build: track config args

Record the ./configure arguments used and make them user-visible.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: remove --disable-ipv6
David Lamparter [Sat, 22 Nov 2014 18:31:33 +0000 (10:31 -0800)]
build: remove --disable-ipv6

Building with IPv6 disabled tends to break rather often and sprinkles
ugly #ifdefs around the code.  All that only to support systems where
the C library doesn't have IPv6 capability.

The year now being 2015, if this is a problem the thing to fix is the C
library.

The implication of this patch is that future patches need not care about
HAVE_IPV6 = 0 and may remove ifdefs gratuitously.  This patch doesn't
remove these ifdefs to not create unneccessary churn.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: get rid of INCLUDES, use AM_CPPFLAGS
David Lamparter [Sat, 28 Jun 2014 20:23:10 +0000 (22:23 +0200)]
build: get rid of INCLUDES, use AM_CPPFLAGS

INCLUDES in configure.ac was not used at all, and INCLUDES in
Makefile.am is supposed to be AM_CPPFLAGS these days.

Reduces warnings spewed during bootstrap/autoreconf.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 237aac56960575f6ad2451ba2796d94bd5ae4b33)

8 years agobuild: harmonize configure help strings
David Lamparter [Sat, 28 Jun 2014 20:15:59 +0000 (22:15 +0200)]
build: harmonize configure help strings

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit b6fa76098d127f5641a7dda0dee21f06ca167edb)

8 years agobuild: remove --enable-solaris parameter
David Lamparter [Sat, 28 Jun 2014 20:07:41 +0000 (22:07 +0200)]
build: remove --enable-solaris parameter

This switch controlled descending into the solaris/ subdirectory, which
contains package descriptions and init scripts.  If they're not
appropriate, they'd better be removed outright.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agozebra: remove rt_ioctl kernel interface
David Lamparter [Sat, 28 Jun 2014 19:49:18 +0000 (21:49 +0200)]
zebra: remove rt_ioctl kernel interface

None of the BSDs uses ioctls to set routes anymore.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agozebra, ripngd: remove ::/64 special-casing
David Lamparter [Sat, 28 Jun 2014 19:26:36 +0000 (21:26 +0200)]
zebra, ripngd: remove ::/64 special-casing

In the 90ies, IPv4 was believed to exist within IPv6, with some kernels
implementing this belief in code...  Our code here is keyed to "#ifdef
LINUX", yet no Linux from the past 10 years had this, making the code
completely useless.

FreeBSD 10.0 does in fact have a "::/96 via ::1 dev lo0 reject" route.
IMHO we shouldn't mess with that, the admin can filter as neccessary
anyway.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
[DL: slightly adjusted commit message to remove misunderstanding]
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: remove ancient Linux/BSD IPv6 cruft
David Lamparter [Sat, 28 Jun 2014 19:42:25 +0000 (21:42 +0200)]
build: remove ancient Linux/BSD IPv6 cruft

IPv6 functions in a separate library... yeah, right.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: remove INRIA, NRL and MUSICA IPv6 quirks
David Lamparter [Sat, 28 Jun 2014 19:12:37 +0000 (21:12 +0200)]
build: remove INRIA, NRL and MUSICA IPv6 quirks

Valar dohaeris.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agopimd: Fix compiler warning in pim_mroute.c
Donald Sharp [Fri, 3 Jun 2016 18:35:47 +0000 (14:35 -0400)]
pimd: Fix compiler warning in pim_mroute.c

Another compiler another warning.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobuild: remove AIX, NEC EWS and IRIX
David Lamparter [Sat, 28 Jun 2014 19:01:32 +0000 (21:01 +0200)]
build: remove AIX, NEC EWS and IRIX

Valar morghulis.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
8 years agobuild: remove Linux non-netlink config
David Lamparter [Sat, 28 Jun 2014 18:54:31 +0000 (20:54 +0200)]
build: remove Linux non-netlink config

This path is deprecated, completely untested, likely broken and will not
be maintained.  Kill it with fire.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 2e5ca49758543cde69d98f4a6a7b39486e88311d)

Conflicts:
configure.ac
zebra/if_proc.c
zebra/rtread_proc.c

8 years agovtysh: Add code to allow pimd show running specific
Donald Sharp [Wed, 1 Jun 2016 19:34:21 +0000 (15:34 -0400)]
vtysh: Add code to allow pimd show running specific

Add code to allow the show run command to accept and
display the pimd specific configuration.

Ticket: CM-11218
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agopimd: Add support for displaying ip mroute
Donald Sharp [Wed, 1 Jun 2016 19:31:02 +0000 (15:31 -0400)]
pimd: Add support for displaying ip mroute

When you enter a static mroute under an interface
the 'show run' is not displaying this information.
Add code to allow this.

Ticket: CM-11257
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agozebra: Remove experimental warning
Donald Sharp [Wed, 1 Jun 2016 15:44:16 +0000 (11:44 -0400)]
zebra: Remove experimental warning

Remove the pimd experimental warnings that are being
displayed for some commands.

Ticket: CM-6128
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopim: Fix 'no ip pim sm'
Donald Sharp [Wed, 1 Jun 2016 15:26:29 +0000 (11:26 -0400)]
pim: Fix 'no ip pim sm'

The 'no ip pim sm' command was not being accepted.
Additionally fix the help output

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix unprotected zlog_debug
Donald Sharp [Wed, 1 Jun 2016 13:12:07 +0000 (09:12 -0400)]
zebra: Fix unprotected zlog_debug

Fixing an unprotected zlog_debug.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agopimd: Allow command zclient to find it's data
Donald Sharp [Wed, 1 Jun 2016 01:27:48 +0000 (21:27 -0400)]
pimd: Allow command zclient to find it's data

pim has two zclient sockets to zebra.  One
is used exclusively to do mrib lookups.  The
other is to do the normal day to day communication
between pim and zebra.  With the change
to the zebra api to send up all data to all
sockets this caused the mrib lookup socket
to accumulate data in between mrib lookups.
So if at some point in time we get upcoming
data but no mrib lookups modify the code
to find the mrib lookup it is looking for.

Long term we need to figure something else out
but this change will get us moving forward again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: Fixup zclient api to be consistent
Donald Sharp [Fri, 27 May 2016 00:11:15 +0000 (20:11 -0400)]
lib: Fixup zclient api to be consistent

All ZAPI commands pass the zclient around not
the individual stream we need.  Switch code
over to follow conventions.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fixup zebra zapi message table
Donald Sharp [Fri, 27 May 2016 00:06:08 +0000 (20:06 -0400)]
lib: Fixup zebra zapi message table

The zapi zebra_desc_table command_types code was
missing some entries.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix vrf_id_t data type
Donald Sharp [Thu, 26 May 2016 23:52:10 +0000 (19:52 -0400)]
lib: Fix vrf_id_t data type

We were reading a u_int16_t for vrf_id_t.  While technically
the same thing, I'd like to make sure we think about vrf_id_t's
as vrf_id_t's.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agodebian: Add pimd to logrotate script
Donald Sharp [Thu, 26 May 2016 23:41:58 +0000 (19:41 -0400)]
debian: Add pimd to logrotate script

Add pimd to the log rotate script so that the USR1 signal
can be sent to pimd to tell it to rotate the log.

Ticket: CM-11253
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fixup some clang compiler warnings
Donald Sharp [Thu, 26 May 2016 23:33:12 +0000 (19:33 -0400)]
pimd: Fixup some clang compiler warnings

clang run on a fairly recent fedora complains
about some code.  Fixup the warnings.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add ability to safely ignore route-maps
Donald Sharp [Thu, 26 May 2016 23:31:38 +0000 (19:31 -0400)]
pimd: Add ability to safely ignore route-maps

pim was not parsing route-map code and causing issues
using vtysh because of this.  Add code to safely
ignore the route-map code and set us up for future
expansion into route-maps if neeeded.

Ticket: CM-11219
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovtysh: vtysh_pam() needs an ifdef USE_PAM check
Daniel Walton [Fri, 27 May 2016 14:31:41 +0000 (14:31 +0000)]
vtysh: vtysh_pam() needs an ifdef USE_PAM check

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: resolve merge issues in bgp_attr_check()
Daniel Walton [Fri, 27 May 2016 13:31:06 +0000 (13:31 +0000)]
bgpd: resolve merge issues in bgp_attr_check()

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agovtysh: Fix compile failure from cherry-pick
Donald Sharp [Thu, 26 May 2016 23:56:47 +0000 (19:56 -0400)]
vtysh: Fix compile failure from cherry-pick

Fix a compile failure from a cherry-pick of a
commit from upstream

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Double read of stream
Donald Sharp [Thu, 26 May 2016 16:41:55 +0000 (12:41 -0400)]
pimd: Double read of stream

The addition of the zclient_read_header call
reads the entirety of the stream for you and
makes sure it's consistent with the header.
When the function call was added it read the
stream data in zclient_read_header and then
reread the data after that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agodebian: Add test_igmpv3_join to packaging
Donald Sharp [Thu, 26 May 2016 14:31:59 +0000 (10:31 -0400)]
debian: Add test_igmpv3_join to packaging

Add the test_igmpv3_join program to packaging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Forgot to add the vrf_init call
Donald Sharp [Thu, 26 May 2016 01:24:01 +0000 (21:24 -0400)]
pimd: Forgot to add the vrf_init call

Forward port of vrf code didn't have the pimd
code.  So when it was forward ported we lost
the vrf_init.  Now that we have pimd let's
add it back in.

Additionally forward port lost the
additional zclient->zebra_connect call.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoospfd: Some small tweaks to the SPF execution reason patch
Paul Jakma [Thu, 9 Oct 2014 13:19:51 +0000 (14:19 +0100)]
ospfd: Some small tweaks to the SPF execution reason patch

* ospf_spf.h: use an enum for the reason, and have it as a new argument to
  ospf_spf_calculate_schedule, no need for additional call, and let compiler
  do the checking.
* ospf_spf.c: format changes - Quagga coding style places function names
  at the start of a new line, for easy grepping for definition.
  (ospf_spf_calculate_timer) Change the log format of SPF execution time to
  avoid ginormous line, and make logging conditional, as is the norm.

(cherry picked from commit b6eef003e1a79471addea0b01853b08aed812cc8)

Conflicts:
ospfd/ospf_spf.c

8 years agozebra: MBGP routes should not be installed in the kernel
Balaji [Thu, 23 Oct 2014 15:25:25 +0000 (15:25 +0000)]
zebra: MBGP routes should not be installed in the kernel

MBGP routes are used only for PIM RPF checks and hence should
not be installed in the kernel's FIB. Ignore route node set to Multicast
SAFI.

Signed-off-by: Balaji.G <balajig81@gmail.com>
Acked-by: Everton Marques <everton.marques@gmail.com>
[pushed down rn->table->info assignment below assert]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 9511633e08ff15c23608983fdc1bc735d427332e)

Conflicts:
zebra/zebra_rib.c

8 years agobgpd: Fixes for recent well-known-attr check patch.
Paul Jakma [Tue, 21 Oct 2014 15:59:01 +0000 (16:59 +0100)]
bgpd: Fixes for recent well-known-attr check patch.

* bgp_attr.c: Recent patch to tighten well-known attr checks and apply that
  to all AFIs has some breakage with MP-extensions and GR, which needs to be
  fixed.
  (bgp_attr_check) Graceful Restart EoR can be an empty UPDATE for IPv4/uni.
  MP-Ext allow UPDATE with just MP_UNREACH_NLRI. Check for these and return
  proceed.
  NEXT_HOP becomes optional, if MP_REACH_NLRI is present and there's no
  v4 NLTI, update NEXT_HOP check accordingly.
  Print the missing attr in string form in the log message.
  (bgp_attr_parse) AS_PATH need not be there, so
  bgp_attr_munge_as4_attrs call needs to be conditional on that.

(cherry picked from commit aed1b556cf2f55680ae09d7ad1a1f22729dea8c5)

Conflicts:
bgpd/bgp_attr.c

8 years agobgpd: well-known attr check only run for v4/uni, which could cause a crash.
Paul Jakma [Tue, 23 Sep 2014 14:23:01 +0000 (15:23 +0100)]
bgpd: well-known attr check only run for v4/uni, which could cause a crash.

* ANVL testing by Martin Winter threw up a crash in bgpd in aspath_dup
  called from bgp_packet_attribute, if attr->aspath was NULL, on an IPv6
  UPDATE.

  This root cause is that the checks for well-known, mandatory attributes
  were being applied only if an UPDATE contained the IPv4 NLRI and the
  peer was configured for v4/unicast (i.e. not deconfigured). This is
  something inherited from GNU Zebra, and never noticed before.

* bgp_attr.c: (bgp_attr_parse) Move the well-known mandatory attribute
  check to here, so that it can be run immediately after all attributes
  are parsed, and before any further processing of attributes that might
  assume the existence of WK/M attributes (e.g. AS4-Path).
  (bgp_attr_munge_as4_attrs) Missing AS_PATH shouldn't happen here anymore,
  but retain a check anyway for robustness - it's definitely a hard error
  though.
* bgp_attr.h: (bgp_attr_check) No longer needs to be exported, make static.
* bgp_packet.c: (bgp_update_receive) Responsibility for well-known check
  now in bgp_attr_parse.

(cherry picked from commit 055086f70febc30fdfd94bb4406e9075d6934cd8)

Conflicts:
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_packet.c

8 years agobgpd.c: Remove unused store to variable
Paul Jakma [Fri, 19 Sep 2014 14:34:48 +0000 (15:34 +0100)]
bgpd.c: Remove unused store to variable

(cherry picked from commit b2dd59ee0e74926278e128846624f5c93288223b)

Conflicts:
bgpd/bgpd.c

8 years agoFix most compiler warnings in default GCC build.
Paul Jakma [Fri, 19 Sep 2014 13:42:23 +0000 (14:42 +0100)]
Fix most compiler warnings in default GCC build.

Fix lots of warnings. Some const and type-pun breaks strict-aliasing
warnings left but much reduced.

* bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to
  (struct fifo), so just use that.  Makes it clearer the beginning of
  (struct bgp_advertise) is compatible with with (struct fifo), which seems
  to be enough for gcc.
  Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up
  type-punning breaks strict aliasing warnings.
* bgp_packet.c: Use BGP_ADV_FIFO_HEAD.
  (bgp_route_refresh_receive) fix an interesting logic error in
  (!ok || (ret != BLAH)) where ret is only well-defined if ok.
* bgp_vty.c: Peer commands should use bgp_vty_return to set their return.
* jhash.{c,h}: Can take const on * args without adding issues & fix warnings.
* libospf.h: LSA sequence numbers use the unsigned range of values, and
  constants need to be set to unsigned, or it causes warnings in ospf6d.
* md5.h: signedness of caddr_t is implementation specific, change to an
  explicit (uint_8 *), fix sign/unsigned comparison warnings.
* vty.c: (vty_log_fixed) const on level is well-intentioned, but not going
  to fly given iov_base.
* workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always
  true for address of static variable.  Correct but pointless warning in
  this case, but use a 2nd pointer to shut it up.
* ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2
  different 32 bit IDs into in (struct ospf6_route), and the resulting
  type-pun strict-alias breakage warnings this causes.  Need to use 2
  different fields to fix that warning?

general:

* remove unused variables, other than a few cases where they serve a
  sufficiently useful documentary purpose (e.g.  for code that needs
  fixing), or they're required dummies.  In those cases, try mark them as
  unused.
* Remove dead code that can't be reached.
* Quite a few 'no ...' forms of vty commands take arguments, but do not
  check the argument matches the command being negated.  E.g., should
  'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set?
  Or should it be required that the distance match the previously configured
  distance for the prefix?
  Ultimately, probably better to be strict about this.  However, changing
  from slack to strict might expose problems in command aliases and tools.
* Fix uninitialised use of variables.
* Fix sign/unsigned comparison warnings by making signedness of types consistent.
* Mark functions as static where their use is restricted to the same compilation
  unit.
* Add required headers
* Move constants defined in headers into code.
* remove dead, unused functions that have no debug purpose.

(cherry picked from commit 7aa9dcef80b2ce50ecaa77653d87c8b84e009c49)

Conflicts:
bgpd/bgp_advertise.h
bgpd/bgp_mplsvpn.c
bgpd/bgp_nexthop.c
bgpd/bgp_packet.c
bgpd/bgp_route.c
bgpd/bgp_routemap.c
bgpd/bgp_vty.c
lib/command.c
lib/if.c
lib/jhash.c
lib/workqueue.c
ospf6d/ospf6_lsa.c
ospf6d/ospf6_neighbor.h
ospf6d/ospf6_spf.c
ospf6d/ospf6_top.c
ospfd/ospf_api.c
zebra/router-id.c
zebra/rt_netlink.c
zebra/rt_netlink.h

8 years agozebra: fix rtnh_len in the rt_netlink messages for multipath case
Lu Feng [Fri, 11 Jul 2014 07:52:15 +0000 (07:52 +0000)]
zebra: fix rtnh_len in the rt_netlink messages for multipath case

In _netlink_route_build_multipath():
- Each time when appending a IPv4 gateway in the message, rtnh_len
  is increased by sizeof (struct rtattr) + 4, where we should use
  "bytelen" instead of the hard coding "4".
- As what done for IPv4, we should increase rtnh_len accordingly
  along with adding a IPv6 gateway, or else the IPv6 gateways will
  be lost.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 621e2aaf33d8ab73bf44b0eea3f3900135d34996)

Conflicts:
zebra/rt_netlink.c

8 years agoripd: allow to enable/disable the ECMP feature
Lu Feng [Fri, 18 Jul 2014 06:13:19 +0000 (06:13 +0000)]
ripd: allow to enable/disable the ECMP feature

Introduce a new command "[no] allow-ecmp" to enable/disable the
ECMP feature in RIP. By default, ECMP is not allowed.

Once ECMP is disabled, only one route entry can exist in the list.

* rip_zebra.c: adjust a debugging information, which shows the number
               of nexthops according to whether ECMP is enabled.
* ripd.c: rip_ecmp_add() will reject the new route if ECMP is not
          allowed and some entry already exists.
          A new configurable command "allow-ecmp" is added to control
          whether ECMP is allowed.
          When ECMP is disabled, rip_ecmp_disable() is called to
          remove the multiple nexthops.
* ripd.h: Add a new member "ecmp" to "struct rip", indicating whether
          ECMP is allowed or not.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 0b74a0a5db7bcf65bf68c44b547b02b1310b5cdb)

8 years agoripd: add ECMP support
Lu Feng [Fri, 18 Jul 2014 06:13:18 +0000 (06:13 +0000)]
ripd: add ECMP support

* Each node in the routing table is changed into a list, holding
  the multiple equal-cost paths.

* If one of the multiple entries gets less-preferred (greater
  metric or greater distance), it will be directly deleted instead
  of starting a garbage-collection timer for it.
  The garbage-collection timer is started only when the last entry
  in the list gets INFINITY.

* Some new functions are used to maintain the ECMP list. And hence
  rip_rte_process(), rip_redistribute_add() and rip_timeout() are
  significantly simplified.

* rip_zebra_ipv4_add() and rip_zebra_ipv4_delete() now can share
  the common code. The common part is moved to rip_zebra_ipv4_send().

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b397cf4f0fc484c5ebfc8a680090055c8e6cbe32)

Conflicts:
ripd/rip_zebra.c

8 years agoconfigure: Fix warnings on CentOS and bump the minimum autoconf version
Paul Jakma [Tue, 16 Feb 2016 11:30:33 +0000 (11:30 +0000)]
configure: Fix warnings on CentOS and bump the minimum autoconf version

* configure.ac: Bump the minimum version to 2.60 as needed by
  AC_USE_SYSTEM_EXTENSIONS.  AC 2.60 is nearly 10 years old, note.  Add
  AC_PROG_RANLIB, for when --disable-shared is used.

  There are other warnings on, e.g., CentOS 6.7 with 2.63, but they
  don't go away if the suggestion to add AC_SYSTEM_EXTENSIONS is
  followed. This warning doesn't occur on Fedora with AC 2.69.

  Note: autoconf (and other auto*) should only be needed on developer
  machines building direct from git.  Other systems should be using the
  'make dist' tarballs, with a ready-made build system, that does not
  need auto* intalled.

(cherry picked from commit f9f4731245eb9f83d0795acac24183c6cf709288)

8 years agodoc: older versions of texinfo seem to be sensitive to location of unmacro
Paul Jakma [Tue, 16 Feb 2016 11:28:35 +0000 (11:28 +0000)]
doc: older versions of texinfo seem to be sensitive to location of unmacro

* bgpd.texi: The unmacro of mprec seems to be disliked by older texinfos.
  Moving it to after the section fixes it. Even easier, just don't undef the
  macro.

(cherry picked from commit f8113a2b10a97ba0d5e915b318cebea283d03169)

8 years agodistro/redhat: Update to support CentOS/RHEL/Fedora, upstart/init/systemd
Martin Winter [Fri, 30 Oct 2015 05:15:42 +0000 (22:15 -0700)]
distro/redhat: Update to support CentOS/RHEL/Fedora, upstart/init/systemd

* redhat/quagga.spec.in: Update to support CentOS, RHEL and Fedora, and
  support the various init systems across different versions of these
  distros, e.g.  upstart/init/systemd.

  Clean up various warnings from rpmlint.

  Remove configure options that are gone.

A few edits and commit message by:
Paul Jakma <paul.jakma@hpe.com> / <paul@jakma.org>

(cherry picked from commit a5efdb60905049e1224a020b78dd9699bdd15b29)

8 years agodistro/redhat/rpm: remove with_ipv6, package pimd binary, remove pam stack
Paul Jakma [Thu, 11 Feb 2016 13:54:23 +0000 (13:54 +0000)]
distro/redhat/rpm: remove with_ipv6, package pimd binary, remove pam stack

* redhat/quagga.spec.in: remove with_ipv6, it should just be the norm now.
  The actual pimd binary wasn't being packaged, fix.
  Remove deprecated pam.stack support.

* redhat/quagga.pam.stack: ancient, nuke.
* Makefile.am: ditto

(cherry picked from commit 283d5d7f2fa12c3d33dc17962154665a9993b2c5)

8 years agoAdding redhat init/service files to start pimd
Martin Winter [Thu, 13 Aug 2015 00:31:07 +0000 (17:31 -0700)]
Adding redhat init/service files to start pimd

Added missing pimd.init (for RedHat/CentOS <= 6) and
pimd.service (for RedHat/CentOS >= 7)

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit fca2c24ff21a9d837229bc40e462c6615e368123)

8 years agodistro: fix redhat/quagga.spec.in
Paul Jakma [Fri, 4 Sep 2015 13:25:13 +0000 (14:25 +0100)]
distro: fix redhat/quagga.spec.in

* quagga.spec.in: Add default for with_pimd macro.
  Remove ancient condtional on quagga_buildreqs.
  More recent rpmbuild complains about too many levels of recursion in
  quagga_buildreqs, so use %{expand:..}.
  Actually use quagga_buildreqs in BuildRequires!
  groff is needed for build.
  texi2html --number argument has disappeared, split into 2.

Acked-by: Donald Sharp <sharpd at cumulusnetworks.com>
(cherry picked from commit e07068c838142a127da8821afd660f075f7c35f8)

8 years agodoc: Add AFI/SAFI show commands to manual
Lou Berger [Tue, 12 Jan 2016 18:42:10 +0000 (13:42 -0500)]
doc: Add AFI/SAFI show commands to manual

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 544ec70f66d0ec081dadde79bec1f25c2241f57f)

8 years agobgpd: encap: extend extcommunity handling
Lou Berger [Tue, 12 Jan 2016 18:42:00 +0000 (13:42 -0500)]
bgpd: encap: extend extcommunity handling

Add code to print ENCAP communities.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 5a81fc9ae610ff343902ebabc12237d6e40d91cb)

8 years agobgpd: kill unused variable in bgp_socket()
Lou Berger [Tue, 12 Jan 2016 18:41:52 +0000 (13:41 -0500)]
bgpd: kill unused variable in bgp_socket()

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 4d80560a2b064182191371fd7e4304bf829a4d9f)

8 years agobgpd: add nexthop length to AF macro
Lou Berger [Tue, 12 Jan 2016 18:41:51 +0000 (13:41 -0500)]
bgpd: add nexthop length to AF macro

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3e841d3b49bdb475ce793eee5d82e5137dff57d3)

8 years agolib: add SAFI_ENCAP type, safi2str prefix utility
Lou Berger [Tue, 12 Jan 2016 18:41:50 +0000 (13:41 -0500)]
lib: add SAFI_ENCAP type, safi2str prefix utility

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 2daf7f3a8d69213f35b16a04dbe300957481a811)

8 years agolib: treat realloc of null pointer as alloc Now use zalloc rather than alloc with...
Lou Berger [Tue, 12 Jan 2016 18:41:47 +0000 (13:41 -0500)]
lib: treat realloc of null pointer as alloc Now use zalloc rather than alloc with null. Fixes issue seen in bgp check tests.

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 9248b61f54955e56212f3ae4c8a7ab704f7ad01c)

8 years agozebra: make RTF_LLINFO optional to fix FreeBSD
Lou Berger [Tue, 12 Jan 2016 18:41:44 +0000 (13:41 -0500)]
zebra: make RTF_LLINFO optional to fix FreeBSD

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b05c6ca57130f079f8a8a6686d9d4ffa5ff440f0)

8 years agozebra: wire up "debug zebra packet detail"
Lou Berger [Tue, 12 Jan 2016 18:41:43 +0000 (13:41 -0500)]
zebra: wire up "debug zebra packet detail"

There was no way to actually set ZEBRA_DEBUG_DETAIL, even though some
debug output was conditional to it.  Add CLI command.

Signed-off-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit d7be042378eac103634ab62abf4b2a5ca225092d)