Commit Graph

9585 Commits

Author SHA1 Message Date
Silas McCroskey
a8247b210f debian: structure for building backports from a single branch
Source a makefile (when it exists) in debian/rules to assemble
a source package via:

* a debian.tar.gz tarball built from combining the contents of debian/
  and debian/backports/$backport/debian/ using other details under
  debian/backports/$backport
* an orig.tar.gz file (not generated by this makefile). This can (and
  should) be the same for all backports.

Details in debian/backports/README

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
2017-11-17 17:55:29 -08:00
Chirag Shah
26e1461672 ospf6d: SPF consider all Router LSAs
Based on RFC-5340, there could be multiple Router LSAs
associated with Same Advertising Router. During SPF calculation
ensure first Root Vertex accommodates all Link state IDs for its
originated Router LSAs push them into priority queue.
Similarly follow for other Vertexes, considering Router LSAs
with multiple Link State IDs.

Ticket: CM-18069
Testing Done:
Topology: R1 === R2 -- R3

Validated with more than 100 Subinterfaces
between R1 === R2 with broadcast links,
Validated show ipv6 ospf6 spf tree containing all graph nodes.
Validated ip -6 route at R3 and all intra prefix LSAs route
installed with ospf6 as protocol.

2) Run R1 === R2 with Point-to-Point links.

3) Perform few other abr and ospf6 test cases of LSA ageout,
route install and delete cases.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2017-11-17 10:01:04 -08:00
Donald Sharp
8cc8456317 bgpd: Fix json output in some situations
This commit fixes a bug where json output would display
',,,,,,,' because we were deciding to not display information
about some routes due to a selection criteria.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-17 12:53:54 -05:00
Donald Sharp
e7fcb84341 zebra: V6 does not have route replace semantics
The v6 linux kernel netlink code doees not have
route replace semantics.  So if we are in that
situation, do a delete/add to get the correct
results.

Fixes: #1461
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-17 11:13:01 -05:00
Donald Sharp
a69ea8aeac bgpd: Only build json for community when needed
Building a communities json object every time is
both expensive and memory wasteful.  Modify
code to only build the json object when needed.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-17 09:04:26 -05:00
Renato Westphal
9507e69655
Merge pull request #1460 from bingen/bug_pw_conf_master
ldp: Fix bug configuring PW
2017-11-17 10:02:31 -02:00
ßingen
6e8cb22638 ldp: Fix bug configuring PW
With non-targeted LDP receiving a PW label mapping before configuring
the PW was causing the SET message to be sent before the ADD one, so
Zebra PW manager wouldn't find the PW on first message reception.

Signed-off-by: ßingen <bingen@voltanet.io>
2017-11-17 10:48:26 +01:00
Donald Sharp
68e1a55bb1 bgpd: Only create json for aspath if needed
The creation of the json object for the aspath
is both memory intensive and expensive to
create.  Only create the json object when
it is needed and stash it for further usage
at that point.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 20:46:37 -05:00
Renato Westphal
3418352190
Merge pull request #1458 from donaldsharp/southbound_flags
Southbound flags
2017-11-16 19:35:12 -02:00
Renato Westphal
55dc9e113b
Merge pull request #1449 from donaldsharp/match_local_peer
bgpd: XMALLOC usage causes borken assumption in route_match_peer_free
2017-11-16 18:34:43 -02:00
Donald Sharp
e6d44ec7a6 zebra: Install/Update success caused flags to be cleared for lsp
When the kernel installs/updates a lsp the return code for
success is a 0.  The code was interpreting the 0 as a failure
case for the Install/Update code paths.  This caused upon
a true deletion zebra loosing knowledge of the lsp
but the kernel still had it installed.

Failure:
mpls label bind 10.50.4.11/32 4444
!
line vty
!
end
robot.cumulusnetworks.com# conf t
robot.cumulusnetworks.com(config)# no mpls lsp 6666 10.50.11.1 3933
robot.cumulusnetworks.com(config)# exit
robot.cumulusnetworks.com# show mpls table 6666
robot.cumulusnetworks.com# exit
sharpd@robot ~/frr4> ip -f mpls route show
6666 as to 3933 via inet 10.50.11.1 dev enp0s10 proto static

With Fix:
sharpd@robot ~/frr4> ip -f mpls route show
6666 as to 3933 via inet 10.50.11.1 dev enp0s10 proto static
sharpd@robot ~/frr4> sudo vtysh

Hello, this is FRRouting (version 3.1-dev).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

robot.cumulusnetworks.com# conf t
robot.cumulusnetworks.com(config)# no mpls lsp 6666 10.50.11.1 3933
robot.cumulusnetworks.com(config)# end
robot.cumulusnetworks.com# show mpls table 6666
robot.cumulusnetworks.com# exit
sharpd@robot ~/frr4> ip -f mpls route show
sharpd@robot ~/frr4>

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 14:08:42 -05:00
Donald Sharp
2b63430caa zebra: Move some LSP flag handling to common code
The LSP_FLAG_CHANGED and LSP_FLAG_INSTALLED flags
should be handled in the common call function
for adding/updating/removing a lsp to/from the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 13:13:13 -05:00
Donald Sharp
2d74d63731 zebra: rt_socket.c should not use SET_FLAG
The SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)
is already taken care of in zebra_rib.c.  There
is no need for this to be handled by rt_socket.c.

rt_netlink.c does not do a SET_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)
for route installation.  Please note it does do it for a mpls
labeled route installation, which will be fixed in a future
commit.

Remove some dead code from 2002 as well.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 13:13:08 -05:00
Donald Sharp
b33803d74a zebra: Note about functionality in rt.h
When we are modifying the kernel there could
be multiple modules/hooks involved in this
process.  As such let the caller set
the appropriate flags for success/failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 13:13:07 -05:00
Donald Sharp
11ff71648e ripd: Fix SA issues
The rinfo variable was being set but never used.

We just need to call rip_ecmp_replace or rip_ecmp_add
this function does not care about the return values
because the rinfo returned is stored on the rip
route entry.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 08:49:02 -05:00
Donald Sharp
9de1f7ff13 bgpd: Allow bgp to understand the different nexthop types
When BGP is being redistributed prefixes, allow it to
understand the nexthop type.

This fixes the issue where a blackhole route was being interpreted
to having a nexthop of 1.0.0.0( ruh-roh!!! ).  This broke
downstream neighbors as that they would receive a 1.0.0.0 nexthop,
which is bad, very very bad.

This commit sets us up for the future where we can match
a route-map against a nexthop type.  In that bgp is
now at least nominally paying attention to the type.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 08:45:28 -05:00
Donald Sharp
14aa0c3d3a ripd: Fix spelling mistake in debug
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 08:45:28 -05:00
Donald Sharp
3f5682c88d ripd: Allow rip_redistribute_add to know the nexthop type
Allow rip_redistribute_add to receive and properly store
the nexthop type passed up from zebra.

Additionally display the different nexthop types appropriately.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 08:45:28 -05:00
Donald Sharp
dd127197f9 ripd: Convert to using 'struct nexthop' for nexthop information
RIP is not using the nexthop data structure and as such when
it does not fully understand when it receives some of the
more exotic nexthop types what to do with it.  This is the
start of a series of commits to allow RIP to start understanding
and properly displaying information about different nexthop
types.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-16 08:45:28 -05:00
Rafael Zalamena
b1d81da4c7
Merge pull request #1454 from donaldsharp/isis_newline
isisd: Add a missing newline to a help string
2017-11-16 11:44:04 -02:00
Donald Sharp
29df464089
Merge pull request #1444 from fatihusta/patch-1
Centos5 Build problem fixed
2017-11-16 08:05:54 -05:00
Donald Sharp
b9cb7a13e8 isisd: Add a missing newline to a help string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-15 15:34:02 -05:00
Donald Sharp
d32471578b
Merge pull request #1451 from msablic/msablic_frr_cm00003
*: repaired internal link to dev guide
2017-11-15 10:55:50 -05:00
Mladen Sablic
500075b733 *: repaired internal link to dev guide
During renaming and expansion of Coding style
requirements, internal document link, from the
checklist, became unattached.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2017-11-15 16:39:19 +01:00
Donald Sharp
a633d869cc bgpd: XMALLOC usage causes borken assumption in route_match_peer_free
The usage of XMALLOC for route_match_peer_compile causes
the pc->interface to be non-NULL.  The code assumes that
pc->interface will be NULL.

Ticket: CM-18824
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-14 19:53:46 -05:00
Quentin Young
ff9959b0c7
bgpd: fix show bgp peer-group NAME
Fixes a bug whereby all peer-groups would be shown even when a
particular peer-group was specified for display.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2017-11-14 16:55:22 -05:00
Quentin Young
8f9b48f955
Merge pull request #1447 from msablic/msablic_frr_cm00002
*: commit message example formatting
2017-11-14 11:16:33 -05:00
Mladen Sablic
91a0d75f49 *: commit message example formatting
Having triple backquotes on the same line as code block
does not agree with Markdown parser of the repo hosting
site.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2017-11-14 16:34:29 +01:00
Renato Westphal
2ebee1aac1
Merge pull request #1411 from donaldsharp/stream_updates
Stream updates
2017-11-14 13:15:08 -02:00
Donald Sharp
23489cb09c vtysh: If RPKI is not compiled in don't let vtysh think it is.
The RPKI code can be turned on/off via configure switches.
If we have intentionally turned it off do not let vtysh
display that you can config it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-14 09:25:04 -05:00
Donald Sharp
488af3c3a4
Merge pull request #1443 from rtrlib/rpki
RPKI follow up
2017-11-14 07:29:09 -05:00
Fatih USTA
4268e09e2f
Centos5 Build problem fixed 2017-11-14 12:36:05 +03:00
Marcel Röthke
08f9cfb841 bgpd: add missing newlines to help strings in bgp_rpki.c command definitions
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-14 09:58:09 +01:00
Marcel Röthke
a220aec6ce bgpd: fix prefix count in show rpki prefix-table
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-14 09:58:09 +01:00
Marcel Röthke
b4cba74f74 bgpd: fix race condition in build system regarding bgp_rpki_clippy.c
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-14 09:58:09 +01:00
Donald Sharp
f49e0f01ba bgpd, zebra: Flags should be 0 for unregister
The flags value is not used for unregister events.  Let's purposefully
not send anything and purposefully not accept non 0 for it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-13 19:06:26 -05:00
Quentin Young
7b56069db5
Merge pull request #1442 from msablic/msablic_frr_cm00001
frr: COMMUNITY.md updated link to to kernel.org
2017-11-13 16:22:26 -05:00
Mladen Sablic
78b7a6e364 frr: COMMUNITY.md updated link to to kernel.org
Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
2017-11-13 22:11:38 +01:00
Donald Sharp
e0b84ba1f6 bgpd, zebra: Ensure that passed flags is 0 for unregister event
The flags passed in should be 0 for an unregister event.  Ensure
that we respect that.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-13 14:30:17 -05:00
Donald Sharp
832d0f566f lib: Pass the safi as a uint8_t
The safi encode/decode is using 2 bytes, which
may cause problems on some platforms.  Let's assume
that a safi is a uint8_t and work accordingly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-13 14:18:43 -05:00
Donald Sharp
ec93aa120e lib, zebra: Modify zebra to use STREAM_GET for zapi
This code modifies zebra to use the STREAM_GET functionality.
This will allow zebra to continue functioning in the case of
bad input data from higher level protocols instead of crashing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-13 14:16:13 -05:00
Donald Sharp
051cc28c8f lib: Add STREAM_GETX functions
Currently when stream reads fail, for any reason, we assert.
While a *great* debugging tool, Asserting on production code
is not a good thing.  So this is the start of a conversion over
to a series of STREAM_GETX functions that do not assert and
allow the developer a way to program this gracefully and still
clean up.

Current code is something like this( taken from redistribute.c
because this is dead simple ):

	afi = stream_getc(client->ibuf);
	type = stream_getc(client->ibuf);
	instance = stream_getw(client->ibuf);

This code has several issues:

1) There is no failure mode for the stream read other than assert.
if afi fails to be read the code stops.
2) stream_getX functions cannot be converted to a failure mode
because it is impossible to tell a failure from good data
with this api.

So this new code will convert to this:

	STREAM_GETC(client->ibuf, afi);
	STREAM_GETC(client->ibuf, type);
	STREAM_GETW(client->ibuf, instance);

	....

stream_failure:
	return;

We've created a stream_getc2( which does not assert ),
but we need a way to allow clean failure mode handling.
This is done by macro'ing stream_getX2 functions with
the equivalent all uppercase STREAM_GETX functions that
include a goto.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2017-11-13 14:15:24 -05:00
Donald Sharp
4df759fecf
Merge pull request #1436 from rtrlib/rpki
bgpd: Add RPKI/RTR support
2017-11-13 13:35:22 -05:00
Renato Westphal
b8f86a7c90
Merge pull request #1437 from dwalton76/frr-reload
frr-reload.py: misc fixes
2017-11-13 13:53:37 -02:00
Marcel Röthke
acd4a9f410 bgpd: fix build against rtrlib versions without ssh support
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-13 15:50:50 +01:00
Marcel Röthke
758661fa6d doc: add rpki.texi to makefile
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2017-11-13 13:25:26 +01:00
pogojotz
f806f29c49 lib: Fix command copy running-config startup-config to alias write file
Fixes: #1412
Signed-off-by: Juergen Werner <pogojotz@gmx.net>
2017-11-12 13:09:29 -05:00
Daniel Walton
b05a1d3c03 tools: frr-reload do not attempt deleting lines that cannot be deleted
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

There are several lines that we cannot do a "no" on
- frr version
- frr defaults
- password
- line vty

frr-reload should ignore these if asked to do a "no" on them
2017-11-10 18:30:25 +00:00
Daniel Walton
4c76e59220 tools: frr-reload remove Cumulus Linux release numbers from comments
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

The "3.0", etc in the comments were referring to Cumulus Linux 3.0 which
was confusing now that FRR has a 3.0
2017-11-10 17:57:42 +00:00
Daniel Walton
028bcc883f tools: frr-reload combine "'router bgp' and line" checks
Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>

We had multiple places checking for

    if ctx_keys[0].startswith('router bgp') and line

Combine these into a single check
2017-11-10 17:47:13 +00:00