]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
6 years agoredhat: Fix old systems on upgrade path 2342/head
Donald Sharp [Wed, 30 May 2018 11:53:28 +0000 (07:53 -0400)]
redhat: Fix old systems on upgrade path

Fix old systems in upgrade path to enable watchfrr when upgrading.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoredhat: Make watchfrr the default
Donald Sharp [Thu, 17 May 2018 11:58:02 +0000 (07:58 -0400)]
redhat: Make watchfrr the default

With systemd being the default on more systems now, lets
configure watchfrr to start else systemd systems on
redhat will not stay up for more than 1 minute.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2323 from qlyoung/d9-builddocs-branch-fixup-4.0
Renato Westphal [Thu, 31 May 2018 14:15:08 +0000 (11:15 -0300)]
Merge pull request #2323 from qlyoung/d9-builddocs-branch-fixup-4.0

doc: name correct branch in Debian 9 build docs [4.0]

6 years agodoc: name correct branch in Debian 9 build docs 2323/head
Quentin Young [Tue, 29 May 2018 19:45:30 +0000 (19:45 +0000)]
doc: name correct branch in Debian 9 build docs

Credits to TekunoKage for finding and fixing.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #2314 from opensourcerouting/stable-4.0-malloc-0-fix
Donald Sharp [Tue, 29 May 2018 14:21:59 +0000 (10:21 -0400)]
Merge pull request #2314 from opensourcerouting/stable-4.0-malloc-0-fix

lib: make allocators work for allocation sizes of 0

6 years agolib: make allocators work for allocation sizes of 0 2314/head
Christian Franke [Tue, 29 May 2018 12:47:20 +0000 (14:47 +0200)]
lib: make allocators work for allocation sizes of 0

Fixes: #2155
Signed-off-by: Christian Franke <chris@opensourcerouting.org>
6 years agoMerge pull request #2281 from donaldsharp/mode_or_node
Renato Westphal [Wed, 23 May 2018 16:20:40 +0000 (13:20 -0300)]
Merge pull request #2281 from donaldsharp/mode_or_node

debianpkg: Fix typo

6 years agodebianpkg: Fix typo 2281/head
Donald Sharp [Tue, 22 May 2018 18:22:22 +0000 (14:22 -0400)]
debianpkg: Fix typo

Allow users to build with WANT_CUMULUS_MODE

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #2270 from opensourcerouting/rpki-spec-fix-4.0
Donald Sharp [Tue, 22 May 2018 17:11:38 +0000 (13:11 -0400)]
Merge pull request #2270 from opensourcerouting/rpki-spec-fix-4.0

redhat: Fix RPKI RPM build option (Stable/4.0 branch)

6 years agoMerge pull request #2271 from donaldsharp/fix_4.0_blackholes
Renato Westphal [Tue, 22 May 2018 12:04:30 +0000 (09:04 -0300)]
Merge pull request #2271 from donaldsharp/fix_4.0_blackholes

Fix 4.0 blackholes

6 years agozebra: Only send down pertinent information on RTM_DELROUTE 2271/head
Donald Sharp [Mon, 9 Apr 2018 18:16:00 +0000 (14:16 -0400)]
zebra: Only send down pertinent information on RTM_DELROUTE

Background:

v6 does not have route replace semantics.  If you want to add a nexthop
to an existing route, you just send RTM_NEWROUTE and the new nexthop.
If you want to delete a nexthop you should just send RTM_DELROUTE
with the removed nexthop.

This leads to situations where if zebra is processing a route
and has lost track of intermediate nexthops( yes this sucks )
then v6 routes will get out of sync when we try to implement
route replace semantics.

So notice when we are doing a route delete and the route is
not being updated, just send the prefix and tell it too delete.

Ticket: CM-20391
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Allow blackhole route deletion for prefixes
Donald Sharp [Mon, 16 Apr 2018 22:42:40 +0000 (18:42 -0400)]
zebra: Allow blackhole route deletion for prefixes

With the recent change to just pass the prefix in
for the RTM_DELROUTE, for blackhole routes we
had stopped modifying the req.rtm_type to
be the appropriate type for blackhole routes.

Since we are just deleting on the route, and
zebra is never going to really install the same
route multiple times then we do not need
to specify the req.r.rtm_type for the deletion
command.

Ticket: CM-20616
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoredhat: Fix RPKI RPM build option 2270/head
Martin Winter [Mon, 21 May 2018 13:47:36 +0000 (06:47 -0700)]
redhat: Fix RPKI RPM build option

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #1988 from qlyoung/fixup-vtysh-read-4.0
Jafar Al-Gharaibeh [Mon, 16 Apr 2018 12:22:18 +0000 (07:22 -0500)]
Merge pull request #1988 from qlyoung/fixup-vtysh-read-4.0

vtysh: fixup incorrect read logic [4.0]

7 years agoMerge pull request #2056 from rtrlib/fix_ipv6
Lou Berger [Fri, 13 Apr 2018 18:11:06 +0000 (14:11 -0400)]
Merge pull request #2056 from rtrlib/fix_ipv6

bgpd: fix rpki validation for ipv6

7 years agobgpd: fix rpki validation for ipv6 2056/head
Marcel Röthke [Thu, 12 Apr 2018 12:13:07 +0000 (14:13 +0200)]
bgpd: fix rpki validation for ipv6

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
7 years agovtysh: fixup incorrect read logic 1988/head
Quentin Young [Wed, 28 Mar 2018 19:19:08 +0000 (15:19 -0400)]
vtysh: fixup incorrect read logic

If a daemon sent vtysh a response whose size satisfied

1 <= 4096 - (size % 4096) <= 2

vtysh would hang.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #2020 from qlyoung/global-compiler-h-4.0
Russ White [Wed, 11 Apr 2018 12:04:14 +0000 (08:04 -0400)]
Merge pull request #2020 from qlyoung/global-compiler-h-4.0

lib: add compiler.h to zebra.h

7 years agolib: add compiler.h to command.h 2020/head
Quentin Young [Tue, 3 Apr 2018 16:30:11 +0000 (12:30 -0400)]
lib: add compiler.h to command.h

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agolib: add compiler.h to zebra.h
Quentin Young [Tue, 3 Apr 2018 14:54:40 +0000 (10:54 -0400)]
lib: add compiler.h to zebra.h

The definitions in compiler.h should be globally available.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
7 years agoMerge pull request #2017 from msablic/stable40_rules
Martin Winter [Tue, 10 Apr 2018 12:35:15 +0000 (13:35 +0100)]
Merge pull request #2017 from msablic/stable40_rules

debianpkg: rules WANT_FRR_USER bug

7 years agodebianpkg: rules WANT_FRR_USER bug 2017/head
Mladen Sablic [Tue, 3 Apr 2018 13:51:45 +0000 (15:51 +0200)]
debianpkg: rules WANT_FRR_USER bug

WANT_FRR_USER was not prepended by appropriate command line
option for configure.

Signed-off-by: Mladen Sablic <mladen.sablic@gmail.com>
7 years agoMerge pull request #2021 from LabNConsulting/working/4.0/confdate+release
Martin Winter [Wed, 4 Apr 2018 22:37:18 +0000 (23:37 +0100)]
Merge pull request #2021 from LabNConsulting/working/4.0/confdate+release

4.0: ignore confdate expiration in non-dev branches

7 years ago*: Only test CONFDATE when VERSION_TYPE_DEV defined 2021/head
Lou Berger [Tue, 3 Apr 2018 17:44:46 +0000 (13:44 -0400)]
*: Only test CONFDATE when VERSION_TYPE_DEV defined

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMakefile.am: add automatic defintion of VERSION_TYPE_(DEV_|RELEASE) CPP type
Lou Berger [Tue, 3 Apr 2018 17:44:06 +0000 (13:44 -0400)]
Makefile.am: add automatic defintion of VERSION_TYPE_(DEV_|RELEASE) CPP type

Signed-off-by: Lou Berger <lberger@labn.net>
7 years agoMerge pull request #1969 from opensourcerouting/1804-stable4
Donald Sharp [Tue, 27 Mar 2018 19:29:04 +0000 (15:29 -0400)]
Merge pull request #1969 from opensourcerouting/1804-stable4

Ubuntu 18.04 Package support and docs (Stable 4.0)

7 years agodoc: Add documentation for Ubunut 18.04 1969/head
Martin Winter [Tue, 27 Mar 2018 14:04:01 +0000 (07:04 -0700)]
doc: Add documentation for Ubunut 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agodebianpkg: update doc for Ubuntu 18.04
Martin Winter [Mon, 19 Mar 2018 18:29:34 +0000 (11:29 -0700)]
debianpkg: update doc for Ubuntu 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agodebianpkg: Override systemd-service-file-refers-to-unusual-wantedby-target
Martin Winter [Mon, 19 Mar 2018 18:28:19 +0000 (11:28 -0700)]
debianpkg: Override systemd-service-file-refers-to-unusual-wantedby-target

Override new lintian warning for using the network-online.target

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agodebianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod
Martin Winter [Mon, 19 Mar 2018 18:16:09 +0000 (11:16 -0700)]
debianpkg: Fix maintainer-script-should-not-use-recursive-chown-or-chmod

New lintian version causes warning for recursive chown and chmod. This
change avoids the the recursive operation by splitting it into to commands

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agodebianpkg: Add support for Ubuntu 18.04
Martin Winter [Sat, 17 Mar 2018 19:57:13 +0000 (12:57 -0700)]
debianpkg: Add support for Ubuntu 18.04

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
7 years agoMerge pull request #1939 from opensourcerouting/rpm-buildreq-4
Donald Sharp [Tue, 20 Mar 2018 18:24:02 +0000 (14:24 -0400)]
Merge pull request #1939 from opensourcerouting/rpm-buildreq-4

redhat: enable dist tarball to build in a chroot (stable/4.0)

7 years agoredhat: enable dist tarball to build in a chroot 1939/head
Arthur Jones [Mon, 19 Mar 2018 17:04:00 +0000 (10:04 -0700)]
redhat: enable dist tarball to build in a chroot

When building the rpms, we can use a chroot (in my case docker) to
ensure that the BuildRequires are complete.  This test failed with
errors like:

    checking for CARES... no
    configure: error: trying to build nhrpd, but libcares not found. install c-ares and its -dev headers.
    error: Bad exit status from /var/tmp/rpm-tmp.FewvLf (%build)

This is due to a couple missing BuildRequires in the spec file.  Here, we
add those in for all RPM builds.

Testing done:

Ran a docker build on CentOS7 which succeeded.  Loaded the modules onto
CentOS6 to make sure they were at least valid there, that succeeded.

Issue: https://github.com/FRRouting/frr/issues/1930
Signed-off-by: Arthur Jones <arthur.jones@riverbed.com>
7 years agoMerge pull request #1929 from opensourcerouting/isis-bpf-read-fix
Donald Sharp [Mon, 19 Mar 2018 22:50:28 +0000 (18:50 -0400)]
Merge pull request #1929 from opensourcerouting/isis-bpf-read-fix

isisd: fix and improve *BSDs support (stable/4.0)

7 years agoisisd: Fixed the way isis reads from bpf 1929/head
ipinlnd [Wed, 14 Mar 2018 19:26:48 +0000 (22:56 +0330)]
isisd: Fixed the way isis reads from bpf

With this fix, we parse the bpf to process every packet read

Signed-off-by: Ali Rezaee nlndipi@hotmail.com
(cherry picked from commit b9347997d6be2ba45bbad97ab8a2ee8c670f37b0)
Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
7 years agoisis: use descriptor polling instead of time
Rafael Zalamena [Wed, 7 Feb 2018 18:26:25 +0000 (16:26 -0200)]
isis: use descriptor polling instead of time

Allow other supported Operating Systems (OS) to use file descriptor
polling, instead of doing timed fd checks. This should improve
performance greatly on modern OSes (e.g. that support polling on
filtered sockets).

The known OS that doesn't support this is FreeBSD < 5.0, but even then
FRR doesn't compile in these versions. OSes using DLPI method (e.g
Solaris) does not support select()/poll()ing fds as well, so it will be
disabled for it.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit b0dd98e79854d27595390946166503064ccd7d4f)

7 years agoMerge pull request #1922 from opensourcerouting/rpki_warning_4.0
Martin Winter [Sun, 18 Mar 2018 14:26:26 +0000 (07:26 -0700)]
Merge pull request #1922 from opensourcerouting/rpki_warning_4.0

bgpd: Fix warning on 32 bit systems

7 years agobgpd: Fix warning on 32 bit systems 1922/head
Donald Sharp [Sat, 17 Mar 2018 19:08:13 +0000 (15:08 -0400)]
bgpd: Fix warning on 32 bit systems

We have a signed/unsigned comparison warning that this should
fix.

This should be ok because the range of input is a very limited
value and should never be of concern

Fixes: #1919
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
7 years agoMerge pull request #1870 from opensourcerouting/dev-4.0-frr-reload-vnc-fix
Daniel Walton [Wed, 14 Mar 2018 14:55:14 +0000 (07:55 -0700)]
Merge pull request #1870 from opensourcerouting/dev-4.0-frr-reload-vnc-fix

tools/frr-reload.py: process vnc settings as sub-context

7 years agotools/frr-reload.py: process vnc settings as sub-context 1870/head
Christian Franke [Mon, 12 Mar 2018 17:13:56 +0000 (18:13 +0100)]
tools/frr-reload.py: process vnc settings as sub-context

Signed-off-by: Christian Franke <chris@opensourcerouting.org>
7 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>
7 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]

7 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

7 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

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

7 years agotools: add LeakSanitizer suppressions list 1848/head
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>
7 years ago*: Make code use a consisten definition of labels 1785/head
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>
7 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]

7 years agoospfd: cancel SR thread at shutdown 1846/head
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>
7 years agodebianpkg: Fix - need to always run dh_gencontrol 1837/head
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>
7 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

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

7 years agobgpd: fix update-group show commands 1838/head
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>
7 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>
7 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>
7 years agovtysh: initialize vty structure correctly for output to terminal 1832/head
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>
7 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>
7 years agotools: Add helper frr-reload shell script for clean error 1807/head
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>
7 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

7 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

7 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

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

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

7 years agoOSPFd: Correct style 2nd round 1773/head
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>
7 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>
7 years agobgpd: fix incorrect keepalive timer evaluation 1775/head
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>
7 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>
7 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>
7 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>
7 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.

7 years agoisisd: Free up some memory allocated. 1741/head
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>
7 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>
7 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

7 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

7 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

7 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

7 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

7 years agoOSPFd: Fix Opaque LSA filtering in Segment Routing 1653/head
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>
7 years agolib: Fix encoding of vrf 1713/head
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>
7 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>
7 years agobgpd: Fix some evpn hash key creation 1702/head
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>
7 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>
7 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>
7 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

7 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

7 years agobgpd: Add ability to see martian next-hop's for a vrf 1705/head
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>
7 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

7 years agolib: fix more warnings on *BSD 1703/head
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>
7 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>
7 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>
7 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>
7 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>
7 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

7 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

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

7 years agoospfd: fix redistribute running config 1695/head
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>
7 years agobgpd: improve default shutdown help string 1694/head
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>
7 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