]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
6 years agoFRRouting Release 4.0 frr-4.0
Martin Winter [Mon, 12 Mar 2018 00:53:37 +0000 (17:53 -0700)]
FRRouting Release 4.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #1838 from qlyoung/bgpd-fix-update-group-commands-4.0
Martin Winter [Sun, 11 Mar 2018 22:32:16 +0000 (23:32 +0100)]
Merge pull request #1838 from qlyoung/bgpd-fix-update-group-commands-4.0

bgpd: fix update-group show commands [4.0]

6 years agoMerge pull request #1837 from opensourcerouting/rpki-pkg
Donald Sharp [Sat, 10 Mar 2018 12:57:10 +0000 (07:57 -0500)]
Merge pull request #1837 from opensourcerouting/rpki-pkg

Rpki pkg

6 years agoMerge pull request #1785 from donaldsharp/cpick_into_4_0
Renato Westphal [Fri, 9 Mar 2018 02:42:46 +0000 (23:42 -0300)]
Merge pull request #1785 from donaldsharp/cpick_into_4_0

*: Make code use a consisten definition of labels

6 years agoMerge pull request #1848 from qlyoung/lsan-suppression-4.0
Martin Winter [Thu, 8 Mar 2018 01:03:58 +0000 (02:03 +0100)]
Merge pull request #1848 from qlyoung/lsan-suppression-4.0

tools: add LeakSanitizer suppressions list [4.0]

6 years agotools: add LeakSanitizer suppressions list
Quentin Young [Mon, 5 Mar 2018 18:20:22 +0000 (13:20 -0500)]
tools: add LeakSanitizer suppressions list

Building FRR with AddressSanitizer is kind of annoying since
libpython3.5 leaks memory, clippy links libpython3.5 and clippy runs as
part of the build process. LeakSanitizer has a way to suppress leaks at
runtime by setting the LSAN_OPTIONS environment variable to contain a
file path to a suppression list:

LSAN_OPTIONS=suppressions=path/to/suppr.txt

This commit provides the file. Setting this environment variable to

LSAN_OPTIONS=suppressions=../tools/lsan-suppressions.txt

before building should allow a clean build with ASAN enabled. The
relative path is there because LeakSanitizer looks at paths relative to
the binary it is sanitizing; clippy is in lib/ so the path is set
relative to lib/.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years ago*: Make code use a consisten definition of labels
Donald Sharp [Wed, 7 Mar 2018 16:39:56 +0000 (11:39 -0500)]
*: Make code use a consisten definition of labels

Turns out we had 3 different ways to define labels
all of them overlapping with the same meanings.
Consolidate to 1.  This one choosen is consistent
naming wise with what the *bsd and linux kernels
use.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1846 from opensourcerouting/dev-4.0-ospf-sr-uaf-fix
Quentin Young [Wed, 7 Mar 2018 15:05:13 +0000 (10:05 -0500)]
Merge pull request #1846 from opensourcerouting/dev-4.0-ospf-sr-uaf-fix

ospfd: cancel SR thread at shutdown [4.0]

6 years agoospfd: cancel SR thread at shutdown
Quentin Young [Tue, 6 Mar 2018 18:42:53 +0000 (13:42 -0500)]
ospfd: cancel SR thread at shutdown

Otherwise if it is scheduled the thread pointer will be accessed after
the shutdown task finishes accessing, having deleted the structure that
owns said pointer, which causes a heap UAF.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodebianpkg: Fix - need to always run dh_gencontrol
Martin Winter [Tue, 6 Mar 2018 16:47:42 +0000 (08:47 -0800)]
debianpkg: Fix - need to always run dh_gencontrol

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #1807 from opensourcerouting/reload-helper
Olivier Dugeon [Tue, 6 Mar 2018 16:46:26 +0000 (17:46 +0100)]
Merge pull request #1807 from opensourcerouting/reload-helper

tools: Add helper frr-reload shell script for clean error

6 years agodebianpkg: No RPKI support for Ubuntu 12.04
Martin Winter [Tue, 6 Mar 2018 16:44:09 +0000 (08:44 -0800)]
debianpkg: No RPKI support for Ubuntu 12.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #1832 from opensourcerouting/dev-4.0-fix-vtysh-output-init
Quentin Young [Tue, 6 Mar 2018 16:11:06 +0000 (11:11 -0500)]
Merge pull request #1832 from opensourcerouting/dev-4.0-fix-vtysh-output-init

dev/4.0: fix vtysh output init

6 years agobgpd: fix update-group show commands
Quentin Young [Thu, 1 Mar 2018 18:43:54 +0000 (13:43 -0500)]
bgpd: fix update-group show commands

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodebianpkg: Add option to build with RPKI
Martin Winter [Tue, 6 Mar 2018 15:14:03 +0000 (07:14 -0800)]
debianpkg: Add option to build with RPKI

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoredhat: Add RPKI comment on build instructions
Martin Winter [Tue, 6 Mar 2018 15:13:17 +0000 (07:13 -0800)]
redhat: Add RPKI comment on build instructions

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agovtysh: initialize vty structure correctly for output to terminal
Christian Franke [Mon, 5 Mar 2018 23:46:01 +0000 (00:46 +0100)]
vtysh: initialize vty structure correctly for output to terminal

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoredhat: Add option to build with RPKI
Martin Winter [Sun, 4 Mar 2018 13:38:58 +0000 (05:38 -0800)]
redhat: Add option to build with RPKI

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agotools: Add helper frr-reload shell script for clean error
Martin Winter [Wed, 28 Feb 2018 15:28:38 +0000 (07:28 -0800)]
tools: Add helper frr-reload shell script for clean error

Adding the shell script allows a clean error if frr-pythontools
is not installed.

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
6 years agoMerge pull request #1773 from Orange-OpenSource/dev/4.0
Russ White [Tue, 27 Feb 2018 13:54:29 +0000 (08:54 -0500)]
Merge pull request #1773 from Orange-OpenSource/dev/4.0

OSPF Segment Routing fix

6 years agoMerge pull request #1775 from qlyoung/fix-keepalive-sentinel-4.0
Russ White [Tue, 27 Feb 2018 13:52:29 +0000 (08:52 -0500)]
Merge pull request #1775 from qlyoung/fix-keepalive-sentinel-4.0

[4.0] bgpd: fix incorrect keepalive timer evaluation

6 years agoMerge pull request #1800 from opensourcerouting/dev-4.0/vtysh-isis-fixes
Donald Sharp [Mon, 26 Feb 2018 19:06:50 +0000 (14:06 -0500)]
Merge pull request #1800 from opensourcerouting/dev-4.0/vtysh-isis-fixes

dev 4.0/vtysh isis fixes

6 years agovtysh: Fix missing \n at end of desc string
Christian Franke [Mon, 26 Feb 2018 17:53:28 +0000 (18:53 +0100)]
vtysh: Fix missing \n at end of desc string

6 years agovtysh: pass route-map & prefix-list commands to isisd and sharpd
Christian Franke [Mon, 26 Feb 2018 17:22:36 +0000 (18:22 +0100)]
vtysh: pass route-map & prefix-list commands to isisd and sharpd

Use VTYSH_RMAP in extract.pl instead of having two lists,
and add isisd and sharpd to VTYSH_RMAP.

6 years agoOSPFd: Correct style 2nd round
Olivier Dugeon [Thu, 22 Feb 2018 10:30:05 +0000 (11:30 +0100)]
OSPFd: Correct style 2nd round

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoOSPFd: Correct style
Olivier Dugeon [Thu, 22 Feb 2018 09:29:25 +0000 (10:29 +0100)]
OSPFd: Correct style

 - Correct style warning and errors detected by checkpatch.pl

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agobgpd: fix incorrect keepalive timer evaluation
Quentin Young [Wed, 21 Feb 2018 17:01:34 +0000 (12:01 -0500)]
bgpd: fix incorrect keepalive timer evaluation

Incorrect check for sentinel value effectively caused peers to sometimes
use the keepalive timer value of other peers, which sometimes led to
hold timer expiry.

Signed-off-by: Quentin Young <qlyoung@qlyoung.net>
6 years agoospfd: Fix ospfd crash
Olivier Dugeon [Fri, 9 Feb 2018 11:13:07 +0000 (12:13 +0100)]
ospfd: Fix ospfd crash

 - ospfd/ospf_opaque.c: Update issue #1652 by introducing a new
function 'free_opaque_info_owner()' to clean list of callback owner
and call this function in appropriate place where 'listdelete_and_null'
is not used.

 - ospfd/ospf_packet.c: In case of crash, ospfd is not been able to
flush LSA. In case of self Opaque LSA, when restarting, ospfd crash
during the resynchronisation process with its neighbor due to an
empty list of LSA to flood. Just add a control on the list count
in 'ospf_ls_upd_queue_send()' to escape the function and avoid the
problem.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoospfd: Add json output for Segment Routing
Olivier Dugeon [Fri, 9 Feb 2018 11:06:35 +0000 (12:06 +0100)]
ospfd: Add json output for Segment Routing

 - To ease checking the Segment Routing conformity in topotest,
add json output to 'show ip ospf database segment-routing' CLI.
 - Update ospfd user guide accordingly
 - Update OSPF-SR documentation with supported features and interoperability

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoOSPFD: Fix Segment Routing Lan Adjacency TLVs
Olivier Dugeon [Mon, 19 Feb 2018 09:17:41 +0000 (10:17 +0100)]
OSPFD: Fix Segment Routing Lan Adjacency TLVs

 - Lan Adjacency TLVs was incorrectly formatted due to an error in
TLV size computation. Add new macro to fix this issue
 - Update SR link nexthop when it corresponds to an LAN Adj SID. The nexthop
is set to the router id in the TLVi (as per draft), but we need the neighbor
IP address to set the corresponding MPLS LFIB entry

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1741 from donaldsharp/isis_leaks
Rafael Zalamena [Wed, 14 Feb 2018 14:00:45 +0000 (12:00 -0200)]
Merge pull request #1741 from donaldsharp/isis_leaks

isisd: Free up some memory allocated.

6 years agoisisd: Free up some memory allocated.
Donald Sharp [Sat, 10 Feb 2018 19:03:09 +0000 (14:03 -0500)]
isisd: Free up some memory allocated.

The v4 and v6 prefixes were created but not deleted on
shutdown properly.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoconfigure: Update version of software frr-4.0-dev
Donald Sharp [Tue, 6 Feb 2018 17:22:59 +0000 (12:22 -0500)]
configure: Update version of software

With the start of the 4.0 development branch, update
the configure.ac file to properly reflect this change.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1542 from qlyoung/stylechecker
Martin Winter [Tue, 6 Feb 2018 16:44:37 +0000 (08:44 -0800)]
Merge pull request #1542 from qlyoung/stylechecker

tools: add style checking scripts

6 years agoMerge pull request #1653 from Orange-OpenSource/SR-Routing
Donald Sharp [Tue, 6 Feb 2018 16:32:51 +0000 (11:32 -0500)]
Merge pull request #1653 from Orange-OpenSource/SR-Routing

OSPFD: Add Experimental Segment Routing support

6 years agoMerge pull request #1713 from donaldsharp/nexthop_vrfs
Renato Westphal [Mon, 5 Feb 2018 22:45:50 +0000 (20:45 -0200)]
Merge pull request #1713 from donaldsharp/nexthop_vrfs

lib: Fix encoding of vrf

6 years agoMerge pull request #1702 from donaldsharp/bgp_cleanup
Lou Berger [Mon, 5 Feb 2018 22:06:08 +0000 (16:06 -0600)]
Merge pull request #1702 from donaldsharp/bgp_cleanup

Bgp cleanup

6 years agoMerge pull request #1694 from qlyoung/fix-bgp-default-shutdown-conf-write
Lou Berger [Mon, 5 Feb 2018 22:04:08 +0000 (16:04 -0600)]
Merge pull request #1694 from qlyoung/fix-bgp-default-shutdown-conf-write

bgpd: fixup default shutdown

6 years agoOSPFd: Fix Opaque LSA filtering in Segment Routing
Olivier Dugeon [Mon, 5 Feb 2018 19:24:17 +0000 (20:24 +0100)]
OSPFd: Fix Opaque LSA filtering in Segment Routing

Opaque LSA were incorrectly filtered. LSA Type 1 with a
router id set to 4.x.x.x or 7.x.x.x. or 8.x.x.x are not correctly
filtered and pass to Segment Routing as wrong Opaque LSA of type
Router Information, Extended Prefix respectively Extended Link.
 - Add Opaque LSA check to the filter

The CLI command 'segment-routing prefix' didn't check if a same prefix
already exist in SRDB resulting to multiple entries in the SRDB for the
same prefix.
 - Update prefix intead of adding a new one if already present in the SRDB

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agolib: Fix encoding of vrf
Donald Sharp [Mon, 5 Feb 2018 10:49:27 +0000 (05:49 -0500)]
lib: Fix encoding of vrf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoOSPFd: Fix ospfd crash during CI
Olivier Dugeon [Sat, 3 Feb 2018 18:30:33 +0000 (19:30 +0100)]
OSPFd: Fix ospfd crash during CI

When preforming CI test, CLI command 'no router ospf' followed by a
'router ospf' is performed to clean up the previous configuration.
Ospfd crash when configuring 'netwoark area'.

This is due to opsf_opaque_term() introduce in previous commit that cause this
crash. It remove not only Opaque LSA but also the list through the call to
'list_delete_and_null()' function. Same take place in 'ospf_mpls_te_term()',
'ospf_router_info_term()' and 'ospf_ext_term()' function.

New set of 'ospf_XXX_finish()' has been introduced to solve this issue while
keeping the possiblity to terminate properly the Opaque LSA and remove MPLS
LFIB entries set by Segment Routing.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agobgpd: Fix some evpn hash key creation
Donald Sharp [Fri, 12 Jan 2018 14:55:28 +0000 (09:55 -0500)]
bgpd: Fix some evpn hash key creation

The creation of a hash key should use a jhash
function instead of adding the char's together.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: Fix bgp_vty.h to conform to coding standard
Donald Sharp [Fri, 12 Jan 2018 14:51:18 +0000 (09:51 -0500)]
bgpd: Fix bgp_vty.h to conform to coding standard

The function declarations were missing some parameter
names as is our standard.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: bgp_afi_node_get is listed 2 times in bgp_route.h
Donald Sharp [Wed, 10 Jan 2018 20:07:05 +0000 (15:07 -0500)]
bgpd: bgp_afi_node_get is listed 2 times in bgp_route.h

Remove the extra.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1695 from chiragshah6/mdev
Renato Westphal [Sat, 3 Feb 2018 14:18:48 +0000 (12:18 -0200)]
Merge pull request #1695 from chiragshah6/mdev

ospfd: fix default-information orignate command not to display default parameter

6 years agoMerge pull request #1705 from donaldsharp/martian_nexthop
Renato Westphal [Sat, 3 Feb 2018 14:10:30 +0000 (12:10 -0200)]
Merge pull request #1705 from donaldsharp/martian_nexthop

bgpd: Add ability to see martian next-hop's for a vrf

6 years agobgpd: Add ability to see martian next-hop's for a vrf
Donald Sharp [Sat, 3 Feb 2018 00:26:22 +0000 (19:26 -0500)]
bgpd: Add ability to see martian next-hop's for a vrf

We've run across an issue where the local connected
ip address is not being removed in some error condition.
During trackdown it was noticed that we cannot look
at this table for views/vrf's.  While we don't have the
bug tracked down yet this will help us figure it out.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1703 from opensourcerouting/bsd-warnings
Donald Sharp [Fri, 2 Feb 2018 19:36:42 +0000 (14:36 -0500)]
Merge pull request #1703 from opensourcerouting/bsd-warnings

BSD warnings

6 years agolib: fix more warnings on *BSD
Renato Westphal [Fri, 2 Feb 2018 01:18:46 +0000 (23:18 -0200)]
lib: fix more warnings on *BSD

* zebra/kernel_socket.c: include "rt.h" to provide the prototypes of
  kernel_init() and kernel_terminate();

* lib/prefix.h: remove the deprecation warning whenever ETHER_ADDR_LEN
  is used. isisd uses the ETHER_HDR_LEN constant which is defined in
  terms of ETHER_ADDR_LEN in the *BSD system headers. So, when building
  FRR on *BSD, we were getting several warnings because we were using
  ETHER_ADDR_LEN indirectly;

* lib/command_lex.l, lib/defun_lex.l: ignore other harmless warnings;

* lib/spf_backoff.c: cast 'tv->tv_usec' to 'long int' before printing.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years ago*: silence '-Wchar-subscripts' warnings on NetBSD
Renato Westphal [Fri, 2 Feb 2018 17:11:03 +0000 (15:11 -0200)]
*: silence '-Wchar-subscripts' warnings on NetBSD

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years ago*: silence '-Wmaybe-uninitialized' warnings on NetBSD
Renato Westphal [Fri, 2 Feb 2018 17:10:09 +0000 (15:10 -0200)]
*: silence '-Wmaybe-uninitialized' warnings on NetBSD

None of these variables can actually be used before being initialized,
but unfortunately some old compilers are not smart enough to detect that.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agotests: fix warnings related to afi/safi constants
Renato Westphal [Thu, 1 Feb 2018 23:04:03 +0000 (21:04 -0200)]
tests: fix warnings related to afi/safi constants

We were improperly mixing constants used to identify AFI/SAFI values
using the IANA and internal representations. Things happened to be
working because the IANA/internal values are the same in some cases
(e.g. AFI_IP and IANA_AFI_IPV4). This commit fixes a few warnings when
running "make check" on FreeBSD 11.1.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agotests: fix warnings by removing dead code
Renato Westphal [Thu, 1 Feb 2018 22:59:08 +0000 (20:59 -0200)]
tests: fix warnings by removing dead code

These variables being removed were made obsolete by commit 9cabb64b3. As
of now, the parse_test() function fetches the afi/safi values from
the parsed NLRIs. There's no need to have duplicate information in the
'test_segment' structure anymore.

This fixes several warnings of this kind when running "make check"
on FreeBSD: "implicit conversion from enumeration type 'iana_safi_t'
to different enumeration type 'safi_t'".

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoMerge pull request #1696 from donaldsharp/pim_node_removal
Rafael Zalamena [Fri, 2 Feb 2018 13:12:15 +0000 (11:12 -0200)]
Merge pull request #1696 from donaldsharp/pim_node_removal

lib, pimd: Remove PIM_NODE as it is not needed

6 years agoMerge pull request #1687 from donaldsharp/dest
Rafael Zalamena [Fri, 2 Feb 2018 13:08:28 +0000 (11:08 -0200)]
Merge pull request #1687 from donaldsharp/dest

zebra: Fix crash when dereferencing dest->selected_fib

6 years agoOSPFd: Correct Extended Prefix LSA refresh
Olivier Dugeon [Thu, 1 Feb 2018 13:30:34 +0000 (14:30 +0100)]
OSPFd: Correct Extended Prefix LSA refresh

 - When Extended Prefix LSA need to be refresh, paramaters may be
taken from the wrong interface i.e. Extended Link instead of Prefix
resulting in producing an empty LSA body. Then, ospfd crash due to the
assert on LSA length in ospf_lsa_different() function: code check that
the LSA size is larger than LSA header i.e. LSA is not empty.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1693 from donaldsharp/v6_leaking
Renato Westphal [Wed, 31 Jan 2018 17:52:01 +0000 (15:52 -0200)]
Merge pull request #1693 from donaldsharp/v6_leaking

zebra: Fix v6 nexthop-vrf and nexthop confusion

6 years agoospfd: fix redistribute running config
Chirag Shah [Tue, 30 Jan 2018 15:42:28 +0000 (07:42 -0800)]
ospfd: fix redistribute running config

Testing:
CL(config)# router ospf
CL(config-router)# redistribute static metric-type 2
CL(config)# router ospf
CL(config-router)# default-information originate always metric-type 2

show running output
router ospf
 redistribute static
 default-information originate always
!

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agobgpd: improve default shutdown help string
Quentin Young [Tue, 30 Jan 2018 16:47:15 +0000 (11:47 -0500)]
bgpd: improve default shutdown help string

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #1690 from dslicenc/bgpd-vrf-show-cm17377
Lou Berger [Tue, 30 Jan 2018 16:42:26 +0000 (11:42 -0500)]
Merge pull request #1690 from dslicenc/bgpd-vrf-show-cm17377

bgpd: fix output of show bgp vrf all neighbor x.x.x.x

6 years agotools: return exit status in checkpatch.sh
Quentin Young [Tue, 30 Jan 2018 15:48:03 +0000 (10:48 -0500)]
tools: return exit status in checkpatch.sh

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoOSPFd: Clean up Segment Routing patch
Olivier Dugeon [Tue, 30 Jan 2018 15:17:54 +0000 (16:17 +0100)]
OSPFd: Clean up Segment Routing patch

 - ospfd/ospf_te.c: Remove unregister function and call to
ospf_delete_opaque_functab() following the introduction of
ospf_opaque_term() function in ospfd.c for ospfd termination.
 - ospfd/ospf_sr.c: Set initial index value for node-msd CLI to
avaoid crash when using this command
 - ospfd/ospf_ext.c: Disable call to ospf_sr_update_prefix() if
Segment Routing, thus Extended Link/Prefix, is not enable
 - ospfd/ospf_opaque.c: Correct scheduling of Opaque LSA flooding

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agobgpd: fixup default shutdown
Quentin Young [Tue, 30 Jan 2018 15:12:19 +0000 (10:12 -0500)]
bgpd: fixup default shutdown

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoOSPFd: Remove unecessary debug message
Olivier Dugeon [Tue, 30 Jan 2018 13:25:40 +0000 (14:25 +0100)]
OSPFd: Remove unecessary debug message

 - Line 865 in ospfd/ospf_ext.c cause compilation failure when
-werror is set. This line was not necessary and add only for debugging
purpose.

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agobgpd: fix output of show bgp vrf all neighbor x.x.x.x
Don Slice [Thu, 25 Jan 2018 16:06:27 +0000 (16:06 +0000)]
bgpd: fix output of show bgp vrf all neighbor x.x.x.x

Problem reported with output of the command "show bgp vrf all
neighbor x.x.x.x" not limiting the output to that peer in any vrf.
This fix corrects the logic to display by neighbor
(ipv4/ipv6/interface) in any vrf.

Ticket: CM-17377
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge remote-tracking 'frr/master' into SR-Routing
Olivier Dugeon [Tue, 30 Jan 2018 10:43:25 +0000 (11:43 +0100)]
Merge remote-tracking 'frr/master' into SR-Routing

6 years agoOSPFd: Correct compilation error
Olivier Dugeon [Tue, 30 Jan 2018 10:42:02 +0000 (11:42 +0100)]
OSPFd: Correct compilation error

 - Forget to remove ospf_router_info_unregister in ospfd_ri.c

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1688 from chiragshah6/mdev
Olivier Dugeon [Tue, 30 Jan 2018 10:37:59 +0000 (11:37 +0100)]
Merge pull request #1688 from chiragshah6/mdev

ospfd: Fix default-info and redis cmd options

6 years agolib, pimd: Remove PIM_NODE as it is not needed
Donald Sharp [Tue, 30 Jan 2018 08:07:15 +0000 (03:07 -0500)]
lib, pimd: Remove PIM_NODE as it is not needed

The PIM_NODE command is only being used to display
default vrf configuration.  Move this into the
vrf display and remove PIM_NODE.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: Fix default-info and redis cmd options
Chirag Shah [Tue, 30 Jan 2018 02:03:08 +0000 (18:03 -0800)]
ospfd: Fix default-info and redis cmd options

Fix default-information parsing of metric-type,
route-map.
show running to display metic-type 2.

metric, metric-type and route-map can be configured in
any order, running-config displays in specific order..

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agozebra: Fix v6 nexthop-vrf and nexthop confusion
Donald Sharp [Tue, 30 Jan 2018 05:15:45 +0000 (00:15 -0500)]
zebra: Fix v6 nexthop-vrf and nexthop confusion

The v6 code had the same issue with how it handled
nexthop-vrf and nexthop when it was entered on the
same line.  This fixes that issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Fix crash when dereferencing dest->selected_fib
Donald Sharp [Mon, 29 Jan 2018 22:52:15 +0000 (17:52 -0500)]
zebra: Fix crash when dereferencing dest->selected_fib

When a rib_unlink() event is directly called for a
route_entry we need to see if the dest->selected_fib
is the same and just unset the dest->selected_fib.

This was happening for redistributed table 10 routes
into BGP.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1686 from donaldsharp/mem_leaks_zebra
Renato Westphal [Mon, 29 Jan 2018 22:41:07 +0000 (20:41 -0200)]
Merge pull request #1686 from donaldsharp/mem_leaks_zebra

Mem leaks zebra

6 years agoMerge pull request #1684 from donaldsharp/vrf_leak
Renato Westphal [Mon, 29 Jan 2018 22:34:02 +0000 (20:34 -0200)]
Merge pull request #1684 from donaldsharp/vrf_leak

zebra: Fix to get correct nexthop-vrf

6 years agozebra: On shutdown actually delete rn's assoc w/ other_tables
Donald Sharp [Mon, 29 Jan 2018 21:20:41 +0000 (16:20 -0500)]
zebra: On shutdown actually delete rn's assoc w/ other_tables

Zebra stores routes coming from the kernel for non-default
tables.  This information on shutdown was being leaked
because we never cleaned it up.  Allow for this to happen
now.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1685 from LabNConsulting/working/vpn-doc
Donald Sharp [Mon, 29 Jan 2018 20:51:30 +0000 (15:51 -0500)]
Merge pull request #1685 from LabNConsulting/working/vpn-doc

doc: minor cleanup of bgp vpnvX and remove encap safi references

6 years agolib: When we shutdown we would leak interface description
Donald Sharp [Mon, 29 Jan 2018 20:38:03 +0000 (15:38 -0500)]
lib: When we shutdown we would leak interface description

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com.
6 years agozebra: Cleanup error handling of nexthop vrf and vrf
Donald Sharp [Mon, 29 Jan 2018 20:18:28 +0000 (15:18 -0500)]
zebra: Cleanup error handling of nexthop vrf and vrf

The error handling of the nexthop vrf and the vrf
for what was specified on the cli was not as clean
as it should have been.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agodoc: remove references to encap safi
Lou Berger [Mon, 29 Jan 2018 20:03:03 +0000 (15:03 -0500)]
doc: remove references to encap safi

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agodoc: change vpnvX -> ipvX vpn
Lou Berger [Mon, 29 Jan 2018 19:55:16 +0000 (14:55 -0500)]
doc: change vpnvX -> ipvX vpn

Signed-off-by: Lou Berger <lberger@labn.net>
6 years agoMerge pull request #1680 from donaldsharp/inet_pton
Renato Westphal [Mon, 29 Jan 2018 19:24:33 +0000 (17:24 -0200)]
Merge pull request #1680 from donaldsharp/inet_pton

zebra: Fix failure to parse src

6 years agoOSPFd: Update Segment Routing PR following review
Olivier Dugeon [Mon, 29 Jan 2018 16:58:53 +0000 (17:58 +0100)]
OSPFd: Update Segment Routing PR following review

Following various review, following files have been modfied:

 - All: Change u_intXX_t typedef to standard uintXX_t types
 - doc/OSPF-SR.rst: Update doc in particular the Linux Kernel configuration
section
 - doc/ospfd.texi: Update CLI
 - ospfd/ospf_dump.[c,h]: Add new 'debug ospf sr' when performing 'sh run'
 - ospfd/ospf_ext.[c, h]: Various bug corrections notably to handle flooding of
Extended Prefix at startup. iFix TLVs size for LAN Adjacency.
Update Licence as per Community.md
 - ospfd/ospf_opaque.c: Add proper termination function call to remove MPLS entries
 - ospfd/ospf_ri.[c,h]: Bug corrections
 - ospfd/ospf_sr.[c,h]: Various bug corrections, notably to determine the nexthop
SR Node. Add support to 'no-php-flag'.
Update Licence as per Community.md
 - ospfd/ospfd.c: Add call to 'ospf_opaque_term()'

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
6 years agoMerge pull request #1679 from qlyoung/revert-remove-options-directly-connected
Russ White [Mon, 29 Jan 2018 13:25:49 +0000 (08:25 -0500)]
Merge pull request #1679 from qlyoung/revert-remove-options-directly-connected

Revert "bgpd: disallow invalid config at cli layer"

6 years agozebra: Fix failure to parse src
Donald Sharp [Sat, 27 Jan 2018 23:56:30 +0000 (18:56 -0500)]
zebra: Fix failure to parse src

If src happens to point at all 0's due to not initializing
it and if the address passed in is not a v6 address then
we would not set src in the AF_INET6 call and would
fail the (src.ipv4.s_addr && inet_pton(AF_INET...)
call.  Thus causing us to return a NULL and make
the routemap code think there was an issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #1659 from chiragshah6/ospf_vrf_dev
Martin Winter [Sat, 27 Jan 2018 17:17:45 +0000 (09:17 -0800)]
Merge pull request #1659 from chiragshah6/ospf_vrf_dev

ospfd: show ip ospf neighbor json output format

6 years agozebra: Fix to get correct nexthop-vrf
Donald Sharp [Sat, 27 Jan 2018 10:28:51 +0000 (05:28 -0500)]
zebra: Fix to get correct nexthop-vrf

The nexthop_vrf should be looked up as appropriate,
If the nexthop_vrf was specified use that, else
use the vrf context of what was passed in.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoRevert "bgpd: disallow invalid config at cli layer"
Quentin Young [Fri, 26 Jan 2018 22:15:44 +0000 (17:15 -0500)]
Revert "bgpd: disallow invalid config at cli layer"

This reverts commit a174be631a14e0271fde6858fcb4d7ab55165014.

Turns out we need that variable to accept peer groups.

6 years agoMerge pull request #1671 from donaldsharp/southbound_pointer
Russ White [Fri, 26 Jan 2018 21:40:01 +0000 (16:40 -0500)]
Merge pull request #1671 from donaldsharp/southbound_pointer

Southbound pointer

6 years agoMerge pull request #1676 from dslicenc/cm19322-bgp-json
Renato Westphal [Fri, 26 Jan 2018 12:52:19 +0000 (10:52 -0200)]
Merge pull request #1676 from dslicenc/cm19322-bgp-json

bgpd: remove poorly located bestpath json output

6 years agoMerge pull request #1672 from qlyoung/frr-pthread-improvements
Renato Westphal [Fri, 26 Jan 2018 12:47:55 +0000 (10:47 -0200)]
Merge pull request #1672 from qlyoung/frr-pthread-improvements

FRR pthread improvements

6 years agoMerge pull request #1675 from donaldsharp/ptm_crash
Renato Westphal [Thu, 25 Jan 2018 18:12:01 +0000 (16:12 -0200)]
Merge pull request #1675 from donaldsharp/ptm_crash

zebra: Fix crash in ptm code

6 years agobgpd: remove poorly located bestpath json output
Don Slice [Thu, 25 Jan 2018 17:45:40 +0000 (17:45 +0000)]
bgpd: remove poorly located bestpath json output

The bestpath multipath-relax setting was added to the output of
"show ip bgp neighbor json" several months ago but this is not
the correct place to display that information and this fix removes
it from there.  The multipath-relax setting  was also added
to the output of "show ip bgp sum json" which is fine.

Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
6 years agoMerge pull request #1668 from qlyoung/fix-bgp-corrupt-header-assert
Russ White [Thu, 25 Jan 2018 14:15:20 +0000 (09:15 -0500)]
Merge pull request #1668 from qlyoung/fix-bgp-corrupt-header-assert

bgpd: fix race condition causing occasional assert

6 years agoMerge pull request #1674 from chiragshah6/mdev
Russ White [Thu, 25 Jan 2018 14:07:23 +0000 (09:07 -0500)]
Merge pull request #1674 from chiragshah6/mdev

ospfd: clean up route map prefixlist vrf during exit

6 years agoMerge pull request #1673 from opensourcerouting/ospfd-metric-issue
Donald Sharp [Thu, 25 Jan 2018 13:19:53 +0000 (08:19 -0500)]
Merge pull request #1673 from opensourcerouting/ospfd-metric-issue

ospfd: allow multiple options in the redistribute command

6 years agozebra: Fix crash in ptm code
Donald Sharp [Thu, 25 Jan 2018 01:53:40 +0000 (20:53 -0500)]
zebra: Fix crash in ptm code

The code change to switch from stream_getX to STREAM_GETX added
a goto statement to be handled for a failure case.  The failure
case was properly handled but the normal case was not tested
properly and there exists a situation where we would free
the out_ctxt 2 times.  Prevent that from happening.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoospfd: clean route map prefixlist vrf during exit
Chirag Shah [Thu, 25 Jan 2018 00:41:07 +0000 (16:41 -0800)]
ospfd: clean route map prefixlist vrf during exit

Call Route-map, prefix-list clean up routines and
vrf clearnup during ospf daemon exit routine.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agoospfd: allow multiple options in the redistribute command
Renato Westphal [Wed, 24 Jan 2018 23:05:27 +0000 (21:05 -0200)]
ospfd: allow multiple options in the redistribute command

Other variants of the redistribute command (e.g. "redistribute
<ospf|table> (1-65535) ..." already accept multiple options.

Fixes Issue #1670.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: Move selected_fib assignment
Donald Sharp [Wed, 24 Jan 2018 14:16:39 +0000 (09:16 -0500)]
zebra: Move selected_fib assignment

The dest->selected_fib assignment needs to happen
after the install and should be controlled by
the southbound api return of success or failure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: check flags before attempting keepalive ops
Quentin Young [Wed, 24 Jan 2018 22:47:17 +0000 (17:47 -0500)]
bgpd: check flags before attempting keepalive ops

If a peer already has keepalives turned on when asking to turn them on,
return immediately. Same thing for turning them off.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>