]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
7 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>
7 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>
7 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>
7 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.

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

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

7 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

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

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

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

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

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

7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 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>
7 years agoldpd: copy original sources from OpenBSD (14/09/2016)
Renato Westphal [Tue, 1 Mar 2016 18:27:36 +0000 (15:27 -0300)]
ldpd: copy original sources from OpenBSD (14/09/2016)

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
7 years agoMPLS: Fix pointer manipulation when forming netlink nested attributes
vivek [Fri, 22 Apr 2016 00:54:30 +0000 (00:54 +0000)]
MPLS: Fix pointer manipulation when forming netlink nested attributes

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Fixes: f128f2f1f8a2fa975063dd321719607693991eb0
Ticket: CM-10506
Reviewed By: CCR-4536
Testing Done: Manual verification

7 years agoMPLS: Install labeled static routes
vivek [Tue, 19 Apr 2016 23:08:10 +0000 (23:08 +0000)]
MPLS: Install labeled static routes

This patch installs labeled static routes in the FIB. The routes are installed
using the RTA_ENCAP (and RTA_ENCAP_TYPE) nested attributes.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6040
Reviewed By: CCR-3091
Testing Done: Tested in SE-1, brief manual testing now

7 years agoMPLS: Configure static routes with labels in Quagga
vivek [Mon, 18 Apr 2016 22:54:11 +0000 (22:54 +0000)]
MPLS: Configure static routes with labels in Quagga

Introduce ability to configure static routes with labels. Only supported for
IPv4.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6040
Reviewed By: CCR-3090
Testing Done: Testing in SE-1

7 years agoMPLS: Display enhancements and JSON support
vivek [Mon, 18 Apr 2016 19:28:58 +0000 (19:28 +0000)]
MPLS: Display enhancements and JSON support

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-6712, CM-6713
Reviewed By: CCR-3206, CCR-3209
Testing Done: Manual

7 years agoQuagga: Fix MPLS LSP scheduling to follow nexthop route update
vivek [Mon, 18 Apr 2016 18:24:10 +0000 (18:24 +0000)]
Quagga: Fix MPLS LSP scheduling to follow nexthop route update

Fix LSP scheduling to occur only after routes are processed because
the LSP resolution depends on the nexthop route being selected. This
is similar to how NHT processing is scheduled.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-6743
Reviewed By: CCR-3233
Testing Done: Verified the failed test multiple times.

7 years agoQuagga: Fix memcmp usage for MPLS
vivek [Mon, 18 Apr 2016 18:02:26 +0000 (18:02 +0000)]
Quagga: Fix memcmp usage for MPLS

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-6611
Reviewed By: Trivial
Testing Done: Manual in SE-1

7 years agoQuagga: Display MPLS label forwarding table
vivek [Sat, 16 Apr 2016 18:23:04 +0000 (11:23 -0700)]
Quagga: Display MPLS label forwarding table

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4084, ...
Reviewed By: CCR-3089
Testing Done: Manual

7 years agoQuagga: Install label forwarding entries for statically configured LSPs
vivek [Sat, 16 Apr 2016 02:19:37 +0000 (19:19 -0700)]
Quagga: Install label forwarding entries for statically configured LSPs

Install the statically configured LSPs into the FIB (kernel). This is done
using the new attributes and definitions for MPLS in the kernel -
RTA_VIA, RTA_NEWDST and AF_MPLS.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:  CM-4804
Reviewed By: CCR-3088
Testing Done: Manual in SE-1

7 years agoQuagga: Fix alignment in netlink messages in some cases
vivek [Fri, 15 Apr 2016 20:32:23 +0000 (13:32 -0700)]
Quagga: Fix alignment in netlink messages in some cases

The alignment of nlmsg_len is calculated wrong leading to wrong rta_len
calculations for nested TLVs when the data length of the last TLV added
to the nested TLV is not aligned to RTA_ALIGNTO already. Use same fix
that was implemented in iproute2 by Thomas Graf circa 2005. A reference
to the fix is at
http://oss.sgi.com/archives/netdev/2005-03/msg03103.html.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-6491
Reviewed By: CCR-3087
Testing Done: MPLS testing with other patches in SE-1

Note: Prior to MPLS, we didn't face this problem as we haven't really had
any nested TLVs; even if RTA_MULTIPATH were to be considered a nested TLV,
it didn't have any non-aligned fields.

7 years agoQuagga: Static LSP configuration
vivek [Fri, 15 Apr 2016 17:51:56 +0000 (10:51 -0700)]
Quagga: Static LSP configuration

Add support for statically configuring MPLS transit LSPs. This allows the
configuration of ILM to one or more NHLFE, as defined in RFC 3031. The
currently supported nexthop types are IPv4 or IPv6.

The two label operations supported are swap and PHP; the latter is configured
by specifying the out-label as "implicit-null". Note that the operation is
against the label, so it should be the same for all NHLFEs.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4804, ...
Reviewed By: CCR-3085
Testing Done: In combination with other patches

7 years agoQuagga: Definitions for static LSPs
vivek [Fri, 15 Apr 2016 17:29:51 +0000 (10:29 -0700)]
Quagga: Definitions for static LSPs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4804, ...
Reviewed By: CCR-3084
Testing Done: Not relevant

7 years agoQuagga: Basic definitions for MPLS
vivek [Fri, 15 Apr 2016 17:13:31 +0000 (10:13 -0700)]
Quagga: Basic definitions for MPLS

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-4804, ...
Reviewed By: CCR-3083
Testing Done: Not relevant

7 years agobgp: Fix incorrect cli
Donald Sharp [Fri, 23 Sep 2016 13:06:24 +0000 (09:06 -0400)]
bgp: Fix incorrect cli

The optional parameter was entered as {JSON}
when it should have been {json}

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agobgpd: Additional Show Commands
Lou Berger [Wed, 21 Sep 2016 13:51:30 +0000 (09:51 -0400)]
bgpd: Additional Show Commands

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

(This commit is mostly mechanical.)

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

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

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

The following commit will recreate memory.[ch].

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoisisd, lib, vtysh: Allow extract.pl to fully work
Donald Sharp [Sat, 17 Sep 2016 11:25:35 +0000 (07:25 -0400)]
isisd, lib, vtysh: Allow extract.pl to fully work

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Zebra api that was never used.

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

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

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

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

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

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

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

7 years agozebra: Pass in vrf to rib_match_ipv4_multicast
Donald Sharp [Wed, 14 Sep 2016 19:34:25 +0000 (15:34 -0400)]
zebra: Pass in vrf to rib_match_ipv4_multicast

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

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

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

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

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

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

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

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

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

(cherry picked from commit 6e88e97786e1223e2b59a995ec330c1f49c55b26)

7 years agodoc: Get isisd.text included properly
Donald Sharp [Tue, 13 Sep 2016 19:43:54 +0000 (15:43 -0400)]
doc: Get isisd.text included properly

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

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

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

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

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

pim was missing route-map hooks

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

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

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

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

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

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

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

Modify the code to not crash in these cases.

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

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

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

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

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

  [no] vrf N netns <netns-name>

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

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

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

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

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

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

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

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

        zebra: atomic FIB updates

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoquagga-reload.py fails for "net add debug ospf6 lsa as-ext"
Daniel Walton [Thu, 8 Sep 2016 13:16:25 +0000 (13:16 +0000)]
quagga-reload.py fails for "net add debug ospf6 lsa as-ext"

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

- change "as-ext" to "as-external"
- drop "grp-mbr" option, it does not have a handler
- drop "type7" option, it does not have a handler

(cherry picked from commit 51f2d198c24107a91a32764bf0930c2d50954574)

7 years agobgpd: Process directly connected IBGP peers upon interface down
vivek [Thu, 8 Sep 2016 17:03:30 +0000 (10:03 -0700)]
bgpd: Process directly connected IBGP peers upon interface down

When we have a single-hop BFD session for any peering, it really means
that the peering is directly connected (maybe over a L2 network), whether
it is IBGP or EBGP. In such a case, upon link down, immediately process
IBGP peers too (and bring them down), not just EBGP peers.

This change eliminates some peculiar state transitions in specific IBGP
topologies, thus getting rid of the problem of nexthops remaining inactive
in the zebra RIB.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5156
Testing Done: Manual, bgp-smoke

7 years agolib, bgpd: Log next hops
vivek [Thu, 8 Sep 2016 16:38:53 +0000 (09:38 -0700)]
lib, bgpd: Log next hops

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5156
Testing Done: Manual

7 years agoquagga-reload.py fails for "net add debug ospf6 lsa as-ext"
Daniel Walton [Thu, 8 Sep 2016 13:16:25 +0000 (13:16 +0000)]
quagga-reload.py fails for "net add debug ospf6 lsa as-ext"

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

- change "as-ext" to "as-external"
- drop "grp-mbr" option, it does not have a handler
- drop "type7" option, it does not have a handler

7 years agobgpd: Enhance path selection logs
vivek [Mon, 5 Sep 2016 17:53:06 +0000 (10:53 -0700)]
bgpd: Enhance path selection logs

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-12390
Reviewed By: CCR-5136
Testing Done: Manual

(cherry picked from commit a6086ad4084a9dfbf930ef48e2987772767063bd)