]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years agoBGP: Update commands for VRF support
vivek [Mon, 7 Mar 2016 00:08:49 +0000 (00:08 +0000)]
BGP: Update commands for VRF support

Ensure commands dealing with display of routes and nexthops support
VRFs.

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

8 years agoquagga-reload should not call vtysh for every command that needs to be
Daniel Walton [Fri, 4 Mar 2016 00:46:58 +0000 (00:46 +0000)]
quagga-reload should not call vtysh for every command that needs to be
added

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

8 years agodebian: Fixup install location of quagga
Donald Sharp [Thu, 3 Mar 2016 14:26:56 +0000 (09:26 -0500)]
debian: Fixup install location of quagga

Fix the install location of the quagga script
to /usr/bin/quagga.

Additionally reset restart controls to a more
normal level in the service files.

Ticket: CM-9492
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoip/ipv6 prefix-list seq number range needs to be fixed - wraps around to
Daniel Walton [Wed, 2 Mar 2016 20:42:01 +0000 (20:42 +0000)]
ip/ipv6 prefix-list seq number range needs to be fixed - wraps around to
negative value

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

8 years agobgpd: Remove expensive prefix count from json.
Donald Sharp [Wed, 2 Mar 2016 20:04:51 +0000 (15:04 -0500)]
bgpd: Remove expensive prefix count from json.

'show bgp ipv4 uni summ' is counting each prefix sent
to each neighbor.  At scale this is an expensive
operation.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoMake duplicate ospf commands hidden
Daniel Walton [Wed, 2 Mar 2016 19:56:28 +0000 (19:56 +0000)]
Make duplicate ospf commands hidden

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agovtysh: make HIDDEN commands work
Daniel Walton [Wed, 2 Mar 2016 19:55:32 +0000 (19:55 +0000)]
vtysh: make HIDDEN commands work

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

8 years agoBGP: Handle unknown interface at delete
vivek [Wed, 2 Mar 2016 07:40:14 +0000 (07:40 +0000)]
BGP: Handle unknown interface at delete

When BGP deals with interfaces at a VRF-level, it may get an interface delete
for a VRF which it has just de-registered, so it may not be able to locate
the interface. This is no longer an error, so handle this in the message
processing.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9462
Reviewed By: None (trivial)
Testing Done: None

8 years agoZebra: Cleanup registered nexthops upon client exit
vivek [Wed, 2 Mar 2016 01:08:43 +0000 (01:08 +0000)]
Zebra: Cleanup registered nexthops upon client exit

Ensure registered nexthops are cleaned up when bgpd exits.

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

8 years ago"show ip bgp neighbor json" displays "Hostname: ", invalidates json
Daniel Walton [Tue, 1 Mar 2016 21:59:25 +0000 (21:59 +0000)]
"show ip bgp neighbor json" displays "Hostname: ", invalidates json
format

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

8 years agolib: Fix crash when deleting multiple statements
Donald Sharp [Tue, 1 Mar 2016 21:44:23 +0000 (16:44 -0500)]
lib: Fix crash when deleting multiple statements

When deciding if we should delete a table we were
only looking at the part of the data structures
associated with the table to see if it was empty.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoospfd: Fix MI redistribution
Donald Sharp [Tue, 1 Mar 2016 15:03:19 +0000 (10:03 -0500)]
ospfd: Fix MI redistribution

If we are attempting to redistribute from a MI ospf
then when should only check for the non MI case if
instance was not passed in.

Ticket: CM-9543
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agolib, vtysh: Fix 'banner motd file' command
Donald Sharp [Tue, 1 Mar 2016 02:20:14 +0000 (21:20 -0500)]
lib, vtysh: Fix 'banner motd file' command

the File to specify was inadvertently a optional parameter.
Dissallow this.

Ticket: CM-9431
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agodebian: Remove some unnecesary files from debian directory.
Donald Sharp [Tue, 1 Mar 2016 00:52:40 +0000 (19:52 -0500)]
debian: Remove some unnecesary files from debian directory.

The daemons file is no longer needed as well as the debian.conf
file.  They have been subsumed by the systemd initialization
methodology.

Ticket: CM-9581
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoBGP: Unnumbered peering in a VRF
vivek [Mon, 29 Feb 2016 18:04:29 +0000 (18:04 +0000)]
BGP: Unnumbered peering in a VRF

Code changes to make unnumbered peering work in a VRF. The changes have
to do with locating the interface in the correct VRF (in order to look for
neighbor address) in the case of outgoing connections and when specifying
source address as well as fetching the correct instance for an incoming
connection based on reading the device the socket is bound to (the multi-vrf
socket option in the kernel).

Additionally, for IPv4 unnumbered peering in a VRF (based on /30 or /31
addresses), bind to the VRF rather than the interface.

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

8 years agoZebra: Move VRF keyword in show ip route commands
Don Slice [Sun, 28 Feb 2016 22:03:27 +0000 (22:03 +0000)]
Zebra: Move VRF keyword in show ip route commands

To make the syntax of the "show ip route" vrf commands more closely align with the bgp variety,
moved the vrf forward in the command.  In other words, show ip route 10.1.1.1/32 vrf green became
show ip route vrf green 10.0.0.1/32.  Also added a couple of missing show vrf commands (ipv4 and
ipv6 tags).

Ticket: CM-9114
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoQuagga: Fix interface move from VRF to default VRF
vivek [Sun, 28 Feb 2016 03:06:35 +0000 (03:06 +0000)]
Quagga: Fix interface move from VRF to default VRF

Ensure that during interface lookup (non-vty context), if the interface is
found in a different VRF, it is "moved" into the requested VRF.

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

8 years agoZebra: Fix static NHT to work properly in a VRF
vivek [Fri, 26 Feb 2016 19:51:34 +0000 (19:51 +0000)]
Zebra: Fix static NHT to work properly in a VRF

Cleanup code and improve debugs as part of fixing NHT for static routes
in a VRF.

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

8 years agoZebra: Fix static NHT to work properly in a VRF
vivek [Fri, 26 Feb 2016 19:13:34 +0000 (19:13 +0000)]
Zebra: Fix static NHT to work properly in a VRF

Implement VRF support for static nexthop resolution (NHT). This is
achieved by ensuring the correct VRF is passed as a parameter to
the NHT functions and is stored in the registered nexthop data
structure.

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

8 years agoQuagga: Implement VRF change semantics for an interface
vivek [Thu, 25 Feb 2016 19:46:57 +0000 (19:46 +0000)]
Quagga: Implement VRF change semantics for an interface

Enhance some debug logs as part of implementing VRF change semantics
for an interface.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

8 years agoZebra: Fix neighbor address notification to clients
vivek [Thu, 25 Feb 2016 19:44:28 +0000 (19:44 +0000)]
Zebra: Fix neighbor address notification to clients

This problem was fixed as part of implementation of VRF change semantics
for an interface, though it is not directly related. The issue here
was that neighbor addresses learnt on an interface were being informed
to clients even though the clients may not have learnt of the interface.
Fixed by introducing the correct checks.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

8 years agoQuagga: Implement VRF change semantics for an interface
vivek [Thu, 25 Feb 2016 19:41:01 +0000 (19:41 +0000)]
Quagga: Implement VRF change semantics for an interface

Invoke VRF change for an interface, if appropriate, upon netlink
notification.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

8 years agoQuagga: Implement VRF change semantics for an interface
vivek [Thu, 25 Feb 2016 19:39:25 +0000 (19:39 +0000)]
Quagga: Implement VRF change semantics for an interface

Handle VRF change for an interface in BGP (the only VRF client
right now).

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

8 years agoQuagga: Implement VRF change semantics for an interface
vivek [Thu, 25 Feb 2016 19:30:53 +0000 (19:30 +0000)]
Quagga: Implement VRF change semantics for an interface

Implement VRF change semantics for an interface to be invoked
when an interface is moved from one VRF (e.g., the Default) to
another. This includes the message definition as well as updating,
deleting or adding the interface from clients, depending on their
interest in the VRFs (old and new). Also handle replay of the
addresses on the interface upon VRF change, if required.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Ticket: CM-9527
Reviewed By: CCR-4174
Testing Done: Manual tests of various scenarios

8 years agovtysh: Add ability to only look at one processes work queue
Donald Sharp [Thu, 25 Feb 2016 12:29:29 +0000 (07:29 -0500)]
vtysh: Add ability to only look at one processes work queue

When examining performance information it is nice to not
have to look at daemons who you are not interested in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 24 Feb 2016 20:06:58 +0000 (15:06 -0500)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agobgpd: Fix function indirection when none is needed
Donald Sharp [Wed, 24 Feb 2016 20:05:46 +0000 (15:05 -0500)]
bgpd: Fix function indirection when none is needed

bgp_update_main was only called by bgp_update.
bgp_update only called bgp_update_main.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reivewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoZebra: Improve output of show ip route vrf all
Don Slice [Wed, 24 Feb 2016 15:48:32 +0000 (15:48 +0000)]
Zebra: Improve output of show ip route vrf all

Changed output to use the name and table id rather than the vrf_id, since the vrf_id
isn't really meaningful to customers reading the output.

Ticket: CM-9464
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Wed, 24 Feb 2016 12:45:29 +0000 (07:45 -0500)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoospfd: Fix some missing 'no XXX' commands
Donald Sharp [Wed, 24 Feb 2016 12:43:22 +0000 (07:43 -0500)]
ospfd: Fix some missing 'no XXX' commands

A recent modification accidently removed the 'no XXXX'
form of some commands that cl-ospf depended on.

Tickets: CM-9481
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Wed, 24 Feb 2016 04:10:07 +0000 (04:10 +0000)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agoBGP: Fix interface list upon instance creation/deletion
vivek [Tue, 23 Feb 2016 23:55:06 +0000 (23:55 +0000)]
BGP: Fix interface list upon instance creation/deletion

The BGP instance cleanup was deleting interfaces in that instance after
prior fixes, but this ended up deleting the interface list header which
was not being re-created. Added code to re-create this at the time an
instance is created.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-9466
Reviewed By: CCR-4164
Testing Done: Manual and verified failed test

8 years agoospf6d: Fix for crash when non area 0 network entered first
Donald Sharp [Tue, 23 Feb 2016 23:47:55 +0000 (18:47 -0500)]
ospf6d: Fix for crash when non area 0 network entered first

When a user specifies a non area 0 network in an ospf6d
config the daemon could crash.

Ticket: CM-9134
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Tue, 23 Feb 2016 20:30:48 +0000 (20:30 +0000)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agobgpd: Add exclamation point separators between address-family blocks
Don Slice [Tue, 23 Feb 2016 20:28:44 +0000 (20:28 +0000)]
bgpd: Add exclamation point separators between address-family blocks

Added the exclamation point and newline between each address-family block in bgp

Ticket: CM-9268
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agodebian: Fixup removal of .pid and .vty files
Donald Sharp [Tue, 23 Feb 2016 20:06:59 +0000 (15:06 -0500)]
debian: Fixup removal of .pid and .vty files

The <daemon>.pid and <daemon>.vty files were not being
removed on shutdown.  This was causing issues w/
logrotate becaue it depends on pid files being correct
about what is running in order to not error out.

Fixed some additional debugs accidently left in the quagga
script.

Ticket: CM-9293
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
sharpd [Tue, 23 Feb 2016 17:02:24 +0000 (09:02 -0800)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agodebian: Revamp startup again
sharpd [Mon, 22 Feb 2016 21:22:16 +0000 (13:22 -0800)]
debian: Revamp startup again

Remove quagga.service, it was a bad idea culminating in a
series of mistakes.

Replaced with /usr/lib/quagga/quagga script.

Use this script to start/stop quagga as a whole.

Ticket: CM-9445
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
8 years agoBGPD: Make "Bind to connect" messages conditional no debug
Don Slice [Tue, 23 Feb 2016 15:16:23 +0000 (15:16 +0000)]
BGPD: Make "Bind to connect" messages conditional no debug

Added debug requirement to issue the Bind to connect messages that were filling the logs.

Ticket:CM-9463
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
8 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Tue, 23 Feb 2016 12:48:00 +0000 (07:48 -0500)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

8 years agodebian, config, zebra: Ensure Cumulus Extensions are not auto turned on
Donald Sharp [Sun, 21 Feb 2016 17:43:50 +0000 (12:43 -0500)]
debian, config, zebra: Ensure Cumulus Extensions are not auto turned on

There exist cases where Cumulus Code( in this case code surrounding
when we want to send Router Advertisements ) should only be
turned on for Cumulus Switches.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoZebra: Zebra: Display interface info for NHT in a VRF
vivek [Tue, 23 Feb 2016 04:17:09 +0000 (04:17 +0000)]
Zebra: Zebra: Display interface info for NHT in a VRF

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

8 years agoZebra: Perform NHT evaluation for VRFs
vivek [Tue, 23 Feb 2016 03:42:19 +0000 (03:42 +0000)]
Zebra: Perform NHT evaluation for VRFs

NHT evaluation was not being triggered for any VRF after RIB processing. Fix
this and attempt to schedule only those VRFs for which RIB processing was
scheduled.

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

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

8 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

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

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

8 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

8 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

8 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

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

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

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

8 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

8 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

8 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

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

8 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

8 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

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

8 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

8 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

8 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

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

8 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

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

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

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

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

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

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

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

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

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