]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agodebian->debianpkg: Move debian files from debian dir to debianpkg dir.
Martin Winter [Fri, 9 Jun 2017 02:14:41 +0000 (19:14 -0700)]
debian->debianpkg: Move debian files from debian dir to debianpkg dir.

Debian build systems use debian subdir for building and having a debian
dir in the source package causes issues.
Moving it to debianpkg avoids the issue and allows us to ship debian
package files in the source distribution

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobackports: minimize diffs with base debian files
smccroskey [Fri, 28 Apr 2017 07:00:53 +0000 (00:00 -0700)]
backports: minimize diffs with base debian files

minimize diffs between the base debian files and each backport to the
changes that actually matter, so that they aren't lost in the noise of
capitalization and ordering differences.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebian: clean up, update base debian/control
smccroskey [Fri, 28 Apr 2017 06:58:13 +0000 (23:58 -0700)]
debian: clean up, update base debian/control

this removes some cruft -- old/outdated/incorrect information,
trailing whitespace, etc., and updates the descriptions.  Some small
changes were made where appropriate to minimize the diff between the
base control file and those of the various backports.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebian: delete unused files out of debian/
smccroskey [Thu, 27 Apr 2017 23:42:43 +0000 (16:42 -0700)]
debian: delete unused files out of debian/

These are unused and not referenced anywhere.

debian/rules.orig: included by mistake
debian/watch: no longer applicable; url is not valid
debian/patches: stale, unused, misleading

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agoprecise/trusty: don't attempt to install pimd or ldpd manuals
smccroskey [Thu, 27 Apr 2017 21:31:29 +0000 (14:31 -0700)]
precise/trusty: don't attempt to install pimd or ldpd manuals

Neither of these daemons are installed on 14.04, leading to build
failures now that the man pages are excluded from the Makefiles when
the daemons aren't enabled for install.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agobackports: error out on upstream/downstream version mismatch
smccroskey [Thu, 27 Apr 2017 21:27:09 +0000 (14:27 -0700)]
backports: error out on upstream/downstream version mismatch

The quilt source format expects the upstream tarball's version to
correspond roughly to the debian version of the package, and errors
will be thrown (at unpack time, in our case) if it doesn't.  Do a
sanity check when we're building the source package to make sure they
match up.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
6 years agodebian: Fix some incorrect references to Quagga instead of FRR
Martin Winter [Thu, 16 Feb 2017 18:49:00 +0000 (01:49 +0700)]
debian: Fix some incorrect references to Quagga instead of FRR

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agobackports: symlink identical files
Silas McCroskey [Tue, 14 Feb 2017 17:48:57 +0000 (00:48 +0700)]
backports: symlink identical files

Testing-done: built all backports in schroots and VMs

made files identical between different backports symlinks
to the ones for the more recent distribution, and updated
relevant tar invocations to follow symlinks.

Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>

6 years agodebian: add pkg-config to build-depends
Silas McCroskey [Tue, 14 Feb 2017 17:34:42 +0000 (00:34 +0700)]
debian: add pkg-config to build-depends

Testing-done: `--add-depends pkg-config' sbuild

The dependency on pkg-config was introduced recently, and
missed because it's in our schroots by default. Need to add
it for other build environments (e.g. ubuntu schroots).

Signed-off by: Silas McCroskey <smccroskey@cumulusnetworks.com>

6 years agodebian: move ubuntu 16.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:48:19 +0000 (22:48 +0700)]
debian: move ubuntu 16.04 files into new backports system

Added 'debian/patches' to the exclude file, since the existing patches
interfere with the build and are unused by our build.  No other
changes were necessary.  Used '-0~ubuntu16.04+1' as the version
extention, to denote: no patches (-0), debian packaging files changed
for backport (+1).

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian: move ubuntu 14.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:44:17 +0000 (22:44 +0700)]
debian: move ubuntu 14.04 files into new backports system

`git diff'ed the main (cmaster) branch against the 14.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu14.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).

Original commit by Silas with updates on fork name by Martin

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian: move ubuntu 12.04 files into new backports system
Silas McCroskey [Tue, 14 Feb 2017 15:34:56 +0000 (22:34 +0700)]
debian: move ubuntu 12.04 files into new backports system

`git diff'ed the main (cmaster) branch against the 12.04 branch
to determine changed debian files, then pulled them into
debian/backports via `git cat-file'. Added 'debian/patches' to
the exclude file, since the existing patches interfere with the
build and are unused by our build. Used '-0~ubuntu12.04+1' as
the version extention, to denote: no patches (-0), debian
packaging files changed for backport (+1).

Original commit by Silas with updates on fork name by Martin

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian/backports: include in distfile, don't put files in ..
Silas McCroskey [Tue, 14 Feb 2017 12:04:10 +0000 (19:04 +0700)]
debian/backports: include in distfile, don't put files in ..

Testing-done: ran 'make dist', unpacked elsewhere, built from result

Adjusted target to build the .orig.tar.gz accordingly, since it must
exclude the debian/ subdirectory.  Allows for building any backport from
only a tarball.

Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian: fix dpkg tool invocations to work on Ubuntu 12.04
Silas McCroskey [Tue, 14 Feb 2017 11:52:40 +0000 (18:52 +0700)]
debian: fix dpkg tool invocations to work on Ubuntu 12.04

dpkg-parsechangelog and dpkg-source were both using flags
not yet available in the versions available on 12.04.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agodebian: structure for building backports from a single branch
Silas McCroskey [Tue, 14 Feb 2017 11:45:50 +0000 (18:45 +0700)]
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>
6 years agoMerge pull request #1460 from bingen/bug_pw_conf_master
Renato Westphal [Fri, 17 Nov 2017 12:02:31 +0000 (10:02 -0200)]
Merge pull request #1460 from bingen/bug_pw_conf_master

ldp: Fix bug configuring PW

6 years agoldp: Fix bug configuring PW
ßingen [Fri, 17 Nov 2017 09:32:36 +0000 (10:32 +0100)]
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>
6 years agoMerge pull request #1458 from donaldsharp/southbound_flags
Renato Westphal [Thu, 16 Nov 2017 21:35:12 +0000 (19:35 -0200)]
Merge pull request #1458 from donaldsharp/southbound_flags

Southbound flags

6 years agoMerge pull request #1449 from donaldsharp/match_local_peer
Renato Westphal [Thu, 16 Nov 2017 20:34:43 +0000 (18:34 -0200)]
Merge pull request #1449 from donaldsharp/match_local_peer

bgpd: XMALLOC usage causes borken assumption in route_match_peer_free

6 years agozebra: Install/Update success caused flags to be cleared for lsp
Donald Sharp [Thu, 16 Nov 2017 19:06:10 +0000 (14:06 -0500)]
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>
6 years agozebra: Move some LSP flag handling to common code
Donald Sharp [Thu, 16 Nov 2017 17:46:10 +0000 (12:46 -0500)]
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>
6 years agozebra: rt_socket.c should not use SET_FLAG
Donald Sharp [Thu, 16 Nov 2017 17:26:07 +0000 (12:26 -0500)]
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>
6 years agozebra: Note about functionality in rt.h
Donald Sharp [Thu, 16 Nov 2017 18:10:41 +0000 (13:10 -0500)]
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>
6 years agoMerge pull request #1454 from donaldsharp/isis_newline
Rafael Zalamena [Thu, 16 Nov 2017 13:44:04 +0000 (11:44 -0200)]
Merge pull request #1454 from donaldsharp/isis_newline

isisd: Add a missing newline to a help string

6 years agoMerge pull request #1444 from fatihusta/patch-1
Donald Sharp [Thu, 16 Nov 2017 13:05:54 +0000 (08:05 -0500)]
Merge pull request #1444 from fatihusta/patch-1

Centos5 Build problem fixed

6 years agoisisd: Add a missing newline to a help string
Donald Sharp [Wed, 15 Nov 2017 20:34:02 +0000 (15:34 -0500)]
isisd: Add a missing newline to a help string

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1451 from msablic/msablic_frr_cm00003
Donald Sharp [Wed, 15 Nov 2017 15:55:50 +0000 (10:55 -0500)]
Merge pull request #1451 from msablic/msablic_frr_cm00003

*: repaired internal link to dev guide

6 years ago*: repaired internal link to dev guide
Mladen Sablic [Wed, 15 Nov 2017 15:24:48 +0000 (16:24 +0100)]
*: 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>
6 years agobgpd: XMALLOC usage causes borken assumption in route_match_peer_free
Donald Sharp [Wed, 15 Nov 2017 00:44:29 +0000 (19:44 -0500)]
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>
6 years agoMerge pull request #1447 from msablic/msablic_frr_cm00002
Quentin Young [Tue, 14 Nov 2017 16:16:33 +0000 (11:16 -0500)]
Merge pull request #1447 from msablic/msablic_frr_cm00002

*: commit message example formatting

6 years ago*: commit message example formatting
Mladen Sablic [Tue, 14 Nov 2017 15:17:52 +0000 (16:17 +0100)]
*: 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>
6 years agoMerge pull request #1411 from donaldsharp/stream_updates
Renato Westphal [Tue, 14 Nov 2017 15:15:08 +0000 (13:15 -0200)]
Merge pull request #1411 from donaldsharp/stream_updates

Stream updates

6 years agoMerge pull request #1443 from rtrlib/rpki
Donald Sharp [Tue, 14 Nov 2017 12:29:09 +0000 (07:29 -0500)]
Merge pull request #1443 from rtrlib/rpki

RPKI follow up

6 years agoCentos5 Build problem fixed
Fatih USTA [Tue, 14 Nov 2017 09:36:05 +0000 (12:36 +0300)]
Centos5 Build problem fixed

6 years agobgpd: add missing newlines to help strings in bgp_rpki.c command definitions
Marcel Röthke [Tue, 14 Nov 2017 08:51:28 +0000 (09:51 +0100)]
bgpd: add missing newlines to help strings in bgp_rpki.c command definitions

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agobgpd: fix prefix count in show rpki prefix-table
Marcel Röthke [Tue, 14 Nov 2017 08:38:51 +0000 (09:38 +0100)]
bgpd: fix prefix count in show rpki prefix-table

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agobgpd: fix race condition in build system regarding bgp_rpki_clippy.c
Marcel Röthke [Tue, 14 Nov 2017 08:29:32 +0000 (09:29 +0100)]
bgpd: fix race condition in build system regarding bgp_rpki_clippy.c

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agobgpd, zebra: Flags should be 0 for unregister
Donald Sharp [Tue, 14 Nov 2017 00:06:26 +0000 (19:06 -0500)]
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>
6 years agoMerge pull request #1442 from msablic/msablic_frr_cm00001
Quentin Young [Mon, 13 Nov 2017 21:22:26 +0000 (16:22 -0500)]
Merge pull request #1442 from msablic/msablic_frr_cm00001

frr: COMMUNITY.md updated link to to kernel.org

6 years agofrr: COMMUNITY.md updated link to to kernel.org
Mladen Sablic [Mon, 13 Nov 2017 20:34:50 +0000 (21:34 +0100)]
frr: COMMUNITY.md updated link to to kernel.org

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
6 years agobgpd, zebra: Ensure that passed flags is 0 for unregister event
Donald Sharp [Mon, 13 Nov 2017 19:30:17 +0000 (14:30 -0500)]
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>
6 years agolib: Pass the safi as a uint8_t
Donald Sharp [Mon, 6 Nov 2017 18:04:19 +0000 (13:04 -0500)]
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>
6 years agolib, zebra: Modify zebra to use STREAM_GET for zapi
Donald Sharp [Fri, 10 Nov 2017 13:51:34 +0000 (08:51 -0500)]
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>
6 years agolib: Add STREAM_GETX functions
Donald Sharp [Thu, 2 Nov 2017 12:37:06 +0000 (08:37 -0400)]
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>
6 years agoMerge pull request #1436 from rtrlib/rpki
Donald Sharp [Mon, 13 Nov 2017 18:35:22 +0000 (13:35 -0500)]
Merge pull request #1436 from rtrlib/rpki

bgpd: Add RPKI/RTR support

6 years agoMerge pull request #1437 from dwalton76/frr-reload
Renato Westphal [Mon, 13 Nov 2017 15:53:37 +0000 (13:53 -0200)]
Merge pull request #1437 from dwalton76/frr-reload

frr-reload.py: misc fixes

6 years agobgpd: fix build against rtrlib versions without ssh support
Marcel Röthke [Mon, 13 Nov 2017 14:50:50 +0000 (15:50 +0100)]
bgpd: fix build against rtrlib versions without ssh support

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agodoc: add rpki.texi to makefile
Marcel Röthke [Fri, 10 Nov 2017 14:24:45 +0000 (15:24 +0100)]
doc: add rpki.texi to makefile

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agolib: Fix command `copy running-config startup-config` to alias `write file`
pogojotz [Mon, 6 Nov 2017 21:43:32 +0000 (22:43 +0100)]
lib: Fix command `copy running-config startup-config` to alias `write file`

Fixes: #1412
Signed-off-by: Juergen Werner <pogojotz@gmx.net>
6 years agotools: frr-reload do not attempt deleting lines that cannot be deleted
Daniel Walton [Fri, 10 Nov 2017 18:30:25 +0000 (18:30 +0000)]
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

6 years agotools: frr-reload remove Cumulus Linux release numbers from comments
Daniel Walton [Fri, 10 Nov 2017 17:57:42 +0000 (17:57 +0000)]
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

6 years agotools: frr-reload combine "'router bgp' and line" checks
Daniel Walton [Fri, 10 Nov 2017 17:47:13 +0000 (17:47 +0000)]
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

6 years agotools: frr-reload avoid del/add of BGP table-map
Daniel Walton [Fri, 10 Nov 2017 17:41:43 +0000 (17:41 +0000)]
tools: frr-reload avoid del/add of BGP table-map

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
6 years agotools: frr-reload.py ignore multiple whitespaces
Daniel Walton [Fri, 10 Nov 2017 17:19:08 +0000 (17:19 +0000)]
tools: frr-reload.py ignore multiple whitespaces

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
Without this fix frr-reload would do a del/add even if the only
difference were bogus whitespaces.

root@cel-redxp-10[nclu]# /usr/lib/frr/frr-reload.py --test
/etc/frr/frr.conf

Lines To Delete
===============

router bgp 100
 no bgp router-id 1.1.1.1

Lines To Add
============

router bgp 100
 bgp   router-id 1.1.1.1
root@cel-redxp-10[nclu]#

6 years agoMerge pull request #1426 from donaldsharp/prefixlistafi
Jafar Al-Gharaibeh [Fri, 10 Nov 2017 15:11:53 +0000 (09:11 -0600)]
Merge pull request #1426 from donaldsharp/prefixlistafi

lib: Only apply prefix's to the same family

6 years agobgpd: Add RPKI/RTR support
Marcel Röthke [Fri, 10 Nov 2017 12:56:24 +0000 (13:56 +0100)]
bgpd: Add RPKI/RTR support

This commit adds support for the RTR protocol to receive ROA
information from a RPKI cache server. That information can than be used
to validate the BGP origin AS of IP prefixes.
Both features are implemented using [rtrlib](http://rtrlib.realmv6.org/).

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
6 years agoospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never called)
Juergen Kammer [Tue, 7 Nov 2017 08:38:22 +0000 (09:38 +0100)]
ospf6d: Fix setting interface ipv6 ospf6 cost value (LSA hooks were never called)

Fixes: #1420
Signed-off-by: Juergen Kammer <j.kammer@eurodata.de>
If the ipv6 ospf6 cost on an interface is changed, no recalculation of routes happens, though the interface structure is updated with the new value. The new cost will be used later, when LSA hooks are called for any other reason.

Diagnosis:
The DEFUN for the config command sets oi->cost and calls ospf6_interface_recalculate_cost(oi) whenever there is a change in the supplied value. ospf6_interface_recalculate_cost then gets the new cost for the interface by calling ospf6_interface_get_cost(oi), which returns oi->cost if a cost is manually set (i.e. we get the value we just set). ospf6_interface_recalculate_cost only calls the LSA hooks if there is a change - which obviously never happens if we compare the new value with itself.

6 years agoMerge pull request #1391 from LabNConsulting/working/master/patch-set/vnc-vrf-export
Donald Sharp [Thu, 9 Nov 2017 13:53:24 +0000 (08:53 -0500)]
Merge pull request #1391 from LabNConsulting/working/master/patch-set/vnc-vrf-export

Support vrf export/import based on vrf-policy

6 years ago.dir-locals.el: show trailing whitespace
Lou Berger [Fri, 3 Nov 2017 21:48:26 +0000 (17:48 -0400)]
.dir-locals.el: show trailing whitespace

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: document that export mode applies to vrf-policy groups
Lou Berger [Sat, 4 Nov 2017 14:01:27 +0000 (10:01 -0400)]
bgpd: document that export mode applies to vrf-policy groups

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: fun with whitespace conventions
Lou Berger [Fri, 3 Nov 2017 21:36:06 +0000 (17:36 -0400)]
bgpd: fun with whitespace conventions

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: rfapi - fix error output
Lou Berger [Tue, 31 Oct 2017 15:52:36 +0000 (11:52 -0400)]
bgpd: rfapi - fix error output

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1359 from donaldsharp/rhel_startup
Martin Winter [Tue, 7 Nov 2017 17:03:37 +0000 (09:03 -0800)]
Merge pull request #1359 from donaldsharp/rhel_startup

redhat: Fix redhat startup to actually read in unified config

6 years agobgpd: rfapi - don't do debug related work when debug not
Lou Berger [Sat, 28 Oct 2017 19:03:34 +0000 (15:03 -0400)]
bgpd: rfapi - don't do debug related work when debug not
      enabled and other minor tweaks

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: rfapi - open rfd for vrf groups on export config,
Lou Berger [Mon, 30 Oct 2017 02:43:19 +0000 (22:43 -0400)]
bgpd: rfapi - open rfd for vrf groups on export config,
      keep open until group deleted

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agolib: Only apply prefix's to the same family
Donald Sharp [Tue, 7 Nov 2017 15:54:03 +0000 (10:54 -0500)]
lib: Only apply prefix's to the same family

When we have a v4 or v6 prefix list, only
apply it via a match when the address families
are the same.

Fixes: #1339
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1417 from qlyoung/mfa-fix
Russ White [Tue, 7 Nov 2017 01:55:19 +0000 (20:55 -0500)]
Merge pull request #1417 from qlyoung/mfa-fix

bgpd: fix mishandled attribute length

6 years agobgpd: fix mishandled attribute length
Quentin Young [Mon, 23 Oct 2017 20:43:32 +0000 (16:43 -0400)]
bgpd: fix mishandled attribute length

A crafted BGP UPDATE with a malformed path attribute length field causes
bgpd to dump up to 65535 bytes of application memory and send it as the
data field in a BGP NOTIFY message, which is truncated to 4075 bytes
after accounting for protocol headers. After reading a malformed length
field, a NOTIFY is generated that is supposed to contain the problematic
data, but the malformed length field is inadvertently used to compute
how much data we send.

CVE-2017-15865

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1381 from donaldsharp/iface_desc
Jafar Al-Gharaibeh [Mon, 6 Nov 2017 23:29:12 +0000 (17:29 -0600)]
Merge pull request #1381 from donaldsharp/iface_desc

zebra: Allow IFLA_IFALIAS to set ifp->desc

6 years agoMerge pull request #1400 from chiragshah6/mdev1
Jafar Al-Gharaibeh [Mon, 6 Nov 2017 23:25:55 +0000 (17:25 -0600)]
Merge pull request #1400 from chiragshah6/mdev1

ospfd: VRF aware Router-ID update

6 years agoospfd: VRF aware Router-ID update
Chirag Shah [Thu, 2 Nov 2017 14:54:45 +0000 (07:54 -0700)]
ospfd: VRF aware Router-ID update

Ensure zebra received router-id isolated per vrf instance.
Store zebra received router-id within ospf instance.

Ticket:CM-18657
Reviewed By:
Testing Done:
Validated follwoing sequence
- Create vrf1111
- Create ospf vrf1111 with no router-id
- Assign ip to vrf111
- ospf is assigned zebra assigned router-id which is vrf ip.
- upon remvoing vrf ip, the router-id retained as same until
ospfd restarted.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoMerge pull request #1414 from donaldsharp/set_nexthop
Rafael Zalamena [Mon, 6 Nov 2017 18:52:20 +0000 (16:52 -0200)]
Merge pull request #1414 from donaldsharp/set_nexthop

lib: Fix nexthop reading to work better

6 years agoMerge pull request #1406 from donaldsharp/bgpd_ecommunity_crash
Renato Westphal [Mon, 6 Nov 2017 17:08:07 +0000 (15:08 -0200)]
Merge pull request #1406 from donaldsharp/bgpd_ecommunity_crash

bgpd: Fix crash with ecommunity string

6 years agolib: Fix nexthop reading to work better
Donald Sharp [Mon, 6 Nov 2017 16:20:40 +0000 (11:20 -0500)]
lib: Fix nexthop reading to work better

Fixes: #1404
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1403 from donaldsharp/prefixlen_match
Renato Westphal [Mon, 6 Nov 2017 16:07:21 +0000 (14:07 -0200)]
Merge pull request #1403 from donaldsharp/prefixlen_match

doc, zebra: Add 'match ipv6 address prefix-len (0-128)' command

6 years agoMerge pull request #1370 from dslicenc/cm18408-bgp-timers
Renato Westphal [Mon, 6 Nov 2017 16:06:12 +0000 (14:06 -0200)]
Merge pull request #1370 from dslicenc/cm18408-bgp-timers

bgpd: fix various problems with hold/keepalive timers

6 years agoMerge pull request #1410 from chiragshah6/mdev
Jafar Al-Gharaibeh [Mon, 6 Nov 2017 15:40:49 +0000 (09:40 -0600)]
Merge pull request #1410 from chiragshah6/mdev

ospfd: clearnup [no] router ospf command

6 years agoMerge pull request #1383 from chiragshah6/ospf_vrf_dev
Jafar Al-Gharaibeh [Mon, 6 Nov 2017 15:39:16 +0000 (09:39 -0600)]
Merge pull request #1383 from chiragshah6/ospf_vrf_dev

ospfd: add vrf option to operational command

6 years agobgpd: Prevent infinite loop when reading capabilities
Donald Sharp [Fri, 3 Nov 2017 19:25:31 +0000 (15:25 -0400)]
bgpd: Prevent infinite loop when reading capabilities

If the user has configured the ability to override
the capabilities or if the afi/safi passed as part
of the _MP capability is not understood, then we
can enter into an infinite loop as part of the
capability parsing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix crash with ecommunity string
Donald Sharp [Fri, 3 Nov 2017 18:09:24 +0000 (14:09 -0400)]
bgpd: Fix crash with ecommunity string

When we are displaying a extended community ECOMMUNITY_SITE_ORIGIN
the display sprintf is this:

len = sprintf(
str_buf + str_pnt,
"EVPN:%02x:%02x:%02x:%02x:%02x:%02x",
macaddr[0], macaddr[1], macaddr[2],
macaddr[3], macaddr[4], macaddr[5]);

The problem with this is that macaddr[0] is passed in as a integer
so the sprintf function thinks that the value to display is much
larger than it actually is.  The ECOMMUNITY_STR_DEFAULT_LEN is 27
So the resulting string no-longer fits in memory and we write
off the end of the buffer and can crash.  If we force the
passed in value to be a uint8_t then we get the expected output
since a single byte is displayed as 2 hex characters and the
resulting string fits in str_buf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc, zebra: Add 'match ipv6 address prefix-len (0-128)' command
Donald Sharp [Fri, 3 Nov 2017 14:33:09 +0000 (10:33 -0400)]
doc, zebra: Add 'match ipv6 address prefix-len (0-128)' command

Add the ability to match a specific prefix-length in zebra.
This command behaves in the same manner that the v4 version
of the command behaves.

Fixes: #1398
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1405 from dslicenc/cm18634-bgp-default
Renato Westphal [Mon, 6 Nov 2017 12:29:48 +0000 (10:29 -0200)]
Merge pull request #1405 from dslicenc/cm18634-bgp-default

bgpd: default originate issue with intf peers and global intf address

6 years agoospfd: clearnup [no] router ospf command
Chirag Shah [Sat, 4 Nov 2017 01:34:59 +0000 (18:34 -0700)]
ospfd: clearnup [no] router ospf command

no router ospf followed by router ospf throws
a message, there isn't active ospf instance.

Fix ospf instance lookup.

Ticket:CM-18675
Testing Done:
Validated router ospf, no router ospf with
VRF and with multi-instance version 'router ospf 2'
configuration clis.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: default originate issue with intf peers and global intf address
Don Slice [Fri, 3 Nov 2017 16:45:02 +0000 (16:45 +0000)]
bgpd: default originate issue with intf peers and global intf address

Problem reported that a receiver of a default route issued across bgp
unnumbered peering using default originate would have the route stay
as inactive.  Discovered we were messing up the nexthop value sent to
the peer in this one particular case.  Manual testing good, fix supplied
to the submitter and verified to resolve the problem.  bgp-smoke
completed successfully.

Ticket: CM-18634
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1397 from qlyoung/fix-vtysh-completions-npd
Renato Westphal [Fri, 3 Nov 2017 10:27:12 +0000 (08:27 -0200)]
Merge pull request #1397 from qlyoung/fix-vtysh-completions-npd

vtysh: protect null deref for cli completions

6 years agovtysh: protect null deref for cli completions
Quentin Young [Thu, 2 Nov 2017 15:50:13 +0000 (11:50 -0400)]
vtysh: protect null deref for cli completions

cmd_describe_command() returns NULL when there is no matched command, so
check the return value before trying to free it

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1379 from donaldsharp/eigrp_crashes
Renato Westphal [Thu, 2 Nov 2017 15:09:46 +0000 (13:09 -0200)]
Merge pull request #1379 from donaldsharp/eigrp_crashes

Eigrp crashes

6 years agoeigrpd: Allow query send to send more than 1 packet
Donald Sharp [Fri, 27 Oct 2017 17:02:15 +0000 (13:02 -0400)]
eigrpd: Allow query send to send more than 1 packet

When we send a query if we have more queries than we
can fit in one packet, allow the packet to be broken
up into multiple packets to be sent to our neighbor.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoeigrpd: Create consts for TLV size
Donald Sharp [Fri, 27 Oct 2017 16:53:52 +0000 (12:53 -0400)]
eigrpd: Create consts for TLV size

1) Create #defines for TLV SIZE and use them
2) Speed up prefix length by using a switch statement

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1363 from donaldsharp/z_improvements
Russ White [Wed, 1 Nov 2017 00:27:19 +0000 (20:27 -0400)]
Merge pull request #1363 from donaldsharp/z_improvements

Z improvements

6 years agoMerge pull request #1367 from donaldsharp/mp_reach_parse
Russ White [Wed, 1 Nov 2017 00:23:32 +0000 (20:23 -0400)]
Merge pull request #1367 from donaldsharp/mp_reach_parse

bgpd: Treat empty reachable NLRI as a EOR

6 years agoMerge pull request #1382 from donaldsharp/eigrp_loop
Russ White [Wed, 1 Nov 2017 00:21:26 +0000 (20:21 -0400)]
Merge pull request #1382 from donaldsharp/eigrp_loop

Eigrp loop

6 years agoMerge pull request #1336 from donaldsharp/peer_name
Lou Berger [Tue, 31 Oct 2017 15:40:44 +0000 (11:40 -0400)]
Merge pull request #1336 from donaldsharp/peer_name

Peer name

6 years agoMerge pull request #1371 from donaldsharp/bgp_exit
Lou Berger [Tue, 31 Oct 2017 15:39:25 +0000 (11:39 -0400)]
Merge pull request #1371 from donaldsharp/bgp_exit

bgpd: exit on socket bind failures

6 years agobgpd: allow for vpn->vrf imports
Lou Berger [Tue, 10 Oct 2017 14:00:10 +0000 (10:00 -0400)]
bgpd: allow for vpn->vrf imports
      ignore nexthop checks for RFAPI imported routes (as is self)
      note: NHT is still updated

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: rfapi support import based on vrf-policy (precusor to import to vrf instance)
Lou Berger [Mon, 9 Oct 2017 21:26:30 +0000 (17:26 -0400)]
bgpd: rfapi support import based on vrf-policy (precusor to import to vrf instance)

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: vrf-policy add prefix lists and route-maps on export
Lou Berger [Mon, 9 Oct 2017 19:20:19 +0000 (15:20 -0400)]
bgpd: vrf-policy add prefix lists and route-maps on export

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: add afi/safi to debug output
Lou Berger [Sat, 28 Oct 2017 19:04:49 +0000 (15:04 -0400)]
bgpd: add afi/safi to debug output

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agobgpd: set v4 next hop for VPN SAFI for consistency in processing
Lou Berger [Sat, 28 Oct 2017 19:04:20 +0000 (15:04 -0400)]
bgpd: set v4 next hop for VPN SAFI for consistency in processing

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1366 from donaldsharp/bgp_non_integrated_zebra_redistribution
Lou Berger [Tue, 31 Oct 2017 14:53:59 +0000 (10:53 -0400)]
Merge pull request #1366 from donaldsharp/bgp_non_integrated_zebra_redistribution

Bgp non integrated zebra redistribution