]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
9 years agoBGP peers remain in active while rdnbrd is running.
Daniel Walton [Mon, 25 Apr 2016 20:19:08 +0000 (20:19 +0000)]
BGP peers remain in active while rdnbrd is running.

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

If the route-map for an "ip import-table" denied a route it only flagged
the nexthop as inactive, it did not actually delete the route. This
breaks all directly connected EBGP peers that peer via IPv4 because NHT
finds this /32 with an inactive nexthop.

9 years agoUpdate last reset reason on interface down or neighbor addr loss.
Dinesh G Dutt [Fri, 22 Apr 2016 22:15:25 +0000 (15:15 -0700)]
Update last reset reason on interface down or neighbor addr loss.

Ticket:
Reviewed By:
Testing Done:

For interface-based peering, we don't update the reset reason to be
interface down. Similarly, we don't update the reason to be loss of
neighbor address (maybe due to RA loss). This patch addresses these
limitations.

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 22 Apr 2016 16:34:04 +0000 (12:34 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agolib: bfd debug fixup
Donald Sharp [Fri, 22 Apr 2016 11:41:08 +0000 (07:41 -0400)]
lib: bfd debug fixup

BFD debugs were being output without any
debug protection.  Modify the code
to not output unless debugging is
turned on.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
9 years agobgpd: debug protect a log message
Donald Sharp [Fri, 22 Apr 2016 01:34:48 +0000 (21:34 -0400)]
bgpd: debug protect a log message

With the addition of RA being turned on by default.
Spewing this error message when unable to connect
doesn't make much sense anymore.

Ticket: CM-10494
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Don Slice [Fri, 22 Apr 2016 12:40:09 +0000 (05:40 -0700)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agozebra: Change interface handling so non-vrf aware protocols correctly handle them
Don Slice [Fri, 22 Apr 2016 00:12:26 +0000 (17:12 -0700)]
zebra: Change interface handling so non-vrf aware protocols correctly handle them

Changed interaction between zebra and routing protocols so that they correctly
fill in the vrf_iflist even for vrfs they're not responsible for.  In that way,
when they get callbacks from zebra they can correctly understand whether they need
to create them or not.

Ticket: CM-10427
Signed-off-by: Don Slice
Reviewed-by:

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Dinesh G Dutt [Fri, 22 Apr 2016 01:41:47 +0000 (18:41 -0700)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agoAddition on hidden command "bfd multihop/singlehop" and "ptm-enable" per interface...
radhika [Thu, 21 Apr 2016 22:39:38 +0000 (15:39 -0700)]
Addition on hidden command "bfd multihop/singlehop" and "ptm-enable" per interface command

CM-10435
Issue: IBGP BFD sessions are created as multi-hop even though peer is single-hop away. This is causing an interop issue with ICOS.
Root Cause: By design all IBGP peers are registered with BFD as multi-hop.
Fix:
• Changed the default behavior of always treating IBGP BFD sessions as mult-hop. shared_network variable is used to determine whether the IBGP peer is single hop or multi-hop away. The logic for determining whether EBGP peer is single hop or multi-hop has not been changed.
• Since the default behavior has been changed, it will cause interop issues between 2.5 and 3.0 IBGP BFD sessions. A new hidden command “bfd multihop/singlehop” has been introduced to overcome the interop issues.

dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd
<2-255> Detect Multiplier
<cr>
dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop
dell-s6000-10(config-router)# no neighbor 30.0.2.6 bfd multihop
dell-s6000-10(config-router)#
dell-s6000-10(config-router)# neighbor 30.0.2.6 bfd multihop
dell-s6000-10(config-router)# do show running-config
!
router bgp 100
neighbor igroup peer-group
neighbor igroup bfd 5 500 500
neighbor igroup bfd multihop
neighbor 30.0.2.2 remote-as 100
neighbor 30.0.2.2 peer-group igroup
neighbor 3101:abc:bcad::2 remote-as 100
neighbor 3101:abc:bcad::2 peer-group igroup
neighbor 30.0.2.6 remote-as 200
neighbor 30.0.2.6 bfd multihop
neighbor 3102:abc:bcad::6 remote-as 200
neighbor 3102:abc:bcad::6 bfd
neighbor 3102:abc:bcad::6 ebgp-multihop 255
!

CM-10260
Issue: “Unable to connect to socket” message keeps getting logged when ptmd process doesn’t exist.
Root Cause: BFD clients (bgpd, ospfd and ospf6d) during initialization try to register with BFD/PTM by default. This results in continuous logging If PTM does not exist since there is no max on number of retries.
Fix:
• Stop the retries to connect to PTM after max reconnect timer of 5 mins is reached.
• Added zebra debug event wrapper to message logging to prevent it from showing by default.

CM-4541
Issue: Addition of a new command "ptm-enable" or "no ptm-enable" per interface to enable/disable PTM link status checks for an interface.
Fix: Currently there is only one ptm-enable global command that enables/disables PTM status updates for all interfaces. This new command will give the handle to individually stop interface from reacting on the PTM status updates.
• by default interface uses the ptm-enable global configuration
• "no ptm-enable" on an interface will disable PTM status updates from taking affect for that interface. This can bring the interface up if it was brought down due to PTM status update.
• "ptm-enable" on an interface will cause the interface to fallback to the global ptm-enable configuration value and will bring the interface up or down based on the last stored PTM status update if global ptm is enabled.

Ticket: CM-10435, CM-10260 and CM-4541
Signed-off-by: Radhika Mahankali
Reviewed-by: Donald Sharp, Kanna Rajagopal
9 years agoquagga-reload broken for 'neighbor swpX interface peer-group FOO'
Daniel Walton [Thu, 21 Apr 2016 20:21:29 +0000 (20:21 +0000)]
quagga-reload broken for 'neighbor swpX interface peer-group FOO'

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

9 years agoGet route counts right for show ip route summary
Dinesh G Dutt [Thu, 21 Apr 2016 05:27:29 +0000 (22:27 -0700)]
Get route counts right for show ip route summary

Ticket: CM-9974
Reviewed By: CCR-4531
Testing Done: Testing with both single & multiple NHs

Zebra is counting each NH as a separate route which leads to all wrong
stats. Count routes, not NHs.

9 years agozebra: Only create vrf route-node if in the kernel
Don Slice [Thu, 21 Apr 2016 16:15:07 +0000 (16:15 +0000)]
zebra: Only create vrf route-node if in the kernel

Changed vrf_get to only create a route-node if the kernel has enabled the vrf,
supplying a table-id.  If the quagga configuration contains vrfs that have not
yet been enabled by the kernel, the vrf is created with a vrf_id of VRF_UNKNOWN.
These vrfs are added to the vrf_list so they contain a zvrf and configuration,
but the route-node is not created until the kernel has signalled that the vrf
has been defined and enabled.

Ticket: CM-10481
Signed-off-by: Don Slice
Reviewed-by: Donald Sharp
9 years agobgp: Anti-Yammer Patch
Donald Sharp [Thu, 21 Apr 2016 02:08:49 +0000 (22:08 -0400)]
bgp: Anti-Yammer Patch

When you shutdown interfaces with ifdown -a -X eth0
bgp would still attempt to talk to it's configured
neighbors but since the interface is down it would
just complain and complain.  Now that we have
somewhat aggressive timers the error message
really starts to show up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
9 years agozebra: Fix zebra_rnh_register crash
Donald Sharp [Wed, 20 Apr 2016 20:12:29 +0000 (16:12 -0400)]
zebra: Fix zebra_rnh_register crash

Zebra is crashing inside of zserv_rnh_register when it attempts to
lookup a vrf that was just deleted:

Imagine this series of events:

Pre (A): ifdown -a -X eth0
(A) zebra notification from kernel that vrf is goneroo
(B) zebra notifies all daemons
(C) bgpd is churning because we have been removing interfaces and we
have an new path and it hasn't handled the vrf goneroo event yet from
zebra so it sends to zebra a new rnh with an old vrf_id.
(D) zebra attempts to lookup the zvrf and crashes because of pointer
dereference.

zebra handles all callbacks in one function. Convert that function to
check to see if we have a valid zvrf. If so make the callback

Ticket: CM-10482
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agoBGP: Certain peer-group parameters (e.g., enhe, local-as) are not taking
Daniel Walton [Tue, 19 Apr 2016 02:26:57 +0000 (02:26 +0000)]
BGP: Certain peer-group parameters (e.g., enhe, local-as) are not taking
effect

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

9 years agoFixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopback...
kitty [Fri, 19 Feb 2016 05:33:40 +0000 (21:33 -0800)]
Fixes Quagga Bugzilla #842 - ospfd uses non-zero metric when describing loopback addresses

Change-Id: Iff33d70089d1393bf3e9c757d9e9faf134699121
Signed-off-by: kitty <khiruthigai.balasubramanian@hpe.com>
Tested-by: NetDEF CI System <cisystem@netdef.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 15 Apr 2016 19:22:11 +0000 (15:22 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agodebian: Remove /usr/bin/quagga from distribution
Donald Sharp [Fri, 15 Apr 2016 14:04:30 +0000 (10:04 -0400)]
debian: Remove /usr/bin/quagga from distribution

We've decided to remove /usr/bin/quagga from
the quagga packaging.  It was only going
to confuse the end user.

Ticket: CM-10456
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
9 years agovtysh: Allow file read in to continue in more cases
Donald Sharp [Fri, 15 Apr 2016 13:15:21 +0000 (09:15 -0400)]
vtysh: Allow file read in to continue in more cases

When a duplicate command is read in from a file,
there are cases where daemons return CMD_WARNING
this causes the command to not be send to subsuquent
daemons( if any ).

Allow the read in of commands to continue in this
situation.

Ticket: CM-10393
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
9 years agoquagga: Check for existence of IFLA_INFO_SLAVE_KIND
Donald Sharp [Fri, 15 Apr 2016 17:09:58 +0000 (13:09 -0400)]
quagga: Check for existence of IFLA_INFO_SLAVE_KIND

IFLA_INFO_SLAVE_KIND is a new type of netlink message
If the kernel makes it available compile in support
else we'll just silently do the right thing.

Additionally reduce the test cases for netlink by 1
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: David Ahern <dsa@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib: Fix json.c compile on older platforms
Donald Sharp [Fri, 15 Apr 2016 19:01:46 +0000 (15:01 -0400)]
lib: Fix json.c compile on older platforms

The header file inclusions for json.c was wrong.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agovtysh -f needs to flock the file
Daniel Walton [Fri, 15 Apr 2016 13:13:27 +0000 (13:13 +0000)]
vtysh -f needs to flock the file

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

9 years agolib, bgpd: Refactor vrf handling through zclient
Donald Sharp [Fri, 15 Apr 2016 01:46:44 +0000 (21:46 -0400)]
lib, bgpd: Refactor vrf handling through zclient

Protocols receive zclient vrf creation events from zebra.
This data was being handed to the protocol to decode and
then to hand back to zclient to create the vrf to then
handle appropriately.  This is a bad idea.

Modify the code such that when zclient.c receives a vrf
event from zebra that it decodes the data and just creates
the vrf.  Individual protocols just need to handle the
appropriate vrf events.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Donald Sharp [Fri, 15 Apr 2016 00:59:05 +0000 (20:59 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agozebra: Refactor zebra_vrf
Donald Sharp [Thu, 14 Apr 2016 13:20:47 +0000 (09:20 -0400)]
zebra: Refactor zebra_vrf

Move zebra_vrf_XXX functionality into it's own
file so that we can isolate a bit the api edges

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib, zebra: Rework zebra_ns to be a bit more modular
Donald Sharp [Thu, 14 Apr 2016 02:40:18 +0000 (22:40 -0400)]
lib, zebra: Rework zebra_ns to be a bit more modular

The struct zebra_ns was littered throughout the code
base in a half-hazard fashion.  Gather up the references
and isolate the code a bit better.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agozebra: Refactor struct zebra_t
Donald Sharp [Wed, 13 Apr 2016 16:21:47 +0000 (12:21 -0400)]
zebra: Refactor struct zebra_t

We were including 'extern struct zebra_t zebrad;' all
over the place.  This made no sense.  Refactor
into zserv.h where the definition was and remove resulting
unnecessary code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib, zebra: Rework vrf_add_update
Donald Sharp [Wed, 13 Apr 2016 14:06:36 +0000 (10:06 -0400)]
lib, zebra: Rework vrf_add_update

The vrf_add_update function does not need to exist.
Move it's constituent parts into the appropriate
vrf_create/vrf_enable functionality as well as
move the zebra_vrf_add_update() function call
into zebra_vrf_enable()

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib, zebra: Rearrange vrf_delete_update
Donald Sharp [Wed, 13 Apr 2016 12:20:33 +0000 (08:20 -0400)]
lib, zebra: Rearrange vrf_delete_update

vrf_delete_update really belongs in vrf.c broken up
into it's appropriate places.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agoBGP: cannot "no neighbor ISL timers 3 10" for peer-group
Daniel Walton [Thu, 14 Apr 2016 20:34:43 +0000 (20:34 +0000)]
BGP: cannot "no neighbor ISL timers 3 10" for peer-group

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

9 years agoquagga: "set community x:y" needs bounds checking
Daniel Walton [Thu, 14 Apr 2016 18:16:43 +0000 (18:16 +0000)]
quagga: "set community x:y" needs bounds checking

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

superm-redxp-05# conf t
superm-redxp-05(config)# route-map FOO permit 10
superm-redxp-05(config-route-map)# set community ?
  AA:NN  Community number in AA:NN format (where AA and NN are <0-65535>) or local-AS|no-advertise|no-export|internet or additive
  none   No community attribute
superm-redxp-05(config-route-map)# set community 2:2
superm-redxp-05(config-route-map)# set community 2:70000
% Malformed communities attribute
superm-redxp-05(config-route-map)# set community 70000:2
% Malformed communities attribute
superm-redxp-05(config-route-map)#

9 years agoBGP: Register with correct VRF id for redistribution
vivek [Thu, 14 Apr 2016 01:41:58 +0000 (18:41 -0700)]
BGP: Register with correct VRF id for redistribution

When doing a redistribution re-registration upon route-map
updates, the correct VRF id was not being used. Fixed.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Ticket: CM-10311
Reviewed By: Trivial
Testing Done: Manual - verified failed scenario

9 years agoBGP: Use VRF_UNKNOWN for initialization
vivek [Wed, 13 Apr 2016 22:43:15 +0000 (15:43 -0700)]
BGP: Use VRF_UNKNOWN for initialization

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
Ticket: CM-10423
Reviewed By: CCR-4474
Testing Done: Manual (basic checks)

9 years ago'systemctl restart zebra' was blocking if the BGP ASN changed due to
Daniel Walton [Wed, 13 Apr 2016 20:54:30 +0000 (20:54 +0000)]
'systemctl restart zebra' was blocking if the BGP ASN changed due to
restarting bgpd

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
9 years agostop/start of zebra creates empty Quagga.conf file when "no service
Daniel Walton [Wed, 13 Apr 2016 20:52:48 +0000 (20:52 +0000)]
stop/start of zebra creates empty Quagga.conf file when "no service
integrated-vtysh-config"

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

We do not need to pass O_CREAT to open() when creating the flock file

9 years agoMerge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
vivek [Wed, 13 Apr 2016 18:08:57 +0000 (11:08 -0700)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agoBGP: Implement key show commands for all VRFs
vivek [Wed, 13 Apr 2016 00:33:03 +0000 (17:33 -0700)]
BGP: Implement key show commands for all VRFs

Key BGP 'show' commands have been expanded to support 'vrf all':

show ip bgp vrf all summary
show ip bgp vrf all neighbors
show ip bgp vrf all nexthop
show ip bgp vrf all update-group
show ip bgp vrf all
show bgp vrf all summary
show bgp vrf all update-group
show bgp vrf all

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

9 years agodebian: Add the creation of the quagga user to quaggavty group
Donald Sharp [Wed, 13 Apr 2016 00:44:28 +0000 (20:44 -0400)]
debian: Add the creation of the quagga user to quaggavty group

The creation of the quagga user was not the only place
to add the quagga user to the quaggavty group.  If
we are reinstalling quagga over a old version of
code then we need to check to see if the quagga
user is in the quaggavty and do the right thing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Dave Olson <olson@cumulusnetworks.com>
9 years agolib, zebra: Refactor vrf creation a bit more
Donald Sharp [Fri, 8 Apr 2016 19:32:53 +0000 (19:32 +0000)]
lib, zebra: Refactor vrf creation a bit more

Create the idea of a VRF_UNKNOWN, this is for a vrf where we don't
yet have the vrf_id for it yet.

Refactor the vrf_create code out of existence.  We had two code
paths vrf_create and vrf_get.  We should use vrf_get to create
the new vrf since XXX_get() creates the data structures now.

Signed-off-by: Donald Sharp
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib: passing in vrf string length is not needed
Donald Sharp [Fri, 8 Apr 2016 18:34:54 +0000 (18:34 +0000)]
lib: passing in vrf string length is not needed

vrf_create does not need the string length of the vrf.
Remove it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
9 years agolib: Fix priviledge modification for vty group specified
Donald Sharp [Fri, 8 Apr 2016 23:20:34 +0000 (19:20 -0400)]
lib: Fix priviledge modification for vty group specified

When attempting to switch runtime permissions over to
the correct group specified for the vty group, if the
user specified to run as does not have that vty group
then do warn about the issue and stop running

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reported-by: Thomas Martin <tmartincpp@gmail.com>
9 years agolib: add getgrouplist() for Solaris
David Lamparter [Tue, 15 Sep 2015 09:26:44 +0000 (02:26 -0700)]
lib: add getgrouplist() for Solaris

Of course Solaris doesn't have getgrouplist()...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
9 years agoprivs: fix privilege dropping to use system defined groups
Timo Teräs [Fri, 22 May 2015 10:40:56 +0000 (13:40 +0300)]
privs: fix privilege dropping to use system defined groups

It may be requred for quagga process to belong to additional
groups. E.g. nhrp module will need to talk to strongSwan using
vici and may require additional permissions. Initialize groups
from the system group database.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
9 years agolib/privs: Don't use CAP_NET_BROADCAST
Christian Franke [Wed, 13 May 2015 11:59:18 +0000 (13:59 +0200)]
lib/privs: Don't use CAP_NET_BROADCAST

From what I can tell, CAP_NET_BROADCAST has never been required for any
functionality in the Linux kernel, so we do not really need it.

However, it causes breakage in contexts where Quagga is started with a
limited set of capabilities, e.g. in Docker, because these may not
include CAP_NET_BROADCAST and in the case of Docker do not even support
adding CAP_NET_BROADCAST.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
9 years agolib/privs: display more info if cap_set_proc fails.
Christian Franke [Wed, 13 May 2015 11:59:17 +0000 (13:59 +0200)]
lib/privs: display more info if cap_set_proc fails.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
9 years agolib: Fix POSIX capabilities on SunOS platforms
Brian Bennett [Tue, 17 Feb 2015 23:24:15 +0000 (23:24 +0000)]
lib: Fix POSIX capabilities on SunOS platforms

When using POSIX capabilities on SunOS the capabilities are too
restricitve resulting in quagga processes not being able to read their
own config files. Credit goes to Oracle where this patch was originally
authored and included in OpenSolaris.

lib/privs.c: Include additional capabilities, better checking of
    missing capabilities.

Fixes: #820
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
9 years agodebian: Modify preinst to add quagga user to quaggavty group
Donald Sharp [Fri, 8 Apr 2016 23:42:00 +0000 (19:42 -0400)]
debian: Modify preinst to add quagga user to quaggavty group

The quagga user was not being added to the quaggavty group.
Modify the user creation to add this step.

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 [Fri, 8 Apr 2016 17:16:21 +0000 (13:16 -0400)]
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster

9 years agoquagga: Remove iflist global variable
Donald Sharp [Fri, 8 Apr 2016 13:16:14 +0000 (09:16 -0400)]
quagga: Remove iflist global variable

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

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

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

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

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

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

Ticket: CM-10338
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Reviewed-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Radhika Mahankali <radhika@cumulusnetworks.com>
9 years agozebra: count iface up/down events and keep last time of their occurrence
Christian Franke [Thu, 7 Apr 2016 19:43:44 +0000 (16:43 -0300)]
zebra: count iface up/down events and keep last time of their occurrence

It is quite useful to be able to assert whether specific interfaces have
flapped or also to verify that specific interfaces have not flapped.

By having counters for those events and storing the last time of their
occurrence, this is made possible.

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
9 years agolib: use constant to replace magic value for length of quagga_timestamp
Christian Franke [Thu, 7 Apr 2016 19:43:43 +0000 (16:43 -0300)]
lib: use constant to replace magic value for length of quagga_timestamp

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
9 years agodebian: Add ability to call reload from systemctl
Donald Sharp [Thu, 7 Apr 2016 14:48:28 +0000 (10:48 -0400)]
debian: Add ability to call reload from systemctl

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

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

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

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

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

Problem:

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

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

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

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

Solution:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Initialize a variable to prevent warnings.

Updates: 8087b296b4750eda2d34e4f48731f81415bdccd2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

This commit partially backs out 83260f0.

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

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

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

This commit fixes two issues:

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

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

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

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

This change will eliminate one unnecessary step in the configuration.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>