]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 years agoospf6d: add support for route tags
Christian Franke [Sat, 1 Oct 2016 04:41:40 +0000 (06:41 +0200)]
ospf6d: add support for route tags

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

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

It is based on the following patch:

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

    *: Widen width of Zserv routing tag field.

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

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

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

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

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

What is MASC anyways?

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

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

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

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

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

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

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

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

Replace with vty->qobj_index infrastructure and enable
vty_config_lockless.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agobgpd: 'Last write' does not update when we TX a keepalive
Daniel Walton [Thu, 6 Oct 2016 13:20:02 +0000 (13:20 +0000)]
bgpd: 'Last write' does not update when we TX a keepalive

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

7 years agobgpd: Fix crash in vnc_import_bgp_add_route
Donald Sharp [Sun, 2 Oct 2016 22:33:32 +0000 (18:33 -0400)]
bgpd: Fix crash in vnc_import_bgp_add_route

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Now includes changes needed to merge with cmaster-next.

7 years agolib: add skiplist
Lou Berger [Tue, 19 Apr 2016 20:00:37 +0000 (16:00 -0400)]
lib: add skiplist

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[CF: Massage to fit cumulus tree]
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 years agolib: Only display memory items that have allocations
Donald Sharp [Fri, 30 Sep 2016 01:47:07 +0000 (21:47 -0400)]
lib: Only display memory items that have allocations

When displaying memory via a 'show run' only display
items that have actual memory allocated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge remote-tracking branch 'origin/cmaster' into cmaster-next
Donald Sharp [Fri, 30 Sep 2016 00:24:49 +0000 (20:24 -0400)]
Merge remote-tracking branch 'origin/cmaster' into cmaster-next

7 years agoospfd: Fix OSPF daemon pid file param
ßingen [Mon, 26 Sep 2016 09:07:01 +0000 (11:07 +0200)]
ospfd: Fix OSPF daemon pid file param

When -i is specified on the cli, ospf was ignoring this
value.

7 years agolib: Fix compile for json
Donald Sharp [Thu, 29 Sep 2016 00:35:12 +0000 (20:35 -0400)]
lib: Fix compile for json

When compiling with the json library instead of the json-c
library allow it to switch back to the old way of printing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoldpd: always advertise labels upon receiving a redistributed route
Renato Westphal [Wed, 28 Sep 2016 15:25:18 +0000 (12:25 -0300)]
ldpd: always advertise labels upon receiving a redistributed route

Whenever a routing daemon advertises a new version of a route to zebra,
zebra removes the old version of this route (implicit withdraw) and then
create a new 'rib' structure for the new version of the route.

In this process, the previously received label(s) from ldpd are lost. This
is because upon receiving a ZEBRA_MPLS_LABELS_ADD message, zebra only
adds a label to a nexthop of an existing route. And routes are volatile,
they can be removed while being updated.

To workaround this issue, this patch makes ldpd always advertise the
appropriate labels whenever it receives a redistributed route, even
if it was already received before (an older version). This way, when
ldpd receives the updated version of a route, it will readvertise the
appropriate label(s) and zebra will reinstall them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: fix processing of redistributed routes
Renato Westphal [Wed, 28 Sep 2016 15:25:17 +0000 (12:25 -0300)]
ldpd: fix processing of redistributed routes

Commit 5048fe changed the way zebra behave when a route is updated. Now,
whenever a route is changed, zebra advertises its new version without
withdrawing the old one. This patch adapts ldpd to understand this new
behavior. After processing a ZEBRA_REDISTRIBUTE_IPV[46]_ADD message,
we need to check for nexthops that were removed and, for each of them
(if any), withdraw the associated labels from zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoldpd: make route flags a 32bit field
Renato Westphal [Wed, 28 Sep 2016 15:25:16 +0000 (12:25 -0300)]
ldpd: make route flags a 32bit field

This is a followup to commit 0fc452dc5, which updated all daemons
except ldpd.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agolib: fix vrf_bitmap leak in zclient_free()
David Lamparter [Wed, 16 Dec 2015 18:38:23 +0000 (19:38 +0100)]
lib: fix vrf_bitmap leak in zclient_free()

zclient_stop(), which is used as antagonist to zclient_init(), needs to
undo the vrf_bitmap allocation.  Otherwise zclient_init() will leak the
allocated memory, for example when zclient_reset() is used.

Reported-by: Lou Berger <lberger@labn.net>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
7 years agouse JSON_C_TO_STRING_PRETTY for json_object_to_json_string
Daniel Walton [Wed, 28 Sep 2016 04:52:36 +0000 (04:52 +0000)]
use JSON_C_TO_STRING_PRETTY for json_object_to_json_string

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
7 years agotools: quagga-reload should raise Exception instead of exiting
Daniel Walton [Tue, 27 Sep 2016 15:56:36 +0000 (15:56 +0000)]
tools: quagga-reload should raise Exception instead of exiting

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
NCLU imports quagga-reload.py and uses its Config class to parse
Quagga.conf.  The Config class will call 'vtysh -m -f Quagga.conf" and
if that exited with an error Config would call sys.exit(1) which in my
cases causes the NCLU daemon to exit which is bad.  The fix is to have
the Config class raise an exception instead of exiting, then NCLU can
catch the exception, log it and move on.

(cherry picked from commit 276887bb1c2961fa37b42ce7160346f1417577a8)

7 years agozebra: "ip import-table" display is hosed
Daniel Walton [Tue, 27 Sep 2016 15:57:56 +0000 (15:57 +0000)]
zebra: "ip import-table" display is hosed

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-13020

Now that we have evpn we have the following AFIs

 /* Address family numbers from RFC1700. */
 typedef enum {
   AFI_IP  = 1,
   AFI_IP6 = 2,
   AFI_ETHER = 3,                /* RFC 1700 has "6" for 802.* */
   AFI_MAX = 4
 } afi_t;

The import-table code was treating the afi as a flag which was fine
before when the only choices were 1 and 2 but now that we have #3 that
doesn't work. The fix is to change zebra_import_table_used to a
[AFI_MAX][ZEBRA_KERNEL_TABLE_MAX] array to track if import-table is
enabled.

7 years agotools: quagga-reload should raise Exception instead of exiting
Daniel Walton [Tue, 27 Sep 2016 15:56:36 +0000 (15:56 +0000)]
tools: quagga-reload should raise Exception instead of exiting

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
NCLU imports quagga-reload.py and uses its Config class to parse
Quagga.conf.  The Config class will call 'vtysh -m -f Quagga.conf" and
if that exited with an error Config would call sys.exit(1) which in my
cases causes the NCLU daemon to exit which is bad.  The fix is to have
the Config class raise an exception instead of exiting, then NCLU can
catch the exception, log it and move on.

7 years agolib: Allow more space in thread.c output
Donald Sharp [Mon, 26 Sep 2016 18:06:23 +0000 (14:06 -0400)]
lib: Allow more space in thread.c output

When displaying thread time for long running/busy
protocols, the space allocated may not be sufficient.

Allow the runtime to take a bit more space.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agozebra: add missing files to EXTRA_DIST
Renato Westphal [Fri, 23 Sep 2016 12:58:30 +0000 (09:58 -0300)]
zebra: add missing files to EXTRA_DIST

This fixes RPM package generation on CentOS 7.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agolib: Make distribute.c accepts both v4 and v6.
Matthieu Boutier [Thu, 22 Sep 2016 21:11:07 +0000 (18:11 -0300)]
lib: Make distribute.c accepts both v4 and v6.

distribute.c doesn't allow to manage both v4 and v6 distribute lists.  This
patch fix this problem by having 4 DISTRIBUTE* values in the enumeration instead
of two. The code in all daemons using distribute.c is adapted.

7 years agoripngd: code simplification for redistribution.
Matthieu Boutier [Thu, 22 Sep 2016 21:11:06 +0000 (18:11 -0300)]
ripngd: code simplification for redistribution.

Use loops and variables instead of doing each cases by hand.
Use boolean instead of having 2 almost identical functions.

7 years agoripd: code simplification for redistribution.
Matthieu Boutier [Thu, 22 Sep 2016 21:11:05 +0000 (18:11 -0300)]
ripd: code simplification for redistribution.

Use loops and variables instead of doing each cases by hand.
Use boolean instead of having 2 almost identical functions.

7 years agolib: simplify distribute.c's code.
Matthieu Boutier [Thu, 22 Sep 2016 21:11:04 +0000 (18:11 -0300)]
lib: simplify distribute.c's code.

Use loops and variables instead of doing each cases by hand.
Use static functions instead of rewriting code.

8 years agoMake route flags a 32bit field
Christian Franke [Fri, 16 Sep 2016 19:55:37 +0000 (21:55 +0200)]
Make route flags a 32bit field

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agolib: Check prefix length from zebra is sensible
Paul Jakma [Tue, 9 Feb 2016 15:23:03 +0000 (15:23 +0000)]
lib: Check prefix length from zebra is sensible

* zclient.c: prefix length on router-id and interface address add
  messages not sanity checked.  fix.

* */*_zebra.c: Prefix length on zebra route read was not checked, and
  clients use it to write to storage.  An evil zebra could overflow
  client structures by sending overly long prefixlen.

Prompted by discussions with:

Donald Sharp <sharpd@cumulusnetworks.com>

8 years agolib: force local MIN/MAX macros
David Lamparter [Wed, 21 Sep 2016 16:20:49 +0000 (18:20 +0200)]
lib: force local MIN/MAX macros

Linux/glibc sys/param.h has definitions of MIN/MAX that result in
multiple evaluations of its parameters.  Force local definitions.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agofpm/protobuf: fix compile errors & warnings
David Lamparter [Wed, 21 Sep 2016 10:45:46 +0000 (12:45 +0200)]
fpm/protobuf: fix compile errors & warnings

BABEL was removed, ifname nexthops were removed, additional includes
were needed, and lastly the protobuf enum-handling triggers a warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agozebra: add developer test functions for FPM code
Avneesh Sachdev [Fri, 11 Mar 2016 20:21:26 +0000 (12:21 -0800)]
zebra: add developer test functions for FPM code

Add test functions for the zebra code that interfaces with the
Forwarding Plane Manager. These functions can be invoked in a
development build via the recently-added 'invoke' command.

For example:

  # invoke zebra function zfpm_dt_benchmark_protobuf_encode 100000

Changes:

  * zebra/zebra_fpm_dt.c

    Add the following functions. Each function encodes or decodes a
    route in a particular FPM format a specified number of times.

    - zfpm_dt_benchmark_netlink_encode()
    - zfpm_dt_benchmark_protobuf_encode()
    - zfpm_dt_benchmark_protobuf_decode()

  * zebra/Makefile.am

    Compile zebra_fpm_dt when building a development build.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agobuild: support for "development build"
Avneesh Sachdev [Fri, 11 Mar 2016 20:21:24 +0000 (12:21 -0800)]
build: support for "development build"

* configure.ac

    Add the --enable-dev-build flag. It controls the DEV_BUILD
    define for autoconf and automake, which can be used to
    conditionally build in code that is only intended for development..

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agodoc: add blurb on use of protobuf with FPM
Avneesh Sachdev [Mon, 4 Apr 2016 17:54:59 +0000 (10:54 -0700)]
doc: add blurb on use of protobuf with FPM

Add text about using protobuf as an alternative format for the FPM
interface.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agozebra: optionally use protobuf with FPM
Avneesh Sachdev [Mon, 4 Apr 2016 17:54:58 +0000 (10:54 -0700)]
zebra: optionally use protobuf with FPM

Change zebra so that it can optionally use protobuf serialization when
communicating with a Forwarding Plane Manager component.

  * zebra/main.c

    Add the --fpm-format/-F command line option. This allows the user
    to control the format (protbuf|netlink) that is used to
    communicate with the FPM.

  * zebra/zebra_fpm.c

    - zebra_init_msg_format(),

      This new function is invoked on process startup to determine the
      FPM format that should be used.

    - zfpm_init()

      Change to accept any 'FPM message format' specified by the user
      (via the new command line flag).

    - zebra_encode_route()

      Tweak to use the selected FPM format.

  * zebra_fpm_protobuf.c

    New code to build protobuf messages to be sent to the FPM.

  * zebra/Makefile.am

    - Include common.am

    - Build new file zebra_fpm_protobuf.c when protobuf is available.

    - Link with the fpm_pb library.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agoUse only the ISC license for .proto files.
Avneesh Sachdev [Thu, 14 Jul 2016 16:59:30 +0000 (09:59 -0700)]
Use only the ISC license for .proto files.

Simplify licensing for protobuf files based on discussion on the
quagga-dev mailing list.

Previously, users could choose between the GPL and the ISC license.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agofpm: Add protobuf support for FPM.
Avneesh Sachdev [Mon, 4 Apr 2016 17:54:57 +0000 (10:54 -0700)]
fpm: Add protobuf support for FPM.

Code that allows a client to convey routes to a Forwarding Plane
Manager component using protobuf instead of netlink..

  * fpm/fpm.proto

    Protobuf definitions pertaining to the Forwarding Plane Manager.
    In particular, this file defines the AddRoute and DeleteRoute
    messages.

  * fpm/fpm.h

    Tweak FPM message header definition to also allow messages to be
    encoded in protobuf format.

  * fpm/{fpm_pb.h,.gitignore,.Makefile.am}

    Add the fpm_pb library, which contains code for interfacing with
    the FPM using protobuf.

  * configure.ac

    Generate fpm/Makefile.

  * Makefile.am

    Add fpm subdirectory to build.

  * common.am

    Add flags to be used by clients of the fpm_pb library.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agobuild: turn off automake portability warnings
Avneesh Sachdev [Mon, 4 Apr 2016 17:54:56 +0000 (10:54 -0700)]
build: turn off automake portability warnings

Modify configure.ac to disable portability warnings for automake --
our automake code (in particular common.am) uses some constructs
specific to gmake.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
8 years agoqpb: Add support for protobuf.
Avneesh Sachdev [Mon, 4 Apr 2016 17:54:55 +0000 (10:54 -0700)]
qpb: Add support for protobuf.

Infrastructure that allows protocol buffers to be used in Quagga. The
changes below comprise of:

  - Build hooks

  - Protobuf definitions for common types.

  - Library routines for working with protobuf, including functions
    that help translate between common quagga types and their protobuf
    equivalents.

Changes:

  * qpb/{Makefile.am,README.txt,qpb.h,.gitignore}

    Add the qpb library, which provides shared code and definitions
    for using protocol buffers in quagga code.

  * qpb/qpb.proto

    Protobuf definitions that can be shared by all of quagga.

  * qpb/linear_allocator.h

    An allocator that allocates memory by walking down towards the end
    of a buffer. This is used to cheaply allocate/deallocate memory on
    the stack for protobuf operations.

  * qpb/qpb_allocator.[ch]

    Thin layer that allows a linear allocator to be used with the
    protobuf-c library.

  * common.am

    This is an automake fragment that is intended to be shared by
    Makefile.am files in the tree. It currently includes definitions
    related to protobuf.

  * configure.ac

    - Add logic to optionally build protobuf code.

      By default, protobuf support is enabled if the protobuf C
      compiler (protoc-c) is available, and the associated header
      files/library can be found.

      The user can choose to override this behavior via the new
      --disable-protobuf/--enable-protobuf flags.

    - Include the quagga protobuf library (qpb) in the build.

  * .gitignore

    Ignore source code generated by protobuf compiler.

  * Makefile.am

    Add 'qpb' to the list of subdirectories.

Signed-off-by: Avneesh Sachdev <avneesh@sproute.com>
Edited: Paul Jakma <paul.jakma@hpe.com>: Change the sense of the
        configure enable option to require explicit specifying, as
        an experimental feature.

8 years agoisisd: fix assert warning
David Lamparter [Tue, 16 Feb 2016 18:50:15 +0000 (19:50 +0100)]
isisd: fix assert warning

icc (the Intel C Compiler) "knows" that assert() can be disabled by
setting specific optimisation flags, and therefore emits a warning about
missing a return value after an "always-error" assert.

Workaround by returning a value - this probably needs discussion and a
better fix (for all places where the code needs to abort due to internal
errors).

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agozebra: Enable fpm module to connect to remote fpm server
Udaya Shankara KS [Thu, 11 Feb 2016 16:12:29 +0000 (21:42 +0530)]
zebra: Enable fpm module to connect to remote fpm server

FPM aims to provide cross platform mechanism to support the scenario
where the router has forwarding path distinct fromt the kernel.Commonly
Hardware based fast path.Hence it is non-configurable paramter.This
limits us to use funcationality to update FIB information to remote
hosts, like SDN controller.

This implementation provides the CLI to configure remote hosts and port
information of remote fpm controller.Otherwise default fpm server will
be localhost and default fpm port will be well know port 2620.

* zebra_fpm.c: added fpm_server paramter to zfpm_global_t handler.
    Implemented CLI for configuring the fpm server and no fpm
    command to revert back to default configuration.

* zserv.c: Install zebra node to write fpm configuration info
   on console/config file.

Further documentation supplied:
-------------------------------

               ZEBRA : CLI CONFIGURATION FOR FPM MODULE
         ========================================================

1. INTRODUCTION
================================
   1.1 scope

     This memo discusses the configuration option for zebra to update
     FIB information to local and remote modules.
     This will also helps to address the issue associated with CORD project.
     https://jira.onosproject.org/browse/CORD-411

2. REFERENCE
================================
  Quagga version 99.24+ ( main branch committed on 29-sep-2015)

3. PROBLEM DESCRIPTION
================================

    Once FPM is enabled, Quagga periodically tries to initiate fpm
connection to localhost:2620.  These values are non configurable in
existing implementation.  There is no CLI available to configure
"host:port".  hence limits us to use it for hardware based fast path
modules only.

4. PROPOSED CHANGES
================================
Following changes are done to the quagga code
   a) Added new CLI to configure "host address : port".
      The CLI format
      <conf t>
           $ fpm connection ip <ipv4 address> port <tcp port num>

      and no fpm command to revert back to default
      <conf t>
           $ no fpm connection ip <ipv4 address> port <tcp port num>

   b) Allowed values are ipv4 address and tcp port range <1-65535>

   c) FPM initialization code has been enhanced to pick the "host
      address : port" values from zebra.conf.  if not found then
      default values as localhost:2620 will be used.  and updated the
      information on to config file on write config command

5. FILES MODIFIED
================================
  1) fpm/fpm.h :
     a) Added MACRO to represent network order loopback ip

  2) zebra/zebra_fpm.h :

     a) introduced fpm_server variable in zfpm_glob_t handler to hold
        the remote fpm server address

     b) Hooked 'fpm_remote_ip_cmd' and 'no_fpm_remote_ip_cmd' at CONFIG
        node to configure remote fpm detail and to revert back to
        default respectively

  3) zebra/zserv.c :
     a) Hooked 'config_write_fpm' callback function, at ZEBRA_NODE to
        display the fpm connection details on console on entering
        command

         $ show running_config
        and to write to configuration file on entering command
         $ write config

6. TESTING DETAILS
================================

   6.1. default behavior

          In default configuration FPM will attempt to connect to
          localhost:2620

   6.2. update fpm info
        a) Using CLI command user can configure fpm host:port details
           and can be able to write to config file(zebra.conf) using
           write config command.  this parameters has no
           dependency/impact on other parameters of config file

        b) show running-config/write config will display the fpm
           information if configured.  and will not display any
           information related to fpm for default configuration

        c) these configured information will be stored to config file.
           only on write config command.

   6.3 loading from config file
        a) zebra attempts to connect to fpm server if fpm parameter
           found in config file.else connects to default parameters.

        b) if fpm connection drops, fpm will periodically attempts to
           connect to remote server.

        c) if fpm connections already established. then newly
           configured fpm parameters will not disconnect the existing
           connection.  new connection to the different fpm server will
           happen only after existing connection closes by either of
           the end.

fix fpm prototype

8 years agoisisd: Segmentation fault on isis daemon fixes
boris yakubov [Fri, 26 Apr 2013 18:38:34 +0000 (14:38 -0400)]
isisd: Segmentation fault on isis daemon fixes

I have a fix for 2 segmentation fault scenarios on the isis daemon:
1. When running a command "isis passive" on an interface in the
following context:
"end"
"configure terminal "
"interface dummy0"
"isis passive"
The trace back collected:
isis_adjacency.c:521
family=2,
     root_sysid=0x20aee6d0 "", parent=0x20af4d68) at isis_spf.c:999
sysid=0x20aee6d0 "")
     at isis_spf.c:1217
isis_spf.c:1372
isis_lsp.c:416
isis_lsp.c:1660
isis_main.c:368

The fix location:
file name: isisd/isis_adjacency.c
routine name: isis_adj_build_up_list

2. When deleting the existing isis router instance:
"end"
"configure terminal "
"no router isis DEAD"

The fix location:
isisd/isis_events.c, routine circuit_resign_level
isisd/isis_lsp.c, routine lsp_destroy
isisd/isis_route.c, isis_route_validate

The trace back collection:
"DEAD") at isisd.c:252
argc=1, argv=0xbfc39054) at isisd.c:1520
vty=0x20d6f528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368

and

"DEAD") at isisd.c:260
argc=1, argv=0xbfd6cf54) at isisd.c:1520
vty=0x208cb528, cmd=0x0) at command.c:2121
cmd=0x0, vtysh=0) at command.c:2155
isis DEAD") at vty.c:433
isis_main.c:368

The patch is included.

patchwork #833: http://patchwork.quagga.net/patch/833/

8 years agolib: update Solaris multicast API (BZ#725)
Christian Franke [Mon, 14 Jan 2013 22:41:57 +0000 (23:41 +0100)]
lib: update Solaris multicast API (BZ#725)

On OpenIndiana/Solaris the build fails with "unsupported multicast API".
It's only in the IPv4 part where setsockopt IP_MULTICAST_IF needs a
local address and not the index (IPv6 wants the index).
The following code walks the list of interfaces until it finds the matching
index and uses the interface's local address for the setsockopt call.
I don't know if it works on Solaris < 10 (I guess yes, but I don't have
any machine to verify it).

[NB: this breaks unnumbered setups that use the same IPv4 address on
multiple interfaces. -- equinox@opensourcerouting.org]

Reported-by: Brian Utterback <brian.utterback@oracle.com>
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Patchwork #762

8 years agoripd: split-horizon default differed between rip_interface_new and _reset
Paul Jakma [Wed, 25 May 2016 13:47:00 +0000 (14:47 +0100)]
ripd: split-horizon default differed between rip_interface_new and _reset

* rip_interface.c: Default for split_horizon_default differed between
  rip_interface_new and rip_interface_reset, causing at least some issues
  after interface events. See patchwork #604. Fix, and consolidate code.

  (rip_interface_{reset,clean}) rename these to 'interface', as that's more
  appropriate.  Spin the ri specific bodies of these functions out to
  rip_interface_{reset,clean} helpers.  Factor out the overlaps, so
  rip_interface_reset uses rip_interface_clean.

  (rip_interface_new) just use rip_interface_reset.

* ripd.h: Update for (rip_interface_{reset,clean})

Reported by xufeng zhang, with a suggested fix on which this commit expands.
See patchwork #604.  This commit addresses only the split-horizon
discrepency, issue #2.  The other issue they reported, #1, is not addressed,
though suggested fix seems inappropriate.

Cc: xufeng.zhang@windriver.com
8 years agovtysh: make extract.pl more whitespace-robust
David Lamparter [Mon, 19 Sep 2016 16:32:17 +0000 (18:32 +0200)]
vtysh: make extract.pl more whitespace-robust

"DEFUN (" could only match with exactly one space between DEFUN and
opening brace.  Allow any amount of space.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agolib: fix ICC warning in route-map code
David Lamparter [Wed, 21 Sep 2016 10:49:30 +0000 (12:49 +0200)]
lib: fix ICC warning in route-map code

ICC thinks we're storing a pointer and might be losing bits at the top:
error #810: conversion from "void *" to "route_map_event_t={enum
 <unnamed>}" may lose significant bits

Build is warning-free on ICC 14.0.3 (for Linux x86_64) with this.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoospf6d: fix fallout from ifindex_t change
David Lamparter [Wed, 21 Sep 2016 10:30:00 +0000 (12:30 +0200)]
ospf6d: fix fallout from ifindex_t change

Only one of these variables is in fact an interface index...
(this fixes -Werror build.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
8 years agoRevert "Make route flags a 32bit field"
Donald Sharp [Fri, 23 Sep 2016 16:11:21 +0000 (12:11 -0400)]
Revert "Make route flags a 32bit field"

This reverts commit 85eda2c98520a9553bdc05c136618f9d04917e9b.

8 years agoRevert "zebra: use link scope for interface routes"
Donald Sharp [Fri, 23 Sep 2016 16:11:09 +0000 (12:11 -0400)]
Revert "zebra: use link scope for interface routes"

This reverts commit 72f3a8fb09433ee1e4d079522cd70999bb3b8e79.

8 years agoRevert "zebra: support FIB override routes"
Donald Sharp [Fri, 23 Sep 2016 16:11:00 +0000 (12:11 -0400)]
Revert "zebra: support FIB override routes"

This reverts commit 7569ae8bb7390224e16ee416cc0745d427a29818.

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

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

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

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
[CF: Massage to fit cumulus tree]
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agozebra: use link scope for interface routes
Timo Teräs [Fri, 15 Jan 2016 15:36:30 +0000 (17:36 +0200)]
zebra: use link scope for interface routes

In linux, 'scope' is a hint of distance of the IP. And this is
evident from the fact that only lower scope can be used as recursive
via lookup result. This changes all interface routes scope to link
so kernel will allow regular routes to use it as via. Then we do
not need to use the 'onlink' attribute.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
8 years agoMake route flags a 32bit field
Christian Franke [Fri, 16 Sep 2016 19:55:37 +0000 (21:55 +0200)]
Make route flags a 32bit field

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agovtysh: relax error condition on build
Renato Westphal [Thu, 22 Sep 2016 14:42:06 +0000 (11:42 -0300)]
vtysh: relax error condition on build

If the number of CLI collisions is smaller than the expected one,
there's a good chance that Quagga is being built with one or more
daemons disabled. In this case, just print a warning and don't abort
the compilation to allow partial builds.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra: check at startup if the kernel supports MPLS
Renato Westphal [Thu, 22 Sep 2016 02:59:57 +0000 (23:59 -0300)]
zebra: check at startup if the kernel supports MPLS

Replace all HAVE_MPLS #ifdef's by a run-time check if MPLS is supported
by the kernel or not. This way we don't need to create multiple packages
for each OS distribution.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years ago*: remove dead code
Renato Westphal [Tue, 20 Sep 2016 23:50:47 +0000 (20:50 -0300)]
*: remove dead code

Since recently zebra uses only the ZEBRA_REDISTRIBUTE_* messages
to advertise redistributed routes to its clientes. Now the old
ZEBRA_IPV*_ROUTE_* messages are only used for client->zebra communication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozserv: always send all information about each route
Renato Westphal [Wed, 21 Sep 2016 16:38:34 +0000 (13:38 -0300)]
zserv: always send all information about each route

Most routing daemons are not interested in certain pieces of information
when a redistributed route is being removed, like its metric and distance.

ldpd, in the other hand, needs to know the distance of the removed routes
in order to work properly. Now, instead of adding another exception in
zserv's code for ldpd, let's make zebra always send all information
about each route to its clients, independently if the route is being
added or removed. This is ok because all daemons are already prepared
to process these additional fields when the appropriate flags are set
in the zebra messages.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra: add explicit-null option for static MPLS LSPs
Renato Westphal [Sat, 17 Sep 2016 13:55:24 +0000 (10:55 -0300)]
zebra: add explicit-null option for static MPLS LSPs

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agozebra: fix bug in nexthop label allocation
ßingen [Thu, 15 Sep 2016 10:28:52 +0000 (12:28 +0200)]
zebra: fix bug in nexthop label allocation

Label array in nexthop_label struct was not being allocated.

8 years agozebra: install MPLS CLI commands only if MPLS is enabled.
Renato Westphal [Wed, 14 Sep 2016 20:55:21 +0000 (17:55 -0300)]
zebra: install MPLS CLI commands only if MPLS is enabled.

To keep things simple, zebra's code should be the same whether MPLS
is enabled or not. Then, when MPLS is not enabled, we just disable all
MPLS CLI commands. This way we don't need to add a lot of #ifdef cruft
in zebra's core, improving code readability.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMPLS: ignore hardware restrictions when --enable-cumulus is not given.
Renato Westphal [Wed, 14 Sep 2016 18:27:21 +0000 (15:27 -0300)]
MPLS: ignore hardware restrictions when --enable-cumulus is not given.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoMPLS: add support for labeled IPv6 static routes.
Renato Westphal [Tue, 13 Sep 2016 01:18:23 +0000 (22:18 -0300)]
MPLS: add support for labeled IPv6 static routes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agodistro/redhat: add mpls and ldpd
Renato Westphal [Mon, 12 Sep 2016 19:54:56 +0000 (16:54 -0300)]
distro/redhat: add mpls and ldpd

8 years agobuild: fix package generation on CentOS 7
Renato Westphal [Mon, 12 Sep 2016 18:56:27 +0000 (15:56 -0300)]
build: fix package generation on CentOS 7

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agompls: add support to the OpenBSD kernel
Renato Westphal [Thu, 2 Jun 2016 11:28:15 +0000 (08:28 -0300)]
mpls: add support to the OpenBSD kernel

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agompls: add null driver
Renato Westphal [Mon, 12 Sep 2016 12:02:39 +0000 (09:02 -0300)]
mpls: add null driver

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agompls: add support for LDP LSPs
Renato Westphal [Wed, 1 Jun 2016 17:19:30 +0000 (14:19 -0300)]
mpls: add support for LDP LSPs

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: add vtysh support
Renato Westphal [Mon, 1 Aug 2016 22:47:15 +0000 (19:47 -0300)]
ldpd: add vtysh support

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: adapt the code for Quagga
Renato Westphal [Tue, 1 Mar 2016 18:31:28 +0000 (15:31 -0300)]
ldpd: adapt the code for Quagga

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
8 years agoldpd: sun is a reserved word on Solaris
Renato Westphal [Tue, 29 Mar 2016 14:37:01 +0000 (11:37 -0300)]
ldpd: sun is a reserved word on Solaris

On a SUN/Solaris system the string "sun" is a preprocessor define and
can't be used for program variables.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>