]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
9 years agoZebra: Enable VRF as an interface creation
Don Slice [Mon, 22 Feb 2016 21:36:23 +0000 (21:36 +0000)]
Zebra: Enable VRF as an interface creation

Modified response to netlink message for VRF creation, allowing it to be
created as an interface and setting the right vrf_id and bringing in the ip address.

Ticket: CM-9277
Signed-off-by: Don Slice
Reviewed-by: Vivek Venkatraman
9 years agoBGP: Cleanup interfaces properly on instance delete or exit
vivek [Mon, 22 Feb 2016 06:36:37 +0000 (06:36 +0000)]
BGP: Cleanup interfaces properly on instance delete or exit

Perform interface cleanup as an instance is deleted. This takes care of the
scenario when BGP exits (or is stopped/restarted) too as instances undergo
deletion and the interface cleanup is done as the last step in that.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Fixes: 46abd3e3e6eb1f723ea7905c9919b65f1a76f385
Ticket: CM-9410
Reviewed By: CCR-4143
Testing Done: Reran failed test

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Mon, 22 Feb 2016 05:38:55 +0000 (05:38 +0000)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agoZebra: Fix ignoring status for VRF device
vivek [Mon, 22 Feb 2016 05:33:46 +0000 (05:33 +0000)]
Zebra: Fix ignoring status for VRF device

The earlier change to ignore status for VRF device was not quite perfect. As
defect CM-9437 illustrates, there are situations when Quagga may get a VRF
member interface (that refers to the VRF id of the VRF device) before it gets
the VRF device itself. The code has some logic to handle this, creating a
VRF structure which is partly initialized. The initialization is completed
with some additional incorrect status processing when the VRF is learnt. The
fix done earlier completely ignored the VRF message treating it as a status
change because the VRF is already present, but this left the VRF structure
not fully initialized in Quagga. The fix is to do some additional checks
to handle this scenario.

Fixes: 3e66be2ee6db028d808a304586e0b24d5374914e
Ticket: CM-9437
Reviewed By: None
Testing Done: Reproduced problem, verified fix.

9 years agodebian: Fixup 'systemctl restart quagga'
sharpd [Fri, 19 Feb 2016 19:08:19 +0000 (11:08 -0800)]
debian: Fixup 'systemctl restart quagga'

The ability to restart was just restarting all daemons.
Modify code so that only daemons running *or* enabled are
started.

Ticket: CM-9384
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoZebra: Ignore status change for VRF (temporary)
vivek [Sat, 20 Feb 2016 06:50:56 +0000 (22:50 -0800)]
Zebra: Ignore status change for VRF (temporary)

Temporary change to ignore status change for a VRF device as it is
incorrectly implemented now. When VRF is also supported as an
interface, the status change will be handled for the interface.

Ticket:
Reviewed By:
Testing Done:

9 years agoBGP: Link BGP instance to corresponding VRF
vivek [Sat, 20 Feb 2016 02:43:30 +0000 (18:43 -0800)]
BGP: Link BGP instance to corresponding VRF

Link BGP instance (Default or VRF) to the corresponding VRF structure and
modify lookup to use this. The logic is very similar to what is implemented
in zebra - the 'struct zebra_vrf' there is essentially 'struct bgp' in BGP.

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

9 years agoZebra: Cleanup and update RA debugs
vivek [Fri, 19 Feb 2016 22:58:46 +0000 (14:58 -0800)]
Zebra: Cleanup and update RA debugs

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

9 years agoZebra: Make RA socket operation on a per-NS basis
vivek [Fri, 19 Feb 2016 22:28:25 +0000 (14:28 -0800)]
Zebra: Make RA socket operation on a per-NS basis

This patch reorganizes the RA handling to be per namespace rather than per
VRF. The VRF library by 6wind had done the original change to make the RA
data structures (socket information) per VRF, but this was correct only if
each VRF represented a NS. In our reorganization, we have created a NS
structure (struct zebra_ns) and VRFs don't correspond to namespaces (i.e.,
all VRFs exist in the default namespace). So, the RA handling should be
done under 'struct zebra_ns'.

With the changes, there is a single raw socket per NS (=> 1 for us) on which
we will receive and handle RAs for all interfaces. The interface information
is available through cmsg and the processing will then happen for that interface.

There is a problem with transmitting RAs over a VRF interface. This is
tracked by CM-9398.

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

9 years agoZebra: Tweak netlink socket creation function
vivek [Fri, 19 Feb 2016 22:18:35 +0000 (14:18 -0800)]
Zebra: Tweak netlink socket creation function

Since the netlink socket is per namespace and not per VRF, do not
invoke vrf_socket().

Note: This needs to be changed when we support multiple namespaces -
needed only for upstreaming.

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

9 years agoZebra: Link VRF to corresponding NS
vivek [Fri, 19 Feb 2016 22:03:06 +0000 (14:03 -0800)]
Zebra: Link VRF to corresponding NS

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket:
Reviewed By:
Testing Done:

9 years agoZebra: Fix vrf setting based on netlink messages
Don Slice [Fri, 19 Feb 2016 19:31:16 +0000 (19:31 +0000)]
Zebra: Fix vrf setting based on netlink messages

Adjusted application of vrf_id as interfaces are handled via netlink message.

Ticket: CM-9278
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
9 years agoOSPFv2 has both "router-id x.x.x.x" and "ospf router-id x.x.x.x"
Daniel Walton [Fri, 19 Feb 2016 13:36:06 +0000 (13:36 +0000)]
OSPFv2 has both "router-id x.x.x.x" and "ospf router-id x.x.x.x"

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

9 years agoRedistribute table related configs fail for BGP and OSPF
Daniel Walton [Fri, 19 Feb 2016 13:31:26 +0000 (13:31 +0000)]
Redistribute table related configs fail for BGP and OSPF

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

9 years agoZebra: Restrict automatic RA enable to relevant interfaces
vivek [Fri, 19 Feb 2016 02:47:32 +0000 (18:47 -0800)]
Zebra: Restrict automatic RA enable to relevant interfaces

When enabling IPv6 Router Advertisements automatically based on the
presence of IPv6 address on an interface, do it only for relevant
interfaces.

Note: This needs a configure option for completion.

Ticket: CM-9358
Reviewed By: CCR-4116
Testing Done: Manual verification

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
dslice [Thu, 18 Feb 2016 16:19:57 +0000 (08:19 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agozebra: fix creation of "other table" for rdnbrd
dslice [Wed, 17 Feb 2016 18:19:18 +0000 (10:19 -0800)]
zebra: fix creation of "other table" for rdnbrd

zebra: add the creation of the alternative table for rdnbrd in the context of vrfs

When rdnbrd pulls arp entries into table 10, which are then sent into quagga via netlink, the entries were incorrectly being added to the main table.  This fix creates or uses the alternative table if the table-id is not default but the vrf-id is default.  Tested manually and also run successfully in the /tests/l3/ospf_ebgp_redist_comprehensive_test.py:TestBasicEndToEndPing , which consistently failed bafore this fix was applied.

Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
9 years agoospf6d: Ensure that ospf6d is actually running before handling default routes
Donald Sharp [Thu, 18 Feb 2016 15:25:09 +0000 (10:25 -0500)]
ospf6d: Ensure that ospf6d is actually running before handling default routes

If a default route is passed into ospf6d then we need to make
sure that ospf6d is actually running before we accept and process it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
9 years agolib, vtysh: Rehook the motd command back into vtysh
Donald Sharp [Thu, 18 Feb 2016 15:23:45 +0000 (10:23 -0500)]
lib, vtysh: Rehook the motd command back into vtysh

Code was already in place to read and display a motd, but
no cli was present to make it happen.  Add the cli
back to vtysh.conf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
9 years agozebra: Fix 'show ipv6 nht' to actually work
Donald Sharp [Thu, 18 Feb 2016 14:07:55 +0000 (09:07 -0500)]
zebra: Fix 'show ipv6 nht' to actually work

The 'show ipv6 nht' command was not properly
hooked up into the cli.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
9 years agoBGP: Ensure correct sequence of processing at exit
vivek [Wed, 17 Feb 2016 16:41:33 +0000 (08:41 -0800)]
BGP: Ensure correct sequence of processing at exit

With VRF support, certain objects are now maintained per BGP instance. At
exit, the list of BGP instances has to be freed only after processing the
per-instance objects.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Fixes: ad4cbda1a32f0bf49d794ab5b156d49f95645871
Ticket: CM-9340
Reviewed By:
Testing Done:

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
sharpd [Tue, 16 Feb 2016 13:17:54 +0000 (05:17 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agodebian: Fix up some issues Dave pointed out and Fix Multi-Instance OSPF
sharpd [Sat, 13 Feb 2016 12:26:10 +0000 (04:26 -0800)]
debian: Fix up some issues Dave pointed out and Fix Multi-Instance OSPF

Address some start/stop issues that Dave has pointed out, in addition add
the ability to work with multi-instance ospf.

Ticket: CM-9298
Reviewed-by: Dave Olson
Testing: By hand and passed to Atul for further testing

9 years agozebra: set vrf-id on vrf slave interfaces
Don Slice [Mon, 15 Feb 2016 18:36:57 +0000 (18:36 +0000)]
zebra: set vrf-id on vrf slave interfaces
vrf: check netlink message for slave info and set the vrf-id accoringly

When a netlink newlink or link change comes into zebra, check the IFLA_INFO_SLAVE_KIND
to discover if the interface is a member of a vrf or not.  Set the vrf-id to the correct
value if the interface is a slave member

Signed-off-by: Don Sice
Reviewed-by:

9 years agoBGP: VRF registration and cleanup
vivek [Fri, 12 Feb 2016 20:18:28 +0000 (12:18 -0800)]
BGP: VRF registration and cleanup

Various changes and fixes related to VRF registration, deletion,
BGP exit etc.

- Define instance type
- Ensure proper handling upon instance create, delete and
  VRF add/delete from zebra
- Cleanup upon bgp_exit()
- Ensure messages are not sent to zebra for unknown VRFs

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

9 years agoQuagga: Support VRF unregister for clients
vivek [Fri, 12 Feb 2016 19:37:33 +0000 (11:37 -0800)]
Quagga: Support VRF unregister for clients

Clients (BGP, OSPF etc.) register with Zebra for information about
a VRF such as Router ID, interfaces and redistribution. Add API to
support unregister also which is required for the non-default VRF.

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

9 years agodebian: Add reload ability
sharpd [Fri, 12 Feb 2016 14:52:24 +0000 (06:52 -0800)]
debian: Add reload ability

Add the ability to issue 'systemctl reload quagga'
and for it to reload the quagga configuration.

Ticket: CM-9286
Reviewed-by: Daniel Walton
Testing: Manual

9 years agodebian: Temporary fix to get quagga services running
sharpd [Fri, 12 Feb 2016 13:11:21 +0000 (05:11 -0800)]
debian: Temporary fix to get quagga services running

Modify quagga startup control files to allow
for temporary startup while we iron out the
network.target details

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoBGP: Perform cleanup upon instance delete
vivek [Thu, 11 Feb 2016 22:45:58 +0000 (14:45 -0800)]
BGP: Perform cleanup upon instance delete

When a BGP instance is deleted through 'no router bgp', the required
cleanup was not being performed. This is after VRF-related changes.
Fix to ensure this is taken care of.

Note: Further changes needed in this area for VRFs.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-9597
Reviewed By: CCR-4097
Testing Done: Verified failed test

9 years agoBGPD crash around bgp_config_write ()
Daniel Walton [Thu, 11 Feb 2016 17:28:11 +0000 (17:28 +0000)]
BGPD crash around bgp_config_write ()

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

9 years agoquagga: remove babel
Daniel Walton [Thu, 11 Feb 2016 16:55:24 +0000 (08:55 -0800)]
quagga: remove babel

Ticket: CM-9274
Reviewed By: sharpd@cumulusnetworks.com
Testing Done:

<DETAILED DESCRIPTION (REPLACE)>

9 years agoripd: Fix crash when a default route is passed to rip
Donald Sharp [Thu, 11 Feb 2016 16:29:36 +0000 (08:29 -0800)]
ripd: Fix crash when a default route is passed to rip

When rip is not configured and zebra decides to send
a default route to it, check to make sure that rip is
configured before accepting anything from zebra.

Ticket: CM-9270
Reviewed-by: Don Slice
Tested: OSPF test case that was erroring out no longer
happens

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoquagga: remove "cn321" passwords from the default conf file for each
Daniel Walton [Thu, 11 Feb 2016 13:33:21 +0000 (13:33 +0000)]
quagga: remove "cn321" passwords from the default conf file for each
daemon

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

9 years agoripngd: Add missing systemd notifications
Donald Sharp [Thu, 11 Feb 2016 13:18:43 +0000 (08:18 -0500)]
ripngd: Add missing systemd notifications

Initial pass of adding systemd callbacks were missed for
ripngd.  This commit adds those calls.

Ticket: CM-9267
Reviewed-by: Don Slice
Testing: See Bug

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agozebra: All slave devices were being treated as vrfs
sharpd [Thu, 11 Feb 2016 02:28:13 +0000 (18:28 -0800)]
zebra: All slave devices were being treated as vrfs

When a slave device is received via netlink, all the
devices were being treated as vrf's instead of the
myriad of slave devices that are possible.

Add code to check to see if the device is truly a vrf slave
or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Wed, 10 Feb 2016 21:09:27 +0000 (13:09 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agoOSPF distance command does not accept "external <1-255>"
Daniel Walton [Wed, 10 Feb 2016 21:02:23 +0000 (21:02 +0000)]
OSPF distance command does not accept "external <1-255>"

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Wed, 10 Feb 2016 21:01:53 +0000 (13:01 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agozebra: fix interface lookup for vrf configuration
Don Slice [Wed, 10 Feb 2016 17:53:21 +0000 (09:53 -0800)]
zebra: fix interface lookup for vrf configuration

Ticket:CM-9073
Reviewed By: sharpd
Testing Done:Manual, see ticket

Changed logic when "interface swpxx <vrf foo>" entered so that:

1. it matches when the command is entered without a vrf but the interface already exists in a vrf.
2. If the command is entered with a vrf name that is different than is defined by the kernel, the command is rejected.
3. If the call is made from other than the vty session, believe the new information and update the vrf accordingly.

9 years agoBuild was broken if systemd was not installed
Daniel Walton [Wed, 10 Feb 2016 20:47:05 +0000 (20:47 +0000)]
Build was broken if systemd was not installed

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agodebian: Add Systemd integration to control files
Donald Sharp [Wed, 10 Feb 2016 12:30:56 +0000 (07:30 -0500)]
debian: Add Systemd integration to control files

Ticket:
Reviewed By: inprogress
Testing Done: minimal.  Built, installed, started a few services.

This is in progress testing.  quagga.service tries to start and stop
all the routing daemons.  There is no check for whether they are enabled
via /etc/quagga/daemons (yet).

As installed, nothing is enabled (won't start on system boot or install).

The -A 127.0.0.1 is now in /etc/default/quagga, and picked up from there
by all routing daemons.

MAX_FDS is in all the service files for now as LimitNOFILE.  Users who
need to modified the number of fd's will use e.g.
the file /etc/systemd/system/bgpd.service.d/maxfds.conf to override
bgpd.service contents
    [Service]
    LimitNOFILE=2048

MAX_INSTANCES isn't implemented yet.

reload isn't implemented yet (it should be possible via ExecReload
in the services, just not done yet).

The init.d file is removed.

All of the daemons are started without the -d/--daemonize option, and
use Type=simple rather than forking in the services file, to use the
systemd daemonizing.

All the daemons were set to have a 1m start time, and restart up to 3
times in 3 minutes, and for now, are only restart on-abnormal, not always
(we'll likely want the latter, but testing is easier with abnormal).

Also use tmpfiles.d to create /run/quagga

For now, we leave dh_installinit, even though it creates unneeded
update-rc.d calls, and causes lintian complaints about init.d files
that aren't present, so that it installs files like etc/default/quagga.
It also runs the tmpfiles.d commands for us, so we need to add those to
postinst if we dummy it out to fix the update-rc.d lines being added
(and lintian complaints).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years ago*: Modify protocols to have systemd integration
Donald Sharp [Wed, 10 Feb 2016 13:15:42 +0000 (08:15 -0500)]
*: Modify protocols to have systemd integration

Modify the daemons to integrate with systemd, if it is enabled via configure,
and to notify systemd that they are running/stopping and to send watch
notifications.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agovtysh: Modify -b option to work with -n option
Donald Sharp [Wed, 10 Feb 2016 13:14:10 +0000 (08:14 -0500)]
vtysh: Modify -b option to work with -n option

If there is no Quagga.conf file and the -b option has
been specified, the vtysh -b file is erroring out and failing.

Modify the code to use -n in conjunction of -b and to not
error out in this situation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agolib: Add library code to interact with systemd
Donald Sharp [Wed, 10 Feb 2016 12:24:11 +0000 (07:24 -0500)]
lib: Add library code to interact with systemd

Modify the lib/ code to include the ability to interact
with systemd.  Provide the ability to interact with
systemd's watchdog timer as well.

There is no code here that actually uses this change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agozebra: display_vrf_name_on_interface
Don Slice [Thu, 4 Feb 2016 15:41:11 +0000 (07:41 -0800)]
zebra: display_vrf_name_on_interface

Changed vrf output from vrf_id to vrf name in "show interface"

Ticket: CM-9131
Reviewed By: sharpd
Testing Done: Manual testing, see ticket

9 years agozebra: show_interface_name_vrf fix
Don Slice [Thu, 4 Feb 2016 13:59:12 +0000 (05:59 -0800)]
zebra: show_interface_name_vrf fix

Ticket: CM-9110
Reviewed By:
Testing Done: Manual testing, see ticket

Aliased "show interface name swpxx" to "show interface name swpxx vrf all" to find the interface regarless of which vrf it resides in.

9 years agodebian: Remove 'Do you want to stop Quagga' Question
Donald Sharp [Wed, 3 Feb 2016 19:44:56 +0000 (14:44 -0500)]
debian: Remove 'Do you want to stop Quagga' Question

During the upgrade process of quagga, the user is asked
if they would like to stop quagga.  There is no point in
asking this question.  The fact that you are upgrading
means you are willing for a service interruption.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 3 Feb 2016 14:01:59 +0000 (09:01 -0500)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agolib, vtysh, zebra: Better VRF debug handling
Donald Sharp [Wed, 3 Feb 2016 14:00:25 +0000 (09:00 -0500)]
lib, vtysh, zebra: Better VRF debug handling

Fixup the debug handling of vrf's to be a bit
more explicit how we create a vrf internally.

Add code to turn on/off debugging of vrf's.

Ticket: CM-9063
Testing: Manual

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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>
9 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

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

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

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

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

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

9 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

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

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

9 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

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

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

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

9 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

9 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

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

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

9 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

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

9 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

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

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

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