]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years agoquagga: Remove iflist global variable
Donald Sharp [Fri, 8 Apr 2016 13:16:14 +0000 (09:16 -0400)]
quagga: Remove iflist global variable

The file if.c has a iflist that had the list of interfaces
in the default vrf.  Remove this variable and replace
with a vrf_iflist lookup on the default vrf where it
was used.

Additionally, modify ptm code to iterate over all vrf's
when enabling ptm.

Ticket: CM-10338
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
8 years agolib, zebra: Rename ZEBRA_VRF_ACTIVE
Donald Sharp [Thu, 7 Apr 2016 15:19:58 +0000 (11:19 -0400)]
lib, zebra: Rename ZEBRA_VRF_ACTIVE

ZEBRA_VRF_ACTIVE is a poor name for when a vrf is
actually active.  Rename VRF_ACTIVE.

Ticket: CM-10338
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
8 years agolib: Refactor XX_name_len away
Donald Sharp [Thu, 7 Apr 2016 15:15:31 +0000 (11:15 -0400)]
lib: Refactor XX_name_len away

We had two functions XXX_name and XXX_name_len
that both did the same thing.  Remove the
XXX_rename_len functions.

Ticket: CM-10338
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
8 years agodebian: Add ability to call reload from systemctl
Donald Sharp [Thu, 7 Apr 2016 14:48:28 +0000 (10:48 -0400)]
debian: Add ability to call reload from systemctl

Add the ability to call 'systemctl reload <daemon>'.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agotools: Make quagga script be more helpful
Donald Sharp [Thu, 7 Apr 2016 14:36:11 +0000 (10:36 -0400)]
tools: Make quagga script be more helpful

When running the tools/quagga script without any options
it tells you nothing about what went wrong and what to
do to fix it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Thu, 7 Apr 2016 00:56:53 +0000 (20:56 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agovtysh: Add file locking to Quagga.conf
Donald Sharp [Wed, 6 Apr 2016 19:51:09 +0000 (15:51 -0400)]
vtysh: Add file locking to Quagga.conf

Problem:

Systemd runs in parallel all quagga daemons after zebra is started up.
Now each command has a ExecStartPost which executes vtysh -b -n.
Each of these vtysh -b -n would blask configuration to each daemon.

This leads to the situation where vtysh process #2 is blasting
in config that is at a different spot in the Quagga.conf file
that vtysh process #1 is at.

If #1 has put itself into a different submode that #2 is at,
we will get failures and the code will not be read in properly.

This problem is especially evident for when you have more than one
protocol running at one time.

Solution:

flock Quagga.conf.
If you don't get the flock, sleep for a while, try to get flock again
go to slepp...

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: DAve Olson <olson@cumulusnetworks.com>
8 years agolib, vtysh: Return actual problem further up
Donald Sharp [Wed, 6 Apr 2016 13:34:33 +0000 (09:34 -0400)]
lib, vtysh: Return actual problem further up

When we encounter a problem loading a config file
quantify to the end user what has gone wrong,
with a combination of err output as well as
return codes.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
8 years agoZebra: Fix VRF-id and table for BGP unnumbered (RFC 5549)
vivek [Wed, 6 Apr 2016 21:07:05 +0000 (14:07 -0700)]
Zebra: Fix VRF-id and table for BGP unnumbered (RFC 5549)

In the case of BGP unnumbered RFC 5549 (IPv4 routes with IPv6 nexthop), the
zebra code to handle routes was not initializing the correct VRF id and
locating the correct routing table, resulting in the routes not getting
installed. Fixed with this change.

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

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 6 Apr 2016 12:16:37 +0000 (08:16 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agobgpd: Resolve ability to add route-map out to peer-group member
Don Slice [Wed, 6 Apr 2016 12:08:42 +0000 (12:08 +0000)]
bgpd: Resolve ability to add route-map out to peer-group member

Modified the configuration code to properly allow a peer-group member
to have a route-map out applied when one does not exist on the peer-group
itself.  This capability already existed for route-map in.

Ticket: CM-10058
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoisisd: ignore unknown interfaces when adjusting IS-IS mtu
Christian Franke [Sun, 3 Apr 2016 15:46:28 +0000 (12:46 -0300)]
isisd: ignore unknown interfaces when adjusting IS-IS mtu

For example during startup of isisd, the MTU of interfaces is not
known, since this information will only be available once the
interfaces have been learned from zebra.

It makes no sense to include the MTU 0 that is stored for interfaces
in this state in the consideration whether a new lsp-mtu for an
area is valid, so skip interfaces which are in this state.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
8 years agoisisd: make sure that all interface addresses are advertised
Christian Franke [Sun, 3 Apr 2016 15:46:27 +0000 (12:46 -0300)]
isisd: make sure that all interface addresses are advertised

If the following configuration commands are run interactively in
succession, the ipv6 addresses of this interface won't be advertised
in the router's LSP immediately:

   # interface eth0
   # ip router isis test
   # ipv6 router isis test

This is because the ipv6 router command won't trigger a state change
for the interface and therefore, it won't trigger a regeneration of
the LSPs.

The same thing happens if IPv4 is enabled after IPv6, or for the cases
where IPv4 is disabled and IPv6 stays enabled or vice-versa.

Fix this by explicitly calling lsp_regenerate_schedule for the cases
where it won't be called implicitly.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
8 years agoisisd: fix a crash due to an lsp-mtu issue
Christian Franke [Sun, 3 Apr 2016 15:46:26 +0000 (12:46 -0300)]
isisd: fix a crash due to an lsp-mtu issue

isisd crashed on startup if it was enabled for an interface with
a too small MTU.

To fix this, we treat this case as an invalid configuration and
disable isis on that interface if that case happens, since it is
a configuration error.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
8 years agoisisd: work around route table asserts for deleting node with info
Christian Franke [Sun, 3 Apr 2016 15:46:25 +0000 (12:46 -0300)]
isisd: work around route table asserts for deleting node with info

The route table code in lib/table.c triggers an assertion when a route
node with rn->info != NULL reaches refcount 0, probably to avoid
memleaks. In this particular case, this is not an issue, since the
info will be freed by the destructor.

However, since removing this assertion probably requires more
discussion, just make sure that rn->info gets freed and unset before
its refcount is decremented to zero.

Signed-off-by: Christian Franke <nobody@nowhere.ws>
8 years agolib: Initialize variable
vivek [Tue, 5 Apr 2016 17:40:33 +0000 (10:40 -0700)]
lib: Initialize variable

Initialize a variable to prevent warnings.

Updates: 8087b296b4750eda2d34e4f48731f81415bdccd2

Ticket: CM-10258
Reviewed By:  Trivial
Testing Done: None

8 years agolib: Ensure VRF is created with correct id
vivek [Mon, 4 Apr 2016 17:58:06 +0000 (10:58 -0700)]
lib: Ensure VRF is created with correct id

In function vrf_get(), an early call to vrf_get_by_name() may end up
creating the Zebra VRF structure prior to the VRF id being set,
resulting in various other misbehavior. Fix this with appropriate
changes.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-10258
Reviewed By: CCR-4418
Testing Done: Manual

8 years agobgpd: Another hash_get crash fix
Donald Sharp [Mon, 4 Apr 2016 16:44:46 +0000 (12:44 -0400)]
bgpd: Another hash_get crash fix

Basically when modifying the peer->su, we must *always*
release the hash and then re-install it, else
we will cause crashes when we go to look up data
that is not going to be there.

Ticket: CM-10212
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: plist should not CMD_WARNING when command has already been entered
Donald Sharp [Mon, 4 Apr 2016 16:40:33 +0000 (12:40 -0400)]
lib: plist should not CMD_WARNING when command has already been entered

When you startup zebra and apply a prefix list command, and then at a
later point in time start up additional daemons and then attempt to
apply the integrated-config, the prefix-list command will stop
processing after zebra.

This is because when zebra attempted to process the command, it would
notice that it already had that cli handled and print a vty warning and
then it would return CMD_WARNING. This caused the loop over all the
commands to stop and as such the command would not be sent to all the
individual daemons.

This behavior is exactly the same as it is in the 2.5.X( hell it's
upstream behavior to! ). Modify the plist command to return CMD_SUCCESS
in this case.

Ticket: CM-10248
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Fri, 1 Apr 2016 23:16:20 +0000 (16:16 -0700)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agozebra: close all tables when quagga is stopped
Don Slice [Fri, 1 Apr 2016 15:31:40 +0000 (08:31 -0700)]
zebra: close all tables when quagga is stopped

When signalled to stop quagga, iterate through any "other_tables" that may have
been imported and close them all before stopping.

Ticket: CM-9386
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 1 Apr 2016 19:28:21 +0000 (15:28 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agobgp: Fix crash in hash_get for peer
Donald Sharp [Fri, 1 Apr 2016 16:19:42 +0000 (12:19 -0400)]
bgp: Fix crash in hash_get for peer

This commit partially backs out 83260f0.

Ticket: CM-10212
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agovtysh: Make vtysh run as quagga user
Donald Sharp [Fri, 1 Apr 2016 13:18:22 +0000 (09:18 -0400)]
vtysh: Make vtysh run as quagga user

vtysh should be run as the quagga user, else when
you execute a 'wr mem' the Quagga.conf and vtysh.conf
files are owned by whomever started the process.
This can cause file ownership issues.

Ticket: CM-10217
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib, zebra: Fix vrf new hook callback.
Donald Sharp [Thu, 31 Mar 2016 20:31:52 +0000 (16:31 -0400)]
lib, zebra: Fix vrf new hook callback.

This commit fixes two issues:

1) The creation of a new vrf from the cli was not calling the vrf_create hook.
This is fixed.

2) The zebra_vrf_delete callback was deleting interface information that
belonged to vrf not zvrf.  Remove the code as that it was not it's job
to do so.

Ticket: CM-10100
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoBGP: Enable multiple instance support by default
vivek [Fri, 1 Apr 2016 00:42:48 +0000 (17:42 -0700)]
BGP: Enable multiple instance support by default

Quagga BGP needed a config 'bgp multiple-instance' in order to be able
to configure and use VRFs. Since this support is intrinsic to the
implementation, make this configuration on by default. Corresponding
change to 'show running-config' (and write) to display only if "no" is
configured.

This change will eliminate one unnecessary step in the configuration.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-10070
Reviewed By: CCR-4383
Testing Done:  Manual

8 years agobgp: Order neighbor information in show run
Donald Sharp [Thu, 31 Mar 2016 16:41:58 +0000 (12:41 -0400)]
bgp: Order neighbor information in show run

When displaying the output of a 'show run',
display the neighbor information in an ordered
manner.

Ticket: CM-10184
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agobgpd: Add group pointer to peer_create function.
Donald Sharp [Thu, 31 Mar 2016 16:39:29 +0000 (12:39 -0400)]
bgpd: Add group pointer to peer_create function.

When creating a 'struct peer' add in the ability to set the peer group
associated with that peer.

Ticket: CM-10184
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib: Combine name comparison function
Donald Sharp [Thu, 31 Mar 2016 16:07:34 +0000 (12:07 -0400)]
lib: Combine name comparison function

The vrf name comparison function was the same as the interface
comparison function.  Combine the forces for the goodness of
mankind.

Ticket: CM-10184
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agozebra: Fix Startup with > 1k interfaces
Donald Sharp [Thu, 31 Mar 2016 12:20:53 +0000 (08:20 -0400)]
zebra: Fix Startup with > 1k interfaces

Zebra in rt_netlink.c has a while (1) loop that handles
recvmsg from the netlink socket.  In early bootup a
situation can occur whereby the netlink messages
take a long time to parse.  This time starts to
take an exponential amount of time the more netlink
messages that you read in.  There reaches
a point where the incoming netlink messages are
coming in at about the same rate that they are processed.
This ends up causing the while (1) loop to never exit.
Eventually this causes quagga to fail when the watchdog message
is never sent to systemd.

This patch attempts to address this deficiency in that
we allow for a pause from reading in netlink messages
to allow other work to be done.  This pause drains
the work queue items created by the netlink received
data and allows zebra to respond to other system input.

I believe we will need to come back in and modify zebra
startup a bit more.  There are ineffiencies that need
to be addressed as part of boot up.

Ticket: CM-9992
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 30 Mar 2016 12:15:21 +0000 (08:15 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Fix IPv6 static route config in a VRF
vivek [Wed, 30 Mar 2016 00:41:59 +0000 (17:41 -0700)]
Zebra: Fix IPv6 static route config in a VRF

When configuring an IPv6 static route with the nexthop as a link-local
IPv6 address, the associated interface has to be looked up in the correct
VRF.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-10169
Reviewed By: CCR-4382
Testing Done: Manual

8 years agoisisd: Fix more compiler warnings
Donald Sharp [Wed, 30 Mar 2016 00:40:03 +0000 (20:40 -0400)]
isisd: Fix more compiler warnings

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd, lib: Fix some more compiler warnings
Donald Sharp [Fri, 20 Nov 2015 14:05:46 +0000 (09:05 -0500)]
isisd, lib: Fix some more compiler warnings

A couple compiler warnings snuck in from the last
round of work being looked at.  This cleans them up

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: make send_lsp more robust
Christian Franke [Thu, 12 Nov 2015 13:24:28 +0000 (14:24 +0100)]
isisd: make send_lsp more robust

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Tested-by: NetDEF CI System <cisystem@netdef.org>
8 years agoisisd: fix misleading wording in log
Christian Franke [Tue, 10 Nov 2015 17:33:16 +0000 (18:33 +0100)]
isisd: fix misleading wording in log

The changed messages are actually located before transmission is
attempted. Therefore, the tense is somewhat misleading, especially
since transmission may not always succeed.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: handle lsp confusion (ISO/IEC 10589:2002 7.3.16.2)
Christian Franke [Tue, 10 Nov 2015 17:33:15 +0000 (18:33 +0100)]
isisd: handle lsp confusion (ISO/IEC 10589:2002 7.3.16.2)

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: fix IPv6 mask application
Christian Franke [Tue, 10 Nov 2015 17:33:14 +0000 (18:33 +0100)]
isisd: fix IPv6 mask application

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: show interface's ipv6 addreses
Christian Franke [Tue, 10 Nov 2015 17:33:13 +0000 (18:33 +0100)]
isisd: show interface's ipv6 addreses

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: provide more detailed log for failed address removal
Christian Franke [Tue, 10 Nov 2015 17:33:12 +0000 (18:33 +0100)]
isisd: provide more detailed log for failed address removal

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: add support to import routes from other protocols
Christian Franke [Thu, 12 Nov 2015 13:24:22 +0000 (14:24 +0100)]
isisd: add support to import routes from other protocols

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agolib: add function to get precise remaining time of timer thread
Christian Franke [Tue, 10 Nov 2015 17:04:41 +0000 (18:04 +0100)]
lib: add function to get precise remaining time of timer thread

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: fix assertion in LSP refresh timer calculation
Christian Franke [Tue, 10 Nov 2015 17:32:11 +0000 (18:32 +0100)]
isisd: fix assertion in LSP refresh timer calculation

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: add a slight delay to lsp_regenerate_schedule
Christian Franke [Tue, 10 Nov 2015 17:43:34 +0000 (18:43 +0100)]
isisd: add a slight delay to lsp_regenerate_schedule

isisd implements a holdoff interval and will refrain from regenerating
an lsp if the difference between the current time and its last refresh
is less than the holdoff interval. Instead, it will schedule a timer
to regenerate the lsp after the holdoff interval has passed.

This implementation has one disadvantage in the case where there is a
succession of calls to lsp_regenerate_schedule. In such a case, the
first call will trigger an immediate regeneration of the lsp, while the
other calls will only schedule the regeneration timer. This leads to
cases where it takes holdoff interval time for information to propagate,
just because the information was only available e.g. at the second call
of lsp_regenerate_schedule in such a succession of calls.

By not immediately regenerating an lsp if the last generation time
is sufficiently long ago, but instead scheduling the regeneration with a
very small delay, we allow all information from such a succession of
calls to be considered.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: add a debug mode that traces LSP construction
Christian Franke [Thu, 12 Nov 2015 13:21:47 +0000 (14:21 +0100)]
isisd: add a debug mode that traces LSP construction

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: purge on correct level
Christian Franke [Tue, 10 Nov 2015 17:21:44 +0000 (18:21 +0100)]
isisd: purge on correct level

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: allow to adjust lsp-mtu
Christian Franke [Tue, 10 Nov 2015 17:43:31 +0000 (18:43 +0100)]
isisd: allow to adjust lsp-mtu

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: Attached-bit in LSP header
Amritha Nambiar [Mon, 24 Aug 2015 23:40:14 +0000 (16:40 -0700)]
isisd: Attached-bit in LSP header

Set/reset attached-bit in LSP header:
    This patch provides support for set/reset attached_bit in the LSP header.
    In IS-IS networks, routing inter-area traffic from L1 areas is
    accomplished by sending the traffic to the nearest L1/L2 router.
    A L1/L2 router identifies itself by setting an attach-bit (ATT-bit) in its (LSP).

    The ATT-bit in LSP can be changed using the set-attached-bit or
    no-set-attached-bit commands (similar to â€˜set-overload-bit’ and
    'no set-overload-bit’) using telnet terminal in router configuration mode.

    Steps:
    enable
    configure terminal
    router isis <Routing area>
    set-attached-bit

    V2: Removed looping through area list as this well set the bit for all
        areas in the list. This implementation now looks exactly like the
        current overload bit implementation.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
8 years agoisisd: initialize circuit to match area is_type
Christian Franke [Tue, 10 Nov 2015 17:04:48 +0000 (18:04 +0100)]
isisd: initialize circuit to match area is_type

New circuits should be initialized to match the is_type
of their area. Also add an additional check to make sure
that no IIHs are sent for levels which are not enabled.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: do remove ipv6 routes from Zebra
Christian Franke [Tue, 10 Nov 2015 17:04:47 +0000 (18:04 +0100)]
isisd: do remove ipv6 routes from Zebra

We can abort isis_zebra_route_del_ipv6 if the route in question has
ISIS_ROUTE_FLAG_ZEBRA_SYNCED unset, meaning it's not in the kernel.
Aborting the function if the flag is set prevents us from removing
any routes.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: don't corrupt memory for long hostnames
Christian Franke [Thu, 12 Nov 2015 13:09:08 +0000 (14:09 +0100)]
isisd: don't corrupt memory for long hostnames

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: fix a typo in a log message
Christian Franke [Tue, 10 Nov 2015 17:04:45 +0000 (18:04 +0100)]
isisd: fix a typo in a log message

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: remove superfluous checks after XMALLOC etc.
Christian Franke [Tue, 10 Nov 2015 17:04:44 +0000 (18:04 +0100)]
isisd: remove superfluous checks after XMALLOC etc.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
8 years agoisisd: annotate some function arguments with const
Christian Franke [Tue, 10 Nov 2015 17:04:43 +0000 (18:04 +0100)]
isisd: annotate some function arguments with const

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoripd, isisd: fix warnings that make the build fail
Christian Franke [Tue, 10 Nov 2015 16:45:03 +0000 (17:45 +0100)]
ripd, isisd: fix warnings that make the build fail

These issues have been found by running buildtest.sh
using GCC 5.2.0 and Clang 3.7.0

Fixes pointer checks that can never be null

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoisisd: Fix LSPs not being regenerated after adjacency change
Michael Zingg [Fri, 26 Oct 2012 09:18:19 +0000 (11:18 +0200)]
isisd: Fix LSPs not being regenerated after adjacency change

In isisd LSP's are not regenerated after a change in adjacency if
lsp-gen-interval has expired.
I have tested this on Debian 6.0 with zebra and level1 isisd with point
to point links. This problem is also listed in Test ISIS-18.3 on the
opensourcerouting.org wiki:
http://confluence.isc.org/display/osr/ANVL+ISIS+Compliance+Test+Plan
http://confluence.isc.org/display/osr/ANVL+ISIS+Results

8 years agoisisd: Drop packet received on multiple interfaces due to the time gap in binding...
Amritha Nambiar [Wed, 14 Oct 2015 05:08:46 +0000 (22:08 -0700)]
isisd: Drop packet received on multiple interfaces due to the time gap in binding socket to an interface

Due to the time window between opening socket and binding it to an interface, the same hello
packet is delivered on multiple interfaces, unique socket per circuit is not yet established.
When such hellos get processed, they form incorrect adjacencies. So, drop the packet that is
received on multiple interfaces because the socket for the circuit is yet to bind to an interface.

V2: Fix warning on sign comparison

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
8 years agozebra: Use vrf name instead of vrf-id for router-id definition
Don Slice [Tue, 29 Mar 2016 19:43:57 +0000 (19:43 +0000)]
zebra: Use vrf name instead of vrf-id for router-id definition

Changed display/saving of global router-id to use the vrf name instead
of the vrf_id, since the vrf_id would get lost on quagga restart or
reboot.

Ticket: CM-10106
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agozebra: Use vrf name instead of vrf-id for ipv6 static route configuration
Don Slice [Tue, 29 Mar 2016 19:19:42 +0000 (19:19 +0000)]
zebra: Use vrf name instead of vrf-id for ipv6 static route configuration

Changed output of the "ipv6 route ... vrf red" to display and store with the
vrf name instead of the vrf_id, since the vrf_id would disappear on reboot
or quagga restart.

Ticket: CM-10126
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoZebra: Fix nexthops in IPv6 route display
vivek [Tue, 29 Mar 2016 05:10:44 +0000 (22:10 -0700)]
Zebra: Fix nexthops in IPv6 route display

Ticket: CM-10135
Reviewed By: Trivial
Testing Done: None

8 years agoBGP: Fix BGP unnumbered peerings across VRFs
vivek [Mon, 28 Mar 2016 16:37:39 +0000 (09:37 -0700)]
BGP: Fix BGP unnumbered peerings across VRFs

Upon receipt of incoming connection, a peer structure (doppelganger) is
created internally and the connection processed for it. The problem is
that in the case of BGP unnumbered, the sockunion structure within BGP was
being updated (in peer_create()) prior to the peer's flags being updated,
so it didn't take into account the 'v6only' configuration. This results
in subsequent problems when bgp_bind() is done - the socket ends up being
bound to the BGP instance instead of the interface.

In the case of an incoming connection, we should just use the addresses
on which the connection was setup/accepted, there is no need to attempt to
derive it again. Further, there is no need to attempt to update addresses
at the time of peer_create() since that is done when the connection is
attempted in bgp_start().

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-10028
Reviewed By: CCR-4373
Testing Done: Manual, bgpsmoke

8 years agolib: zclient can overflow (struct interface) hw_addr if zebra is evil
Paul Jakma [Mon, 8 Feb 2016 14:46:28 +0000 (14:46 +0000)]
lib: zclient can overflow (struct interface) hw_addr if zebra is evil

* lib/zclient.c: (zebra_interface_if_set_value) The hw_addr_len field
  is used as trusted input to read off the hw_addr and write to the
  INTERFACE_HWADDR_MAX sized hw_addr field.  The read from the stream is
  bounds-checked by the stream abstraction, however the write out to the
  heap can not be.

  Tighten the supplied length to stream_get used to do the write.

  Impact: a malicious zebra can overflow the heap of clients using the ZServ
  IPC.  Note that zebra is already fairly trusted within Quagga.

Reported-by: Kostya Kortchinsky <kostyak@google.com>
8 years agobgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked length
Donald Sharp [Wed, 27 Jan 2016 16:54:45 +0000 (16:54 +0000)]
bgpd: Fix VU#270232, VPNv4 NLRI parser memcpys to stack on unchecked length

Address CERT vulnerability report VU#270232, memcpy to stack data structure
based on length field from packet data whose length field upper-bound was
not properly checked.

This likely allows BGP peers that are enabled to send Labeled-VPN SAFI
routes to Quagga bgpd to remotely exploit Quagga bgpd.

Mitigation: Do not enable Labeled-VPN SAFI with untrusted neighbours.

Impact: Labeled-VPN SAFI is not enabled by default.

* bgp_mplsvpn.c: (bgp_nlri_parse_vpnv4) The prefixlen is checked for
  lower-bound, but not for upper-bound against received data length.
  The packet data is then memcpy'd to the stack based on the prefixlen.

  Extend the prefixlen check to ensure it is within the bound of the NLRI
  packet data AND the on-stack prefix structure AND the maximum size for the
  address family.

Reported-by: Kostya Kortchinsky <kostyak@google.com>
This commit a joint effort between:

Lou Berger <lberger@labn.net>
Donald Sharp <sharpd@cumulusnetworks.com>
Paul Jakma <paul.jakma@hpe.com> / <paul@jakma.org>

8 years agolib: Really fix handling of poll
Donald Sharp [Mon, 28 Mar 2016 12:07:08 +0000 (08:07 -0400)]
lib: Really fix handling of poll

This fix is just the actual point fix of the poll event handling.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoRevert "lib: Fix handling of poll"
Donald Sharp [Mon, 28 Mar 2016 12:04:48 +0000 (08:04 -0400)]
Revert "lib: Fix handling of poll"

This reverts commit cc7165b62a3e44aabdac4cb2d3cfe31dac0dab67.

This commit was causing crashes.

8 years agoQuagga: Fix VRF lookup by name
vivek [Sat, 26 Mar 2016 02:52:49 +0000 (19:52 -0700)]
Quagga: Fix VRF lookup by name

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-10098
Reviewed By: CCR-4368
Testing Done: Verified on failed node

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 25 Mar 2016 17:07:40 +0000 (13:07 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agolib: Fix handling of poll
Donald Sharp [Fri, 25 Mar 2016 15:41:44 +0000 (11:41 -0400)]
lib: Fix handling of poll

poll returns the number of revents that we need to handle
in the array.  revent is a bit field of events that need
to be handled.  thread.c was treating each sub item in the
bitfield as a separate item to handle.

As such the loop over the pollfds would quit early
sometimes.

Ticket: CM-10077
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agolib: Size the pollfds array once
Donald Sharp [Fri, 25 Mar 2016 15:26:20 +0000 (11:26 -0400)]
lib: Size the pollfds array once

The pollfds was being resized if the # of fds grew to
be more than the original array size.  Just size it
once.

Ticket: CM-10077
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoBGP: Enhance clear commands for VRFs
vivek [Fri, 25 Mar 2016 16:07:59 +0000 (09:07 -0700)]
BGP: Enhance clear commands for VRFs

Fix and enhance the entire hierarchy of clear commands in BGP to work
for VRFs.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9945
Reviewed By: CCR-4360
Testing Done: Manual (brief)

8 years agozebra: add or delete router-id when interface moves vrfs
Don Slice [Thu, 24 Mar 2016 15:40:50 +0000 (15:40 +0000)]
zebra: add or delete router-id when interface moves vrfs

When an interface changes which vrf it is part of, it needs to be added
to the list of possible router-id choices in the new vrf and removed
from the old vrf/default.

Ticket: CM-9074
Signed-off-by: Don Slice
Reviewed-by: Vivek Venkatraman
8 years agoZebra: Fix handling of larger table-ids
vivek [Fri, 25 Mar 2016 05:01:11 +0000 (22:01 -0700)]
Zebra: Fix handling of larger table-ids

Zebra code was not handling larger table-ids correctly. There were 2 issues:

a) In the netlink interface, RTA_TABLE was never sent or processed. This
pretty much limited the table-ids that zebra could understand to < 255.

b) In the interface into the zebra RIB (in particular for protocols), there
were some incorrect checks that again assumed the table id should be < 252
or be "main". This is valid only for the Default VRF (for now), for other
VRFs, the table-id should be the value learnt from the kernel.

These two issues are addressed with this change.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-10087, CM-10091
Reviewed By: CCR-4359
Testing Done: Manual

8 years agobgpd, lib, ospfd, ospf6d: Fix bfd interface lookup
Donald Sharp [Thu, 24 Mar 2016 13:03:02 +0000 (06:03 -0700)]
bgpd, lib, ospfd, ospf6d: Fix bfd interface lookup

bfd was receiving a callback with an interface name string
but was ignoring the passed in vrf to find the ifp pointer.
This commit fixes that code path in bfd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
8 years agobgpd, lib, zebra: Add ability to retrieve ifp without specifying a vrf
Donald Sharp [Wed, 23 Mar 2016 19:38:30 +0000 (12:38 -0700)]
bgpd, lib, zebra: Add ability to retrieve ifp without specifying a vrf

There are cases where we get an interface name but do not have a
corresponding vrf.  We care about getting an interface pointer
so just provide a function that searches all vrf's for the ifp.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Radhicak Mahankali <radhika@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agoRevert "Fixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopb...
Donald Sharp [Wed, 23 Mar 2016 13:20:22 +0000 (06:20 -0700)]
Revert "Fixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopback addresses"

This reverts commit a7928d3ac43b9bd892280f8b12f73d269b8266a8.

This code change breaks allot of tests that have hard coded the
distance.  We'll unrevert this after the 3.0 release window.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Some small modifications to actually delete the vrf
Donald Sharp [Tue, 22 Mar 2016 21:03:04 +0000 (17:03 -0400)]
zebra: Some small modifications to actually delete the vrf

zebra was not actually deleting the vrf passed in.

Ticket: CM-9412
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agozebra: Replace vrf with zebra_vrf in a few places
Donald Sharp [Tue, 22 Mar 2016 20:37:17 +0000 (16:37 -0400)]
zebra: Replace vrf with zebra_vrf in a few places

We were incorrectly using vrf instead of zebra_vrf in a
few spots.

Ticket: CM-9412
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoRDNBRD: Change default distance of imported table routes to 15
Daniel Walton [Tue, 22 Mar 2016 19:04:58 +0000 (19:04 +0000)]
RDNBRD: Change default distance of imported table routes to 15

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

The 'redistribute neighbor' feature is the primary use case for
importing table routes.  We need the redistribute neighbor routes to
have a lower admin distance than eBGP so that the local table routes are
preferred (if the host is dual homed we could also learn about it via eBGP).

8 years agoQuagga: Make routemap updates or deletes work for VRFs
vivek [Tue, 22 Mar 2016 17:46:30 +0000 (17:46 +0000)]
Quagga: Make routemap updates or deletes work for VRFs

Updates to routemaps and delete of the routemap were not working properly
for VRFs. This was because while routemaps are global, the routemap update
processing timer and the processing were at the per-instance level. This
approach was unable to handle processing for multiple instances as the
routemap has no tracking of which instances are still pending processing.
This lead to the processing happening correctly only for the first instance
- which could be the default instance or some other instance. It could also
result in reference to freed memory for an instance.

The fix done is to make the update/delete processing also global and not per
instance. This means that the route-map delay timer will be global and a global
thread will handle the change (or delete) for all instances instead of spawning
a separate thread for each instance. To support this, a global BGP command
"bgp route-map delay-timer <value>" has been implemented. The existing command
per-instance is not deleted but will update the global timer.

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

8 years agoZebra: Restrict IPv6 RA to valid interfaces
vivek [Tue, 22 Mar 2016 16:52:35 +0000 (16:52 +0000)]
Zebra: Restrict IPv6 RA to valid interfaces

Restrict interfaces on which IPv6 Router Advertisements are allowed. The list
excludes loopback interfaces including the VRF device interface; specific to
Cumulus, it also includes "switch0" and "ethX" interfaces.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9849
Reviewed By: CCR-4334
Testing Done: Manual

8 years agoquagga: Setup the proper version number in quagga
Donald Sharp [Tue, 22 Mar 2016 12:29:11 +0000 (08:29 -0400)]
quagga: Setup the proper version number in quagga

Fix configure.ac to have the proper cumulus version #.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoquagga: delete interface from default table when moved to vrf
Don Slice [Fri, 18 Mar 2016 19:53:15 +0000 (19:53 +0000)]
quagga: delete interface from default table when moved to vrf

All daemons changed to flag an interface that has been moved to a vrf as DELETED instead of INTERNAL.
When they were flagged as IFINDEX_INTERNAL, ospf, rip, and isis would re-install them in the default
assuming that they were being "pre-defined" before the kernel definitions.

Ticket: CM-9265
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoospf6d: Stop sending hello's out loopback interface
Donald Sharp [Fri, 18 Mar 2016 16:40:12 +0000 (12:40 -0400)]
ospf6d: Stop sending hello's out loopback interface

Currently if you have this setup:

router ospf6
interface lo area 0.0.0.0

Ospf is scheduling and sending hello's out the loopback interface:
2016/03/18 15:26:12.463248 OSPF6: Could not send entire message
2016/03/18 15:26:22.463475 OSPF6: sendmsg failed: ifindex: 1: Network is unreachhable (101)

Adding a check to not schedule hello's for a loopback interface resolves this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agobgpd: Fix initialization check for bgp tests
root [Fri, 18 Mar 2016 13:18:33 +0000 (13:18 +0000)]
bgpd: Fix initialization check for bgp tests

With the vrf startup code put in place we've modified
bgp startup.  If we are running inside of the 'make check'
infrastructure zclient is going to be NULL since it is
not initialized yet nor do we really want to connect
to zebra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agotests: Fixup startup of tests so they don't core
Donald Sharp [Fri, 18 Mar 2016 01:41:46 +0000 (01:41 +0000)]
tests: Fixup startup of tests so they don't core

Tests were not even compiling due to non updated API changes.
Additionally tests were core'ing after compile issue
because the vrf subsystem is being used now and it
needs to be initialized.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMakfile issues to compile better
Donald Sharp [Fri, 18 Mar 2016 01:09:47 +0000 (01:09 +0000)]
Makfile issues to compile better

During some tests of the release I noticed that we
have some issues with it properly building due
to missing information in the Makefile.am files

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: fix MIN/MAX macros to not double-eval
David Lamparter [Sat, 12 Mar 2016 18:58:09 +0000 (19:58 +0100)]
lib: fix MIN/MAX macros to not double-eval

cf. https://gcc.gnu.org/onlinedocs/gcc/Typeof.html
(Works on all compilers on Quagga's compiler support list in
doc/overview.texi)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoFixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopback...
kitty [Fri, 19 Feb 2016 05:33:40 +0000 (21:33 -0800)]
Fixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopback addresses

Change-Id: Iff33d70089d1393bf3e9c757d9e9faf134699121
Signed-off-by: kitty <khiruthigai.balasubramanian@hpe.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoUpdate ripng_zebra.c
Hongguang Li [Mon, 22 Feb 2016 03:46:36 +0000 (11:46 +0800)]
Update ripng_zebra.c

Make route redistribution not go through del/add cycle during updates

8 years agoospfd: Fix Dereference of Null Pointer during config
Donald Sharp [Thu, 17 Mar 2016 21:26:46 +0000 (17:26 -0400)]
ospfd: Fix Dereference of Null Pointer during config

This construct:

struct ospf *ospf = vty->index;
if (!ospf)
  return CMD_SUCCESS;

Is present throughout the entire ospfd code base.  The command:
distance ospf external 255

Is not protected by this construct. I added this construct
to the command and in addition did a quick search to find
any others not protected and to protect them.

Ticket: CM-9725
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agolib: Fix assert in node_parent()
Donald Sharp [Thu, 17 Mar 2016 20:12:55 +0000 (16:12 -0400)]
lib: Fix assert in node_parent()

With this sequence of commands in a conf file:
router bgp X
address-family ipv4
exit
address-family ipv6
exit

When the bgp AS # is currently configured as !X and the
'vtysh -b -f <conf file above>' command run, vtysh will
crash with an assert.

This commit fixes that issue.

Ticket: CM-9852
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoquagga: Netlink error message following Notification send
Daniel Walton [Wed, 16 Mar 2016 20:56:15 +0000 (20:56 +0000)]
quagga: Netlink error message following Notification send

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9501

8 years agoBGP: Fix linkage between BGP instance and VRF structure
vivek [Wed, 16 Mar 2016 20:38:31 +0000 (20:38 +0000)]
BGP: Fix linkage between BGP instance and VRF structure

The issue here has to do with the fact that VRFs (like interfaces) are not
actually getting deleted when they are removed - they remain present. This
leads to situations in which BGP may try to unlink more than once, which
messes up the reference count (lock) in the BGP instance.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-9419
Reviewed By: CCR-4302
Testing Done: Manual, also verified by Atul

<DETAILED DESCRIPTION (REPLACE)>

8 years agoBGP: Check in multipath comparison before invoking sockunion_cmp
vivek [Sun, 13 Mar 2016 06:03:10 +0000 (06:03 +0000)]
BGP: Check in multipath comparison before invoking sockunion_cmp

During route selection for Multipath routes, when multiple peers are
flapping, it is possible that the old (former) multipath list of routes
for a destination may include routes from peers which are no longer in
Established state. When the new multipath list is compared against the
old list to identify changes, additional checks are needed to avoid
comparing connection addresses if the peer is not in Established state.
This patch introduces those checks.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9671
Reviewed By: CCR-4277
Testing Done: Manual (problem could not be replicated to verify)

8 years agoBGP: remove deprecated debugs from the parser
Daniel Walton [Fri, 11 Mar 2016 16:33:58 +0000 (16:33 +0000)]
BGP: remove deprecated debugs from the parser

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

8 years agoshow bgp neighbor should accept peer hostname
Daniel Walton [Thu, 10 Mar 2016 22:14:08 +0000 (22:14 +0000)]
show bgp neighbor should accept peer hostname

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9616

8 years agotools: Fix runtime error in quagga script
Donald Sharp [Thu, 10 Mar 2016 16:10:20 +0000 (11:10 -0500)]
tools: Fix runtime error in quagga script

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Thu, 10 Mar 2016 13:49:47 +0000 (08:49 -0500)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agodoc: Update man page for Quagga systemctl script
Donald Sharp [Thu, 10 Mar 2016 03:52:40 +0000 (22:52 -0500)]
doc: Update man page for Quagga systemctl script

Create the man page for the quagga systemctl script.

Ticket: CM-9748
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agotools: Fixup quagga systemd script to be less chatty
Donald Sharp [Thu, 10 Mar 2016 12:51:19 +0000 (07:51 -0500)]
tools: Fixup quagga systemd script to be less chatty

The quagga startup script was invoking systemctl and
systemctl was being very chatty in return.

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