]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years agoconfig: Remove unused library check
Donald Sharp [Wed, 3 Feb 2016 02:11:40 +0000 (21:11 -0500)]
config: Remove unused library check

configure.ac is looking for the setproctitle library,
which while it might be useful, we never call setproctitle
or any other function that the library might expose.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Removed unused variable from 'struct attr_extra'
Donald Sharp [Wed, 3 Feb 2016 02:02:42 +0000 (21:02 -0500)]
bgpd: Removed unused variable from 'struct attr_extra'

The mp_nexthop_local_in variable is never used.  Remove it
from the code base.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovtysh: Fix vrf submode to call correct daemons
Donald Sharp [Tue, 2 Feb 2016 14:28:23 +0000 (06:28 -0800)]
vtysh: Fix vrf submode to call correct daemons

The vrf-submode was incorrectly calling sub-daemons that it
should not be doing so.

Ticket: CM-9076
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Testing: See Bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Add the ability to use a VRF to bgp
Donald Sharp [Tue, 2 Feb 2016 12:36:20 +0000 (04:36 -0800)]
bgpd: Add the ability to use a VRF to bgp

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
8 years agovtysh: Add VRF sub-mode
Donald Sharp [Tue, 2 Feb 2016 12:34:29 +0000 (04:34 -0800)]
vtysh: Add VRF sub-mode

Add the VRF submode to vtysh.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
8 years agolib: Add callbacks for vrf changes into protocol side
Donald Sharp [Mon, 1 Feb 2016 20:11:39 +0000 (12:11 -0800)]
lib: Add callbacks for vrf changes into protocol side

Allow protocols to get callbacks associated with vrf's

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, zebra: The Bulk of the conversion over to NS and VRF
Donald Sharp [Mon, 1 Feb 2016 18:55:42 +0000 (10:55 -0800)]
lib, zebra: The Bulk of the conversion over to NS and VRF

Convert the rest of zebra over to use a Namespae and VRF.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Add the 'struct zebra_ns' data structure
Donald Sharp [Mon, 1 Feb 2016 17:56:42 +0000 (09:56 -0800)]
zebra: Add the 'struct zebra_ns' data structure

This commit adds the 'struct zebra_ns' data structure.
We are not currently using it.  But pretty much
everything after this commit in zebra depends on it.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Allow vrf under the cli
Donald Sharp [Mon, 1 Feb 2016 17:38:33 +0000 (09:38 -0800)]
lib: Allow vrf under the cli

Add the infrastructure to allow the vrf keyword.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib, zebra: Abstract vrf.c to handle both vrf_id_t and char *name
Donald Sharp [Mon, 1 Feb 2016 17:09:51 +0000 (09:09 -0800)]
lib, zebra: Abstract vrf.c to handle both vrf_id_t and char *name

Abstract vrf.c code to allow pass in a vrf name as well as to
start the coding of how namespaces and vrf's will interact.

Signed-off-by: Vipin Kumar <vipin@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agodebian: Use 256 multipaths
Donald Sharp [Wed, 27 Jan 2016 16:28:14 +0000 (08:28 -0800)]
debian: Use 256 multipaths

Turn on the ability for Quagga to use 256 multipaths

Ticket: CM-8098
Reviewed-by: Daniel Walton and Don Slice
Testing: Hand tested

8 years agobgpd, ripngd, zebra: Remove duplicate PSIZE define
Donald Sharp [Tue, 26 Jan 2016 16:41:52 +0000 (08:41 -0800)]
bgpd, ripngd, zebra: Remove duplicate PSIZE define

The PSIZE macro is defined the same in multiple places.  Remove
the duplicates.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix buffer overflow error in bgp_dump_routes_func
Evgeny Uskov [Wed, 13 Jan 2016 10:58:00 +0000 (13:58 +0300)]
bgpd: Fix buffer overflow error in bgp_dump_routes_func

Now if the number of entries for some prefix is too large, multiple TABLE_DUMP_V2 records are created.
In the previous version in such situation bgpd crashed with SIGABRT.

8 years agobgpd: Fix description of the command "dump bgp ..."
Evgeny Uskov [Mon, 25 Jan 2016 14:06:38 +0000 (17:06 +0300)]
bgpd: Fix description of the command "dump bgp ..."

8 years agobgpd: Fix 'show bgp ipv4 vpnv4 statistics' cli
Donald Sharp [Tue, 26 Jan 2016 14:57:17 +0000 (06:57 -0800)]
bgpd: Fix 'show bgp ipv4 vpnv4 statistics' cli

When attempting to use the 'show bgp ipv4 vpnv4 statistics' cli, the safi
choosen is BGP_MPLS_LABELED_VPN which is #defined to 128.  The afi/safi
combination is fed to bgp->rib, which limits the size of the safi to BGP_SAFI_MAX
which is #defined to 5.   The correct value to use is BGP_MPLS_VPN

The bgp code differentiates between the actual safi value for BGP_MPLS_LABELED_VPN
used defined by RFC 4364, to a internal SAFI value used to limit array size.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Mon, 25 Jan 2016 19:39:10 +0000 (11:39 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoBGP: Rework iteration of peer_af_array
vivek [Fri, 22 Jan 2016 18:56:48 +0000 (10:56 -0800)]
BGP: Rework iteration of peer_af_array

While processing references to the macro PEERAF_FOREACH(), aggressive loop
optimization by gcc 4.9.x (probably 4.8 and greater) was resulting in the
generated code not checking on the index as well as eliminating some code.
This was leading to a dereference of invalid memory when a BGP peer came up.

The fix is to scrap this convoluted macro. Two other changes done are to
eliminate overloading of "afindex" and make the loop iterator an integer.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-8889
Reviewed By: CCR-4018
Testing Done: Verified failure scenario

Note: This code was added as part of update-groups implementation; when
upstreaming update-groups, this patch should also be included.

8 years agolib: Allow zclient do-over of connect on initial attempt
Donald Sharp [Fri, 22 Jan 2016 15:46:08 +0000 (10:46 -0500)]
lib: Allow zclient do-over of connect on initial attempt

When a protocol is attempting to connect to the zebra daemon
through it's socket.  If the inital attempt fails, give it a
few more attempts before giving up and leaving the daemon in
a bizarre state.

This problem was found by Ashley Penney, and Ashley was of
immense help in debugging and testing the fix for this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Tested-by: Ashley Penney <apenney@ntoggle.com>
8 years agoospf6d: Fix double increment of Sequence Number
Donald Sharp [Thu, 14 Jan 2016 14:19:29 +0000 (09:19 -0500)]
ospf6d: Fix double increment of Sequence Number

When OSPF6 is creating the header for the ROUTER LSA type
if the packet being sent has interface information to add
to the data, the Sequence Number is at least double incremented.

This change moves the header creation to outside the loop over
all interfaces in the area.  Additionally the header is created
at the bottom of the function now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Fix work-quanta to be a reasonable value
Donald Sharp [Mon, 18 Jan 2016 17:44:52 +0000 (09:44 -0800)]
bgpd: Fix work-quanta to be a reasonable value

The work-quanta that a user can specify is ~4billion.  If a user
specifies such a large value this translates into processing 4billion
outgoing packets before moving onto the next interface.  This makes
no sense.  Reduce the value of allowed work quanta's to be between
1 and 10000.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
8 years agoBGP: ebgp-multihop should accept a value up to 255
Daniel Walton [Thu, 14 Jan 2016 15:25:32 +0000 (15:25 +0000)]
BGP: ebgp-multihop should accept a value up to 255

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

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 13 Jan 2016 18:51:07 +0000 (10:51 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agodoc, vtysh: Fixup of history handling
Donald Sharp [Wed, 13 Jan 2016 18:49:50 +0000 (10:49 -0800)]
doc, vtysh: Fixup of history handling

This fix does two things:

1) If the ${HOME}/.history_quagga file does not exist, create it
for history storing.
2) Allow vtysh -c "..." commands to be stored in history file
as well

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib:removed onmatch next and onmatch goto from route-map deny
Don Slice [Wed, 13 Jan 2016 14:02:46 +0000 (06:02 -0800)]
lib:removed onmatch next and onmatch goto from route-map deny

Ticket: CM-7566
Reviewed By: Daniel Walton, Donald Sharp
Testing Done: Manual testing - see bug

Since on a route-map deny clause, the route-map will end on match, the on-match next and on-match goto statements are meaningless and confusing.  Removed them.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoBGP: Fix maximum-prefix output in running-config
vivek [Fri, 8 Jan 2016 07:22:33 +0000 (23:22 -0800)]
BGP: Fix maximum-prefix output in running-config

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-8480
Reviewed By: CM-3953
Testing Done: Manual verification (on PPC)

8 years agoBGP: Only accept prefixes for negotiated address families
vivek [Fri, 8 Jan 2016 06:14:38 +0000 (22:14 -0800)]
BGP: Only accept prefixes for negotiated address families

When handling a received Update message, only process and store the
prefixes if the corresponding address family has been negotiated with
the peer. Prior to this change, the receive processing only checked
whether the address family was locally configured, trusting to the peer
to not advertise prefixes for an address family that has not been
negotiated. Most implementations conform to this but a misbehavior could
result in processing and memory overhead.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-5594
Reviewed By: CCR-3946
Testing Done: Sanity test (good case)

8 years agoBGP: Ignore unexpected values in ENHE capability
vivek [Fri, 8 Jan 2016 06:00:03 +0000 (22:00 -0800)]
BGP: Ignore unexpected values in ENHE capability

Silently ignore (without sending a Notification) unexpected values
of AFI, SAFI or Nexthop AFI received in the Extended Next Hop Encoding
capability (defined in RFC 5549). While this RFC only defines certain
values as allowed, that may be changed by a future spec.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-5975
Reviewed By: CCR-3947
Testing Done: test_fuzz 1.11, 1.12 and 1.13

8 years agoBGP: Fix Notification for errors in OPEN message
vivek [Fri, 8 Jan 2016 05:36:07 +0000 (21:36 -0800)]
BGP: Fix Notification for errors in OPEN message

Ensure that when the received OPEN message has errors, NOTIFICATION is
generated with the proper error code.

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

Note: This fix should be sent upstream.

8 years agodebian: Remove unnecessary dependency on cl-utilties
Donald Sharp [Wed, 16 Dec 2015 01:24:26 +0000 (17:24 -0800)]
debian: Remove unnecessary dependency on cl-utilties

The cl-utilities dependency were causing issues in two situations:

A) The cl-utilities package name has been changed but the quagga
cmaster branch was being built on two different branches, one
with the old name, one with the new name

B) People installing quagga on non-cumulus switches were experiencing
issues due to cl-utilities not being installed.  This was especially
true if they built quagga from our source code.  We only need
cl-utilities for the startt-stop-daemon wrapper so that we could
have jdoo watch watchquagga.  This is not a big deal if people are
missing this.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Fix crash in connected.c due to RA change
Donald Sharp [Tue, 15 Dec 2015 13:22:48 +0000 (05:22 -0800)]
zebra: Fix crash in connected.c due to RA change

Back out original null pointer fix targeted it was the wrong fix.

Basically when a ip address is deleted the RA code was waiting till after
the connected pointer was deleted to set the RA appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agozebra: Crash upon disabling a link
Daniel Walton [Mon, 14 Dec 2015 19:40:27 +0000 (19:40 +0000)]
zebra: Crash upon disabling a link

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

8 years agoQuagga: make check is broken with addpath changes
Daniel Walton [Fri, 11 Dec 2015 21:12:56 +0000 (21:12 +0000)]
Quagga: make check is broken with addpath changes

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

The first as-path is what the original as-path for the test, the second
is what the as-path should look like once all confed SETs and SEQs have
been removed. At the time the test was written quagga did not correctly
remove confed SETs and SEQs but whoever wrote the test didn't notice
this and assumed that the behavior they were seeing was correct so used
that output to populate the second as-path.

Now that we do correctly remove the confed parts these tests fail. So
the fix is to update the second as-path for these two tests so that they
no longer contain any confed SETs/SEQs.

8 years agozebra: Reorganize NHT code
vivek [Wed, 9 Dec 2015 19:01:21 +0000 (11:01 -0800)]
zebra: Reorganize NHT code

NextHop Tracking (NHT) is a significant function introduced into Quagga
by Cumulus. Initially intended for tracking BGP nexthops, this has been
extended subsequently to also cater to nexthops for static routes, BGP
peer reachability tracking and BGP route tracking for routes to be
imported into BGP.

This patch reorganizes the code a bit to make it easier to follow and
maintain. No functional changes introduced.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Ticket: CM-5599
Reviewed By: CCR-3906
Testing Done: Manual and bgpsmoke

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 9 Dec 2015 12:26:55 +0000 (04:26 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agozebra, bgp: Remove some missed values
Donald Sharp [Wed, 9 Dec 2015 12:26:02 +0000 (04:26 -0800)]
zebra, bgp: Remove some missed values

There were a few instances of missed values for XXX_IFNAME.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Wed, 9 Dec 2015 01:01:20 +0000 (17:01 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Schedule RIB processing based on trigger event
vivek [Wed, 9 Dec 2015 00:55:43 +0000 (16:55 -0800)]
Zebra: Schedule RIB processing based on trigger event

Currently, when RIB processing is initiated (i.e., by calling rib_update()),
all routes are queued for processing. This is not desirable in all situations
because, sometimes the protocol may have an alternate path. In addition,
with NHT tracking nexthops, there are situations when NHT should be kicked
off first and that can trigger subsequent RIB processing.

This patch addresses this by introducing the notion of a trigger event. This
is only for the situation when the entire RIB is walked. The current triggers
- based on when rib_update() is invoked - are "interface change" and "route-
map change". In the former case, only the relevant routes are walked and
scheduled, in the latter case, currently all routes are scheduled for
processing.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-7662
Reviewed By: CCR-3905

Note: The initial defect in this area was CM-7420. This was addressed in
2.5.4 with an interim change that only walked static routes upon interface
down. The change was considered a bit risky to do for interface up etc. Also,
this did not address scenarios like CM-7662. The current fix addresses CM-7662.

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Tue, 8 Dec 2015 23:26:56 +0000 (15:26 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Eliminate unnecessary del-add upon static route addition
vivek [Tue, 8 Dec 2015 23:04:48 +0000 (15:04 -0800)]
Zebra: Eliminate unnecessary del-add upon static route addition

When static routes are added, they get processed and potentially installed
in the RIB once. Subsequently, NHT is invoked and ends up scheduling the
route for processing again because this is the first time the nexthop is
resolved for NHT. This used to result in a del-add earlier (as noted in
the defect), but is a replace now. This change eliminates the unnecessary
replace by ensuring NHT is invoked first if the static route has a nexthop
that will be tracked by NHT.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Ticket: CM-4573
Reviewed By: CCR-3903
Testing Done: Manual and bgpsmoke

Note: Updates/improves static route NHT patch(es).

8 years agoBGP: update-group needs to consider addpath capability flags
Daniel Walton [Tue, 8 Dec 2015 18:30:55 +0000 (18:30 +0000)]
BGP: update-group needs to consider addpath capability flags

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

8 years agobgpd: Modify maxpaths cli's to use MULTIPATH_NUM for range
Donald Sharp [Tue, 8 Dec 2015 17:08:46 +0000 (17:08 +0000)]
bgpd: Modify maxpaths cli's to use MULTIPATH_NUM for range

Modify the various maxpath commands to use MULTIPATH_NUM
as the upper limit of allowed max paths in BGP.  There
is no point in allowing a number of maximum paths greater
than what Quagga is compiled for.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Add CMD_RANGE_STR macro to command.h
Donald Sharp [Tue, 8 Dec 2015 17:06:42 +0000 (17:06 +0000)]
lib: Add CMD_RANGE_STR macro to command.h

Allow the auto-generation of a "<X-Y>" string for cli handline.
Where X or Y can be a #define.

CMD_RANGE_STR(LOW, HIGH) translates to:
"<4-99>"

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Convert BGP_MAXIMUM_MAXPATHS to MULTIPATH_NUM
Donald Sharp [Tue, 8 Dec 2015 14:19:39 +0000 (14:19 +0000)]
bgpd: Convert BGP_MAXIMUM_MAXPATHS to MULTIPATH_NUM

There is no point in allowing more BGP_MAXIMUM_MAXPATHS than
MULTIPATH_NUM.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Use actual MULTIPATH_NUM as the limitor
Donald Sharp [Tue, 8 Dec 2015 13:42:36 +0000 (13:42 +0000)]
bgpd: Use actual MULTIPATH_NUM as the limitor

BGP uses a second #define that is equal to MULTIPATH_NUM.  There
is no point in having a different #define.  Just consolidate.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobuild: Make MULTIPATH_NUM a config.h value
Donald Sharp [Tue, 8 Dec 2015 15:34:04 +0000 (15:34 +0000)]
build: Make MULTIPATH_NUM a config.h value

MULTIPATH_NUM is setup inside of the Makefile.am DEFS to pass
in on the command line.  This fix moves the MULTIPATH_NUM
from there into config.h.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoEnable IPv6 ND RA for interfaces that have an IPv6 address
Daniel Walton [Mon, 7 Dec 2015 21:05:34 +0000 (13:05 -0800)]
Enable IPv6 ND RA for interfaces that have an IPv6 address

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

8 years agoBGP bestpath debugs need to display the addpath RX ID
Daniel Walton [Mon, 7 Dec 2015 19:56:02 +0000 (11:56 -0800)]
BGP bestpath debugs need to display the addpath RX ID

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

Output with fix

2015/12/07 09:47:41.342932 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) and path 10.0.0.7 (addpath rxid 2) are equal via matching aspaths
2015/12/07 09:47:41.342966 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) wins over path 10.0.0.7 (addpath rxid 2) due to Router-ID comparison
2015/12/07 09:47:41.342978 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 4) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.342988 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 4) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.342999 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 5) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343008 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 5) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343019 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 6) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343029 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 6) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343039 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 7) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343048 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 7) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343058 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) is the bestpath from AS 0
2015/12/07 09:47:41.343068 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) is the initial bestpath
2015/12/07 09:47:41.343077 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) is the bestpath, now find multipaths
2015/12/07 09:47:41.343088 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 2) has the same nexthop as the bestpath, skip it
2015/12/07 09:47:41.343097 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 3) is the bestpath, add to the multipath list
2015/12/07 09:47:41.343109 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 4) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343119 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 4) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343127 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 4) is equivalent to the bestpath, add to the multipath list
2015/12/07 09:47:41.343139 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 5) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343164 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 5) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343173 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 5) is equivalent to the bestpath, add to the multipath list
2015/12/07 09:47:41.343186 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 6) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343196 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 6) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343205 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 6) is equivalent to the bestpath, add to the multipath list
2015/12/07 09:47:41.343217 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 7) and path 10.0.0.7 (addpath rxid 3) are equal via matching aspaths
2015/12/07 09:47:41.343227 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 7) loses to path 10.0.0.7 (addpath rxid 3) due to Router-ID comparison
2015/12/07 09:47:41.343236 BGP: 1.1.1.1/32: path 10.0.0.7 (addpath rxid 7) is equivalent to the bestpath, add to the multipath list
2015/12/07 09:47:41.343254 BGP: 1.1.1.1/32 add mpath nexthop 34.34.34.34 path 10.0.0.7 (addpath rxid 4)
2015/12/07 09:47:41.343268 BGP: 1.1.1.1/32 add mpath nexthop 56.56.56.56 path 10.0.0.7 (addpath rxid 6)

8 years agoZEBRA: Remove NEXTHOP_TYPE_XXX_IFNAME
Donald Sharp [Fri, 4 Dec 2015 17:52:49 +0000 (12:52 -0500)]
ZEBRA: Remove NEXTHOP_TYPE_XXX_IFNAME

The NEXTHOP_TYPE_XXX_IFNAME types were never being used.  Remove them
and the code associated with them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agozebra: Remove STATIC_XXX_IFNAME and use _IFINDEX
Donald Sharp [Fri, 4 Dec 2015 17:34:42 +0000 (12:34 -0500)]
zebra: Remove STATIC_XXX_IFNAME and use _IFINDEX

When we get a static route through an interface convert the interface
name to an ifindex and pass it through to zebra_rib.c. zebra_rib.c
should not care about the ifname.

This code change will allow us to collapse some of the NEXTHOP_XXX types.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoDebian: Fixup build issues with switch to 3.0
Donald Sharp [Wed, 2 Dec 2015 15:34:38 +0000 (07:34 -0800)]
Debian: Fixup build issues with switch to 3.0

Modify the build type from patch to git
Fix the rules: spaces to tabs these were causing build issues
Add some additional dependent packages

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Alex Doyle <adoyle@cumulusnetworks.com>
8 years agoZebra: crash in zebra_deregister_rnh_static_nexthops
Daniel Walton [Tue, 1 Dec 2015 18:32:33 +0000 (18:32 +0000)]
Zebra: crash in zebra_deregister_rnh_static_nexthops

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoBGP: 'neighbor swpX interface peer-group FOO' is needed to simplify swpX
Daniel Walton [Mon, 30 Nov 2015 21:19:39 +0000 (21:19 +0000)]
BGP: 'neighbor swpX interface peer-group FOO' is needed to simplify swpX
configuration

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

This allows the user to configure the peer-group as an option for the
"neighbor swpX interface" command.
{code}
!
router bgp 100
 neighbor FOO peer-group
 neighbor FOO remote-as external
 neighbor swp1 interface
 neighbor swp2 interface v6only
 neighbor swp3 interface peer-group FOO
 neighbor swp4 interface v6only peer-group FOO
!
 address-family ipv4 unicast
  neighbor FOO activate
  neighbor swp1 activate
  neighbor swp2 activate
 exit-address-family
!
{code}

Note that if the user configures
{code}
neighbor swp5 interface
neighbor swp5 peer-group FOO
{code}

We will display that as "neighbor swp5 interface peer-group FOO".  It
did not seem worth tracking that the peer-group was entered via two
lines instead of one.

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 27 Nov 2015 16:58:52 +0000 (08:58 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 27 Nov 2015 16:47:38 +0000 (08:47 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoQuagga: Nexthop refactoring
Donald Sharp [Fri, 27 Nov 2015 16:46:54 +0000 (08:46 -0800)]
Quagga: Nexthop refactoring

Upstream wanted some nexthop code to be refactored.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobgpd: Refactor some code for nexthop handling
Donald Sharp [Mon, 23 Nov 2015 21:29:39 +0000 (13:29 -0800)]
bgpd: Refactor some code for nexthop handling

A upstream CR comment was that we had a function that worked the
same for v4 and v6, the code should be consolidated.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga: prefix2str fixup
Donald Sharp [Mon, 23 Nov 2015 20:44:34 +0000 (12:44 -0800)]
Quagga: prefix2str fixup

During CR for nexthop upstream it was noticed that usage
of prefix2str was not consistent.  This fixes this problem

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga: Fixup some compile warnings
Donald Sharp [Mon, 23 Nov 2015 20:43:15 +0000 (12:43 -0800)]
Quagga: Fixup some compile warnings

Fixup compile warnings for when you turn on --enable-gcc-ultra-verbose=yes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fixup of NULL calls to XSTRDUP
Donald Sharp [Sun, 22 Nov 2015 00:47:32 +0000 (16:47 -0800)]
lib: Fixup of NULL calls to XSTRDUP

There are a few situations where XSTRDUP can be called with a NULL
This fix makes this impossible to happen

Ticket: CM-8039
Reviewed-by: CCR-3849
Testing: Rip no longer crashes

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoShould be able to "no" the full text of any config line
Daniel Walton [Mon, 23 Nov 2015 18:05:03 +0000 (18:05 +0000)]
Should be able to "no" the full text of any config line

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

8 years agoQuagga: vrf_id not being set correctly
Donald Sharp [Fri, 20 Nov 2015 19:36:46 +0000 (11:36 -0800)]
Quagga: vrf_id not being set correctly

Several routing protocols use the zapi_ipv[4|6] api to talk to
zebra.  There are some instances where the api.vrf_id was not
being set.  Since the practice is to declare the api structure
on the stack, the data inside is not being set to 0.  As
such random vrf_id values were being passed to zebrad
causing rage and confusion.

Ticket: CM-8287
Reviewed-by: CCR-3841
Testing:  Test suites no longer crashing and burning

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Fri, 20 Nov 2015 19:10:29 +0000 (11:10 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Ignore bridge address family netlink notifications
vivek [Fri, 20 Nov 2015 19:09:25 +0000 (11:09 -0800)]
Zebra: Ignore bridge address family netlink notifications

Ticket: CM-8045
Reviewed By: CCR-3736
Testing Done:

This is an import of patch zebra-ignore-bridge-af.patch from 2.5-br.

8 years agoBGP: Remove the requirement to rebind a peer to its peer-group under the address...
Daniel Walton [Fri, 20 Nov 2015 18:53:50 +0000 (18:53 +0000)]
BGP: Remove the requirement to rebind a peer to its peer-group under the address-family.

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

NOTE: Many of the ibgp peers are not up in the 'show ip bgp summ' output below. This
is because ospf was disabled at the time.  The main thing to look for is whether or
not all of the correct peers are listed based on their 'activate' status.

Basic Example
=============

router bgp 10
 bgp router-id 10.0.0.1
 no bgp default ipv4-unicast
 no bgp bestpath as-path multipath-relax
 bgp bestpath compare-routerid
 bgp route-map delay-timer 1
 neighbor EBGP peer-group
 neighbor EBGP advertisement-interval 1
 neighbor IBGP peer-group
 neighbor IBGP remote-as 10
 neighbor IBGP update-source 10.0.0.1
 neighbor IBGP advertisement-interval 1
 neighbor 10.0.0.2 peer-group IBGP
 neighbor 10.0.0.3 peer-group IBGP
 neighbor 10.0.0.4 peer-group IBGP
 neighbor 20.1.1.6 remote-as 20
 neighbor 20.1.1.6 peer-group EBGP
 neighbor 20.1.1.7 remote-as 20
 neighbor 20.1.1.7 peer-group EBGP
 neighbor 40.1.1.2 remote-as 40
 neighbor 40.1.1.2 peer-group EBGP
 neighbor 40.1.1.6 remote-as 40
 neighbor 40.1.1.6 peer-group EBGP
 neighbor 40.1.1.10 remote-as 40
 neighbor 40.1.1.10 peer-group EBGP
!
 address-family ipv4 unicast
  neighbor EBGP activate
  neighbor IBGP activate
  neighbor IBGP next-hop-self
 exit-address-family
!

superm-redxp-05# show ip bgp summ
BGP router identifier 10.0.0.1, local AS number 10
BGP table version 4200
RIB entries 2399, using 281 KiB of memory
Peers 8, using 129 KiB of memory
Peer groups 2, using 112 bytes of memory

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
r2(10.0.0.2)    4    10     107     211        0    0    0 00:23:01 Connect
r3(10.0.0.3)    4    10     107     211        0    0    0 00:23:01 Connect
r4(10.0.0.4)    4    10     207     211        0    0    0 00:23:01 Active
r6(20.1.1.6)    4    20     873     975        0    0    0 00:23:29      600
r7(20.1.1.7)    4    20     873     976        0    0    0 00:23:29      600
r8(40.1.1.2)    4    40     874     975        0    0    0 00:23:30      600
r9(40.1.1.6)    4    40     874     975        0    0    0 00:23:30      600
r10(40.1.1.10)  4    40     874     975        0    0    0 00:23:30      600

Total number of neighbors 8
superm-redxp-05#

Example where one member of the peer-group is inactive...we can do this now that
peer-group members can have different outbound policies from the peer-group.
================================================================================
superm-redxp-05# conf t
superm-redxp-05(config)# router bgp 10
superm-redxp-05(config-router)# address-family ipv4 unicast
superm-redxp-05(config-router-af)# no neighbor 10.0.0.3 activate
superm-redxp-05(config-router-af)# do show run
router bgp 10
 bgp router-id 10.0.0.1
 no bgp default ipv4-unicast
 no bgp bestpath as-path multipath-relax
 bgp bestpath compare-routerid
 bgp route-map delay-timer 1
 neighbor EBGP peer-group
 neighbor EBGP advertisement-interval 1
 neighbor IBGP peer-group
 neighbor IBGP remote-as 10
 neighbor IBGP update-source 10.0.0.1
 neighbor IBGP advertisement-interval 1
 neighbor 10.0.0.2 peer-group IBGP
 neighbor 10.0.0.3 peer-group IBGP
 neighbor 10.0.0.4 peer-group IBGP
 neighbor 20.1.1.6 remote-as 20
 neighbor 20.1.1.6 peer-group EBGP
 neighbor 20.1.1.7 remote-as 20
 neighbor 20.1.1.7 peer-group EBGP
 neighbor 40.1.1.2 remote-as 40
 neighbor 40.1.1.2 peer-group EBGP
 neighbor 40.1.1.6 remote-as 40
 neighbor 40.1.1.6 peer-group EBGP
 neighbor 40.1.1.10 remote-as 40
 neighbor 40.1.1.10 peer-group EBGP
!
 address-family ipv4 unicast
  neighbor EBGP activate
  neighbor IBGP activate
  neighbor IBGP next-hop-self
  no neighbor 10.0.0.3 activate
 exit-address-family
!
superm-redxp-05# show ip bgp summ
BGP router identifier 10.0.0.1, local AS number 10
BGP table version 4200
RIB entries 2399, using 281 KiB of memory
Peers 8, using 129 KiB of memory
Peer groups 2, using 112 bytes of memory

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
r2(10.0.0.2)    4    10     107     211        0    0    0 00:23:24 Connect
r4(10.0.0.4)    4    10     207     211        0    0    0 00:23:24 Active
r6(20.1.1.6)    4    20     881     983        0    0    0 00:23:52      600
r7(20.1.1.7)    4    20     881     984        0    0    0 00:23:52      600
r8(40.1.1.2)    4    40     881     982        0    0    0 00:23:53      600
r9(40.1.1.6)    4    40     881     982        0    0    0 00:23:53      600
r10(40.1.1.10)  4    40     881     982        0    0    0 00:23:53      600

Total number of neighbors 7
superm-redxp-05#

Example where the peer-group is inactive but a member of the peer-group is active:
==================================================================================
superm-redxp-05(config)# router bgp 10
superm-redxp-05(config-router)# address-family ipv4 unicast
superm-redxp-05(config-router-af)# neighbor 10.0.0.3 activate
superm-redxp-05(config-router-af)# no neighbor IBGP activate
superm-redxp-05(config-router-af)#
superm-redxp-05(config-router-af)# neighbor 10.0.0.4 activate
superm-redxp-05(config-router-af)# end
superm-redxp-05# show run
router bgp 10
 bgp router-id 10.0.0.1
 no bgp default ipv4-unicast
 no bgp bestpath as-path multipath-relax
 bgp bestpath compare-routerid
 bgp route-map delay-timer 1
 neighbor EBGP peer-group
 neighbor EBGP advertisement-interval 1
 neighbor IBGP peer-group
 neighbor IBGP remote-as 10
 neighbor IBGP update-source 10.0.0.1
 neighbor IBGP advertisement-interval 1
 neighbor 10.0.0.2 peer-group IBGP
 neighbor 10.0.0.3 peer-group IBGP
 neighbor 10.0.0.4 peer-group IBGP
 neighbor 20.1.1.6 remote-as 20
 neighbor 20.1.1.6 peer-group EBGP
 neighbor 20.1.1.7 remote-as 20
 neighbor 20.1.1.7 peer-group EBGP
 neighbor 40.1.1.2 remote-as 40
 neighbor 40.1.1.2 peer-group EBGP
 neighbor 40.1.1.6 remote-as 40
 neighbor 40.1.1.6 peer-group EBGP
 neighbor 40.1.1.10 remote-as 40
 neighbor 40.1.1.10 peer-group EBGP
!
 address-family ipv4 unicast
  neighbor EBGP activate
  neighbor IBGP next-hop-self
  neighbor 10.0.0.4 activate
 exit-address-family
!

superm-redxp-05# show ip bgp summ
BGP router identifier 10.0.0.1, local AS number 10
BGP table version 4200
RIB entries 2399, using 281 KiB of memory
Peers 8, using 129 KiB of memory
Peer groups 2, using 112 bytes of memory

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
r4(10.0.0.4)    4    10     207     211        0    0    0 00:24:56 Active
r6(20.1.1.6)    4    20     911    1013        0    0    0 00:25:24      600
r7(20.1.1.7)    4    20     911    1014        0    0    0 00:25:24      600
r8(40.1.1.2)    4    40     912    1013        0    0    0 00:25:25      600
r9(40.1.1.6)    4    40     912    1013        0    0    0 00:25:25      600
r10(40.1.1.10)  4    40     912    1013        0    0    0 00:25:25      600

Total number of neighbors 6
superm-redxp-05#

8 years agoBGP crash in group_announce_route_walkcb
Daniel Walton [Fri, 20 Nov 2015 18:43:33 +0000 (18:43 +0000)]
BGP crash in group_announce_route_walkcb

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

This is a regression from the addpath-tx commit. We loop over the adj_out list
but the adj can be freed within the body of the loop so we need to note adj->next
prior to the free.

8 years agoQuagga default: BGP enable "maximum-paths 64"
Daniel Walton [Fri, 20 Nov 2015 18:41:51 +0000 (18:41 +0000)]
Quagga default: BGP enable "maximum-paths 64"

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

8 years agoZebra: Handle IPv6 address status during initialization
vivek [Fri, 20 Nov 2015 18:34:50 +0000 (10:34 -0800)]
Zebra: Handle IPv6 address status during initialization

At init time, Zebra queries the kernel for all interfaces. At this time,
an IPv6 address may exist on an interface but IPv6 DAD has not completed,
or it could be that DAD has failed. Zebra should examine the flags on
the address and act accordingly. Otherwise, it may end up with addresses
and routes which are not actually valid in the kernel, and this may lead
to, for example, BGP attempting neighbor connections on an interface on
which the source IPv6 address is not yet valid.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Ticket: CM-7176
Reviewed By: CCR-3815
Testing Done: Verify failed test (needs temporary test change)

Note: Imported from 2.5-br patch zebra-handle-ipv6-addr-status.patch.

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Fri, 20 Nov 2015 16:51:48 +0000 (08:51 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Cleanup RIB debugs
vivek [Fri, 20 Nov 2015 16:48:32 +0000 (08:48 -0800)]
Zebra: Cleanup RIB debugs

Some of the changes include:
- ensuring IPv6 addresses are printed correctly
- say 'updating' or 'deleting' etc. only when that is actually done
- say 'queuing' or 'dequeuing' only when that is actually done
- print useful info for 'detailed' debug - that now subsumes 'rib queue'
- delete various useless logs
- VRF-specific - print VRF id in RIB debugs prior to prefix
  (e.g., 4:37.1.1.0/28)

Ticket: CM-8110
Reviewed By: CCR-3765
Testing Done: Manual testing (2.5-br)

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 20 Nov 2015 15:12:30 +0000 (07:12 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoQuagga: Fixup decision about what an unnumbered interface is
Donald Sharp [Fri, 20 Nov 2015 15:10:47 +0000 (07:10 -0800)]
Quagga: Fixup decision about what an unnumbered interface is

This Change modifies what zebra thinks is an unnumbered interface.
If the interface is not a loopback and the prefixlength for the
interface is 32 than consider this an unnumbered interface.

Ticket: CM-8016
Reviewed by: CCR-3827
Testing: Full Regression Suites

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga: Cleanup RTADV define
Donald Sharp [Fri, 20 Nov 2015 13:33:30 +0000 (08:33 -0500)]
Quagga: Cleanup RTADV define

The RTADV define was not being set correctly or consistently.
Make the code consistent with our HAVE_IPV6 define.

If the user wants to explicitly turn it off then they should
run --disable-rtadv from the configure cli

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fixup a compiler warning on netbsd
Donald Sharp [Fri, 20 Nov 2015 14:59:12 +0000 (06:59 -0800)]
lib: Fixup a compiler warning on netbsd

This code has a compiler warning on some oddball platforms

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoZebra: Fix replace route for uninstall scenario
vivek [Thu, 19 Nov 2015 20:48:02 +0000 (12:48 -0800)]
Zebra: Fix replace route for uninstall scenario

When a Quagga route that is currently installed is superceded by a
kernel route (connected or static route to same destination), the
Quagga route is not uninstalled from the kernel. Fix by ensuring
this case is handled correctly.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-7152
Reviewed By: CCR-3476
Testing Done: Manual tests and verify failed test.

Fixes: Replace route implementation (IPv4 and IPv6)
8 years agoZebra: Implement route replace for IPv6
vivek [Thu, 19 Nov 2015 20:22:55 +0000 (12:22 -0800)]
Zebra: Implement route replace for IPv6

Zebra currently performs a delete followed by add when a route needs to be
modified. Change this to use the replace semantics of netlink so that the
operation can possibly be atomic.

Note: This patch handles IPv6 routes, IPv4 already performs a replace.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Ticket: CM-5597
Reviewed By: CCR-3407
Testing Done: Manual testing of various scearnios (Vivek, Satish)

Note: This is an import of patch zebra-ipv6-route-replace.patch from 2.5-br.

8 years agozebra: Fix non usage of VRF_DEFAULT
Donald Sharp [Thu, 19 Nov 2015 12:21:30 +0000 (07:21 -0500)]
zebra: Fix non usage of VRF_DEFAULT

A vrf_id was being set to 0 instead of VRF_DEFAULT

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga: Fixup cli and json keyword
Donald Sharp [Wed, 18 Nov 2015 23:36:04 +0000 (15:36 -0800)]
Quagga: Fixup cli and json keyword

The json keyword was being read incorrectly.
Basically some commands read a variable # of arguments
and in ospf the command values were being placed into
argc and argv.  With a variable # of arguments their
existed a possibility that less arguments would be read
from the cli than were being tested for in the command function
handler.  This caused core dumps in some situations.

All code to read to decide to use the json keyword has
been centralized through a function and all code
converted to use it, irrelevant if it exhibited the bug

Ticket: CM-8278
Reviewed by: CCR-3830
Testing: OSPF no longer crashes and all other test suites still run

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoBGP: extcommunity-list are displayed before community-list
Daniel Walton [Wed, 18 Nov 2015 18:54:23 +0000 (18:54 +0000)]
BGP: extcommunity-list are displayed before community-list

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

"ip extcommunity-list" is displayed as part of COMMUNITY_LIST_NODE
but vtysh_config_parse_line() was not checking for "ip extcommunity-list"

8 years agoBGP: Handle router-id correctly in config and display.
vivek [Tue, 17 Nov 2015 21:57:56 +0000 (13:57 -0800)]
BGP: Handle router-id correctly in config and display.

BGP is currently displaying the in-use router-id in the config. This is
conditional on a CONFIG flag, however, that flag is set even when there
is no configured router-id and the router-id learnt from Zebra is in-use.
The CONFIG flag for router-id is redundant since there is a separate
variable for the configured value, so use that and deprecate the CONFIG
flag. This also makes BGP behave like OSPF.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-8077, CM-8220
Reviewed By: CCR-3793
Testing Done: Manual verification (in 2.5-br)

Note: Imported from 2.5-br patch bgpd-fix-router-id-config-display.patch

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Tue, 17 Nov 2015 21:33:17 +0000 (13:33 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoBGP: Update dump to allow Extended Time Format
Alexis Fasquel [Mon, 16 Nov 2015 18:55:16 +0000 (13:55 -0500)]
BGP: Update dump to allow Extended Time Format

Allow the bgp dump functionality to handle the Extended Time format
as specified in RFC 6396.

Fixes a segmentation fault with multiple dump rules as well.

Signed-off-by: Alexis Fasquel <alexis@pch.net>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga: Set MULTIPATH_NUM to 64 when user specifies 0 from cli
Donald Sharp [Tue, 17 Nov 2015 16:13:23 +0000 (08:13 -0800)]
Quagga: Set MULTIPATH_NUM to 64 when user specifies 0 from cli

The code has tests to see if the MULTIPATH_NUM == 0 and to
treat it like the user has entered 'Maximum PATHS'.
This 0 is treated as 64 internally.  Remove this dependency
and setup MULTIPATH_NUM to 64 when --enable-multipath=0 from
the configure cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoBGP: crash in update_subgroup_merge()
Daniel Walton [Tue, 17 Nov 2015 02:09:57 +0000 (02:09 +0000)]
BGP: crash in update_subgroup_merge()

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

On my hard node I have a route to 10.0.0.0/22 via eth0, I then learn
10.0.0.8/32 from peer 10.0.0.8 with a nexthop of 10.0.0.8:

superm-redxp-05# show ip bgp 10.0.0.8/32
BGP routing table entry for 10.0.0.8/32
Paths: (1 available, no best path)
  Not advertised to any peer
  80
    10.0.0.8 from r8(swp6) (10.0.0.8)
      Origin IGP, metric 0, localpref 100, valid, external
      AddPath ID: RX 0, TX 9
      Last update: Thu Nov 12 14:00:00 2015

superm-redxp-05#

I do a lookup for the nexthop and see that 10.0.0.8 is reachable via my
eth0 10.0.0.22 so I select a bestpath and install the route.  At this
point my route to 10.0.0.8 is a /32 that resolves via itself, NHT sees
that this is illegal and flags the nexthop as inaccessible.

superm-redxp-05# show ip bgp 10.0.0.8/32
BGP routing table entry for 10.0.0.8/32
Paths: (1 available, best #1, table Default-IP-Routing-Table)
  Advertised to non peer-group peers:
  r6(swp4) r7(swp5) r8(swp6) r2(10.1.2.2) r3(10.1.3.2) r4(10.1.4.2)
  80
    10.0.0.8 (inaccessible) from r8(swp6) (10.0.0.8)
      Origin IGP, metric 0, localpref 100, invalid, external, bestpath-from-AS 80, best
      AddPath ID: RX 0, TX 9
      Last update: Thu Nov 12 14:00:00 2015

superm-redxp-05#

at which point we withdraw the route, things churn, we relearn it and go
through the whole process over and over again.  We end up advertising and
withdrawing this route about 9 times a second!!

This exposed a crash in the update-group code where we try to merge two sub-groups
but the assert on adj_count fails because the timing worked out where one had
advertised 10.0.0.8/32 but the other had not.

NOTE: the race condition described above will be resolved via a separate patch.

8 years agoZebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK
Donald Sharp [Mon, 16 Nov 2015 20:48:07 +0000 (12:48 -0800)]
Zebra: Remove reliance on NEXTHOP_TYPE_IPV4_ONLINK

Zebra already knows if an interface is unnumbered or not.  This
is communicated to OSPF.
OSPF would only send a NEXTHOP_TYPE_IPV4_ONLINK *if* the path
was unnumbered, which it learns from Zebra.

As such, Have OSPF use the normal NEXTHOP_TYPE_IPV4_IFINDEX
type for unnumbered paths.  In Zebra, if the ifindex recieved
is unnumbered then assume that the link is NEXTHOP_FLAG_ONLINK.

Ticket: CM-8145
Reviewed-by: CCR-3771
Testing: See bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoBGP: Fix nexthop registration churn
vivek [Sun, 15 Nov 2015 18:21:12 +0000 (10:21 -0800)]
BGP: Fix nexthop registration churn

When a BGP nexthop is registered for resolution, if it is learnt from an
EBGP peer and other conditions warrant (non-multihop peer and connected check
is not disabled), the registration includes a flag that indicates that the
nexthop must be resolved only if it is directly connected. In peculiar
situations - e.g., third-party nexthop or policy configuration - the same
nexthop could be learnt from an IBGP peer, and in general, nexthops learnt
from IBGP peers can be resolved over any route. This scenario was causing
a churn in the nexthop registration with the 'must-be-connected' flag being
repeatedly toggled as routes are received from both peers. The registrations
would in turn trigger significant processing.

The fix is to treat 'must-be-connected' as an overriding condition.

The repeated registration and related processing was also causing heavy memory
usage by BGP - for memory buffers used to hold registration information. This
fix will ensure that is no longer the case.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-8005, CM-8013
Reviewed By: CCR-3772
Testing Done: Manual, bgpsmoke (on 2.5-br)

8 years agoBGP: Handle change to nexthop correctly
vivek [Sun, 15 Nov 2015 17:57:34 +0000 (09:57 -0800)]
BGP: Handle change to nexthop correctly

When a nexthop change is received and processed, the change flags are not
examined correctly and route change flags not updated correctly. Fix to
ensure correct handling.

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

Note: Imported from 2.5-br patch bgpd-nht-fix-change-handling.patch

8 years agoZebra: Ensure correct route is used for redistribute delete.
vivek [Sun, 15 Nov 2015 15:36:50 +0000 (07:36 -0800)]
Zebra: Ensure correct route is used for redistribute delete.

After the optimization introduced by patch zebra-redist-update-fix.patch
which implements "replace" semantics for redistributed routes instead of
a delete followed by add, the code was passing an incorrect route for
redistribute deletion in one case. This is mainly inconsequential as of
now as the deletion process primarily cares about only the destination, but
the code needs to be corrected and that is done here.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Fixes: zebra-redist-update-fix.patch
Ticket: CM-8112
Reviewed By: CCR-3760
Testing Done: Trivial

Note:
1. Needs changes after IPv6 route replace patches are included.
2. Imported from 2.5-br patch zebra-redist-delete-fix.patch

8 years agoBGP: Fix the setting of link-local nexthops in some situations
vivek [Sun, 15 Nov 2015 15:17:47 +0000 (07:17 -0800)]
BGP: Fix the setting of link-local nexthops in some situations

This patch addresses three main issues:
a. Passing along the global IPv6 nexthop received from the EBGP peer to
IBGP peers but setting the link-local IPv6 nexthop to ourselves when
advertising EBGP-learnt routes to IBGP peers (in the absence of outbound
route-map or other overrides). The fix is to not send a link-local IPv6
nexthop in this case.

b. Passing along the link-local IPv6 nexthop received from one peer to
another peer which is (or may be) on a different subnet. This violates the
semantics of link-local IPv6 address. The fix is to set the nexthop to
ourselves in the situation where the nexthop normally has to be passed
but is a link-local IPv6 address.

c. Different behavior wrt nexthop advertisement for BGP unnumbered peering
if it is setup using link-local IPv6 address versus IPv4 /30 or /31. The
fix is to make the behavior consistent as long as the interface config is
the same in both cases.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Ticket: CM-7846, CM-8043
Reviewed By: CCR-3749
Testing Done: Manual testing, bgpsmoke (on 2.5-br)

Note: Imported from 2.5-br patch bgpd-fix-link-local-nexthop-setting.patch

8 years agoQuagga default: BGP enable "maximum-paths 64"
Daniel Walton [Fri, 13 Nov 2015 21:52:13 +0000 (21:52 +0000)]
Quagga default: BGP enable "maximum-paths 64"

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

8 years agoBGP: Remove deprecated commands and add warning that "show ipv6 bgp"
Daniel Walton [Fri, 13 Nov 2015 03:14:10 +0000 (03:14 +0000)]
BGP: Remove deprecated commands and add warning that "show ipv6 bgp"
will be deprecated in the future

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

8 years agoOSPF: remove deprecated commands
Daniel Walton [Fri, 13 Nov 2015 02:38:42 +0000 (02:38 +0000)]
OSPF: remove deprecated commands

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

8 years agobgp may add multiple path entries with the same nexthop
Daniel Walton [Thu, 12 Nov 2015 20:30:22 +0000 (20:30 +0000)]
bgp may add multiple path entries with the same nexthop

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

- We have 14 paths for each prefix, 7 are from ipv4 peers and 7 are from ipv6 peers

- There are 7 unique nexthops

- When comparing the exact same path from an v4 peer vs. a v6 peer the path from
  the v4 peer wins.  This is due to the "lowest neighbor IP" check in the decision
  algorithm.  For example below we learn NEXTHOP 210.2.4.2 from 210.2.4.2 and
  2001:20:4::2 but only the one from the v4 peer is flagged as multipath.

- The problem is when our bestpath is from a v6 peer, 2001:20:2::2 in this case
  (see line 85). 2001:20:2::2 sent us 210.2.2.2 so we will install that nexthop
  because it is from our bestpath, the problem is we flag the path from 210.2.2.2
  (line 37) as multipath which causes us to install two paths with nexthop 210.2.2.2

  1 superm-redxp-05# show ip bgp 2.23.24.192/28
  2 BGP routing table entry for 2.23.24.192/28
  3 Paths: (14 available, best #14, table Default-IP-Routing-Table)
  4   Advertised to non peer-group peers:
  5   210.2.0.2 210.2.1.2 210.2.2.2 210.2.3.2 210.2.4.2 210.2.5.2 210.2.6.2 210.4.1.4 2001:20::2 2001:20:1::2 2001:20:2::2 2001:20:3::2 2001:20:4::2 2001:2
  6   205 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
  7     210.2.4.2 from 210.2.4.2 (10.0.0.2)
  8       Origin IGP, localpref 100, valid, external, multipath
  9       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 10       Last update: Wed Nov 11 20:54:57 2015
 11
 12   204 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 13     210.2.3.2 from 210.2.3.2 (10.0.0.2)
 14       Origin IGP, localpref 100, valid, external, multipath
 15       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 16       Last update: Wed Nov 11 20:54:57 2015
 17
 18   202 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 19     210.2.1.2 from 210.2.1.2 (10.0.0.2)
 20       Origin IGP, localpref 100, valid, external, multipath
 21       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 22       Last update: Wed Nov 11 20:54:57 2015
 23
 24   206 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 25     210.2.5.2 from 2001:20:5::2 (10.0.0.2)
 26       Origin IGP, localpref 100, valid, external
 27       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 28       Last update: Wed Nov 11 20:54:57 2015
 29
 30   205 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 31     210.2.4.2 from 2001:20:4::2 (10.0.0.2)
 32       Origin IGP, localpref 100, valid, external
 33       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 34       Last update: Wed Nov 11 20:54:57 2015
 35
 36   203 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 37     210.2.2.2 from 210.2.2.2 (10.0.0.2)
 38       Origin IGP, localpref 100, valid, external, multipath
 39       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 40       Last update: Wed Nov 11 20:54:57 2015
 41
 42   202 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 43     210.2.1.2 from 2001:20:1::2 (10.0.0.2)
 44       Origin IGP, localpref 100, valid, external
 45       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 46       Last update: Wed Nov 11 20:54:57 2015
 47
 48   201 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 49     210.2.0.2 from 210.2.0.2 (10.0.0.2)
 50       Origin IGP, localpref 100, valid, external, multipath
 51       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 52       Last update: Wed Nov 11 20:54:57 2015
 53
 54   206 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 55     210.2.5.2 from 210.2.5.2 (10.0.0.2)
 56       Origin IGP, localpref 100, valid, external, multipath
 57       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 58       Last update: Wed Nov 11 20:54:57 2015
 59
 60   207 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 61     210.2.6.2 from 2001:20:6::2 (10.0.0.2)
 62       Origin IGP, localpref 100, valid, external
 63       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 64       Last update: Wed Nov 11 20:54:57 2015
 65
 66   207 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 67     210.2.6.2 from 210.2.6.2 (10.0.0.2)
 68       Origin IGP, localpref 100, valid, external, multipath
 69       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 70       Last update: Wed Nov 11 20:54:57 2015
 71
 72   201 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 73     210.2.0.2 from 2001:20::2 (10.0.0.2)
 74       Origin IGP, localpref 100, valid, external
 75       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 76       Last update: Wed Nov 11 20:54:57 2015
 77
 78   204 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 79     210.2.3.2 from 2001:20:3::2 (10.0.0.2)
 80       Origin IGP, localpref 100, valid, external
 81       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 82       Last update: Wed Nov 11 20:54:57 2015
 83
 84   203 200 300 790 90 80 2334 544 56 67 889 3111 777 8 879 900 88 7654 3211 113 43434 666 343 4534 667 7688
 85     210.2.2.2 from 2001:20:2::2 (10.0.0.2)
 86       Origin IGP, localpref 100, valid, external, multipath, best
 87       Community: 0:100 0:200 0:300 0:324 0:2938 0:3344 0:3545 0:4466 0:5445 0:5754
 88       Last update: Wed Nov 11 20:54:57 2015
 89
 90 superm-redxp-05#

Here you can see the two paths with nexthop 210.2.2.2

superm-redxp-05# show ip route 2.23.24.192/28
Routing entry for 2.23.24.192/28
  Known via "bgp", distance 20, metric 0, best
  Last update 00:32:12 ago
  * 210.2.2.2, via swp3
  * 210.2.0.2, via swp1
  * 210.2.1.2, via swp2
  * 210.2.2.2, via swp3
  * 210.2.3.2, via swp4
  * 210.2.4.2, via swp5
  * 210.2.5.2, via swp6
  * 210.2.6.2, via swp7

superm-redxp-05#
superm-redxp-05#

The fix is to not flag a path as multipath if it has the same nexthop as the bestpath

8 years agoBGP: "redistribute" is missing from the "address-family ipv4 unicast" sub-context
Daniel Walton [Thu, 12 Nov 2015 20:25:46 +0000 (20:25 +0000)]
BGP: "redistribute" is missing from the "address-family ipv4 unicast" sub-context

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

8 years agoBGP: changing remote-as from external to external resets connection
Donald Sharp [Wed, 11 Nov 2015 16:52:51 +0000 (08:52 -0800)]
BGP: changing remote-as from external to external resets connection

Modify code to recognize that we are not actually reseting the
neighbor if the user actually enters a remote-as of external->external
for a neighbor.

Ticket: CM-8100
Reviewed-by: CCR-3783
Testing: See bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga default: BGP "no-as-set" should be the default for "bgp as-path multipath...
Daniel Walton [Tue, 10 Nov 2015 15:33:24 +0000 (15:33 +0000)]
Quagga default: BGP "no-as-set" should be the default for "bgp as-path multipath-relax"

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

8 years agoBGP: route-server will now use addpath...chop the _rsclient code
Daniel Walton [Tue, 10 Nov 2015 15:29:12 +0000 (15:29 +0000)]
BGP: route-server will now use addpath...chop the _rsclient code

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

per draft-ietf-idr-ix-bgp-route-server-09:

2.3.2.2.2.  BGP ADD-PATH Approach

   The [I-D.ietf-idr-add-paths] Internet draft proposes a different
   approach to multiple path propagation, by allowing a BGP speaker to
   forward multiple paths for the same prefix on a single BGP session.

   As [RFC4271] specifies that a BGP listener must implement an implicit
   withdraw when it receives an UPDATE message for a prefix which
   already exists in its Adj-RIB-In, this approach requires explicit
   support for the feature both on the route server and on its clients.

   If the ADD-PATH capability is negotiated bidirectionally between the
   route server and a route server client, and the route server client
   propagates multiple paths for the same prefix to the route server,
   then this could potentially cause the propagation of inactive,
   invalid or suboptimal paths to the route server, thereby causing loss
   of reachability to other route server clients.  For this reason, ADD-
   PATH implementations on a route server should enforce send-only mode
   with the route server clients, which would result in negotiating
   receive-only mode from the client to the route server.

This allows us to delete all of the following code:

- All XXXX_rsclient() functions
- peer->rib
- BGP_TABLE_MAIN and BGP_TABLE_RSCLIENT
- RMAP_IMPORT and RMAP_EXPORT

8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Tue, 10 Nov 2015 01:04:20 +0000 (17:04 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoZebra: Remove dependency on rib_bogus_ipv6
Donald Sharp [Tue, 10 Nov 2015 01:02:26 +0000 (17:02 -0800)]
Zebra: Remove dependency on rib_bogus_ipv6

rib_bogus_ipv6 was removed upstream.  We need to do the same thing
and ensure that our ipv6 multipath still works

Ticket: CM-8152
Reviewed by: CCR-3775
Testing: Ran all multipath tests

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoOSPF: Fix zlog_warn to zlog_debug in some unlikely scenarios
Donald Sharp [Mon, 9 Nov 2015 14:51:45 +0000 (06:51 -0800)]
OSPF: Fix zlog_warn to zlog_debug in some unlikely scenarios

When there is an OSPF missconfiguration, do not zlog_warn the fact
as that it would quickly overwhelm any log file.

Ticket: CM-7534
Reviewed by: CCR-3756
Testing: See bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoQuagga crash in prefix_list_apply
Daniel Walton [Fri, 6 Nov 2015 16:36:37 +0000 (16:36 +0000)]
Quagga crash in prefix_list_apply

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