]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
6 years agoMerge pull request #3827 from chiragshah6/evpn_dev1
Sri Mohana Singamsetty [Thu, 21 Feb 2019 23:39:43 +0000 (15:39 -0800)]
Merge pull request #3827 from chiragshah6/evpn_dev1

bgpd: vrl source-vrf route map filter

6 years agoMerge pull request #3841 from donaldsharp/pim_test
Jafar Al-Gharaibeh [Thu, 21 Feb 2019 16:41:53 +0000 (10:41 -0600)]
Merge pull request #3841 from donaldsharp/pim_test

Add `test pim keepalive-reset A.B.C.D A.B.C.D` command to pim

6 years agoMerge pull request #3830 from opensourcerouting/cherrypicks
Donald Sharp [Thu, 21 Feb 2019 12:58:34 +0000 (07:58 -0500)]
Merge pull request #3830 from opensourcerouting/cherrypicks

[master] cherrypick backlog

6 years agolib: Allow DEFPY_HIDDEN to exist in vtysh 3841/head
Donald Sharp [Thu, 21 Feb 2019 00:02:02 +0000 (19:02 -0500)]
lib: Allow DEFPY_HIDDEN to exist in vtysh

The DEFPY_HIDDEN commands were not being picked up
into vtysh.  Fix this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' command
Donald Sharp [Wed, 20 Feb 2019 22:21:39 +0000 (17:21 -0500)]
pimd: Add 'test pim keepalive-reset A.B.C.D A.B.C.D' command

Add a test command to pim that allows you to reset the keepalive timer
for an upstream to it's max value.  This is to allow purposeful testing
of cleanup code in pim, by forcing the keeaplive timer to expire later.

robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:10 00:00:52  00:00:25  00:02:54       1
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:11 00:00:51  00:00:24  00:02:53       1
robot# test pim keep 192.168.201.136 225.1.0.0
Setting (192.168.201.136,225.1.0.0) to current keep alive time: 210
robot# show ip pim upstream
Iif       Source          Group           State       Uptime   JoinTimer RSTimer   KATimer   RefCnt
enp3s0    192.168.201.136 225.1.0.0       NotJ,RegP   00:00:27 00:00:35  00:00:08  00:03:27       1
robot#

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3835 from qlyoung/build-update-libyang-doc-link
Renato Westphal [Wed, 20 Feb 2019 18:14:03 +0000 (15:14 -0300)]
Merge pull request #3835 from qlyoung/build-update-libyang-doc-link

build: update doc link for libyang warning

6 years agotools: fix new init script wrt. multi-instance 3830/head
David Lamparter [Mon, 18 Feb 2019 23:27:45 +0000 (00:27 +0100)]
tools: fix new init script wrt. multi-instance

TBH when I looked at watchfrr I didn't see any MI support and hence
assumed this just didn't work to begin with.  However, it actually does
(transparently to watchfrr, by just using "ospfd-1" as daemon name.)

So, fix this up and make it work again.

(Also remove 2 extraneous \n in messages.)

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodoc: update for new daemons settings
David Lamparter [Thu, 24 Jan 2019 17:20:56 +0000 (18:20 +0100)]
doc: update for new daemons settings

watchfrr_enable is ignored, watchfrr_options is unneeded and the
valgrind options have been replaced with daemon_wrap/all_wrap.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agobuild: update doc link for libyang warning 3835/head
Quentin Young [Tue, 19 Feb 2019 19:53:54 +0000 (19:53 +0000)]
build: update doc link for libyang warning

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3823 from opensourcerouting/confd-build-fix
Donald Sharp [Tue, 19 Feb 2019 18:05:17 +0000 (13:05 -0500)]
Merge pull request #3823 from opensourcerouting/confd-build-fix

build: fix linking to libconfd

6 years agoMerge pull request #3816 from opensourcerouting/doc-pager-theme
Quentin Young [Tue, 19 Feb 2019 17:41:08 +0000 (12:41 -0500)]
Merge pull request #3816 from opensourcerouting/doc-pager-theme

[master] doc: VTYSH_PAGER docs + new FRR theme

6 years agoMerge pull request #3790 from qlyoung/doc-add-buildessential-libsystemdev-docs
David Lamparter [Tue, 19 Feb 2019 16:54:25 +0000 (17:54 +0100)]
Merge pull request #3790 from qlyoung/doc-add-buildessential-libsystemdev-docs

doc: update build dependencies for debian systems

6 years agodoc: update build dependencies for debian systems 3790/head
Quentin Young [Tue, 12 Feb 2019 21:53:55 +0000 (21:53 +0000)]
doc: update build dependencies for debian systems

Add build-essential and, for platforms with systemd, libsystemd-dev to
the package list for builds

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoMerge pull request #3731 from opensourcerouting/bfd-refactory
Donald Sharp [Tue, 19 Feb 2019 16:32:39 +0000 (11:32 -0500)]
Merge pull request #3731 from opensourcerouting/bfd-refactory

bfdd: protocol refactory

6 years agobgpd: vrl source-vrf route map filter 3827/head
Chirag Shah [Fri, 15 Feb 2019 02:07:27 +0000 (18:07 -0800)]
bgpd: vrl source-vrf route map filter

For VRF route leak, enable route map filter based
on "source-vrf" check.

Implemented match filter rule for "source-vrf" which
compares leaked routes original vrf_id (where it leaked from)
during importing into target VRF.

Ticket:CM-23776
Reviewed By:
Testing Done:

Configure vrf route leak from vrf1 to vrf2,
configure import vrf under vrf2 along with route-map
with source-vrf filter.
Add and remove source-vrf filter and checked routes
were added and removed to vrf2 table via vpn (default) table.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
6 years agovtysh: fix pager compatibility handling
David Lamparter [Wed, 23 Jan 2019 13:15:52 +0000 (14:15 +0100)]
vtysh: fix pager compatibility handling

I just straight up forgot checking VTYSH_PAGER at startup, and the
"terminal paginate" command is only installed to VIEW_NODE so it can't
be processed from vtysh.conf in CONFIG_NODE...

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3746 from ton31337/feature/rfc_8212
David Lamparter [Tue, 19 Feb 2019 12:54:23 +0000 (13:54 +0100)]
Merge pull request #3746 from ton31337/feature/rfc_8212

bgpd: Implement RFC8212

6 years agoMerge pull request #3792 from donaldsharp/pbr_massacre_at_5
David Lamparter [Tue, 19 Feb 2019 12:53:37 +0000 (13:53 +0100)]
Merge pull request #3792 from donaldsharp/pbr_massacre_at_5

Pbr massacre at 5

6 years agoMerge pull request #3825 from opensourcerouting/master-isis-fix-3533
Donald Sharp [Mon, 18 Feb 2019 23:28:57 +0000 (18:28 -0500)]
Merge pull request #3825 from opensourcerouting/master-isis-fix-3533

[master] isisd: skip over deleted fragments

6 years agoisisd: skip over deleted fragments 3825/head
David Lamparter [Mon, 18 Feb 2019 20:34:06 +0000 (21:34 +0100)]
isisd: skip over deleted fragments

Since LSP fragments are also on our lspdb dict, lsp_tick() needs to skip
over them after calling lsp_destroy().  Otherwise it ends up accessing
free'd memory.

Fixes: #3533
Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3817 from sergeyrar/patch-1
David Lamparter [Mon, 18 Feb 2019 17:41:20 +0000 (18:41 +0100)]
Merge pull request #3817 from sergeyrar/patch-1

XSTRDUP function signature fix

6 years agobuild: fix linking to libconfd 3823/head
Renato Westphal [Mon, 18 Feb 2019 16:14:33 +0000 (13:14 -0300)]
build: fix linking to libconfd

Commit fdbd8086b1e1 removed the explicit -lconfd flag from
lib_confd_la_LIBADD in favor of using the CONFD_LIBS variable. The
problem, however, is that ConfD doesn't use pkg-config nor anything
similar, so CONFD_LIBS is not created automatically by autotools.

Fix this problem by manually assigning -lconfd to the CONFD_LIBS
variable in the configure script.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agoXSTRDUP function signature fix 3817/head
sergey [Mon, 18 Feb 2019 14:06:37 +0000 (16:06 +0200)]
XSTRDUP function signature fix

I think  there is a mistake in XSTRDUP function signature.

6 years agodoc: document VTYSH_PAGER and "terminal paginate" 3816/head
David Lamparter [Mon, 18 Feb 2019 13:23:03 +0000 (14:23 +0100)]
doc: document VTYSH_PAGER and "terminal paginate"

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agodoc: orange FRR theme
David Lamparter [Mon, 18 Feb 2019 12:57:43 +0000 (13:57 +0100)]
doc: orange FRR theme

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agoMerge pull request #3788 from AnuradhaKaruppiah/evpn-pmsi-fixes
David Lamparter [Mon, 18 Feb 2019 12:45:09 +0000 (13:45 +0100)]
Merge pull request #3788 from AnuradhaKaruppiah/evpn-pmsi-fixes

EVPN IMET route PMSI attribute handling fixes

6 years agoMerge pull request #3777 from donaldsharp/topotest_all_routes
David Lamparter [Mon, 18 Feb 2019 12:41:44 +0000 (13:41 +0100)]
Merge pull request #3777 from donaldsharp/topotest_all_routes

topotests: Add code to ensure routes are as expected

6 years agoMerge pull request #3802 from pguibert6WIND/ospfv3_misc_fixes
David Lamparter [Mon, 18 Feb 2019 12:13:58 +0000 (13:13 +0100)]
Merge pull request #3802 from pguibert6WIND/ospfv3_misc_fixes

Ospfv3 misc fixes

6 years agoMerge pull request #3706 from pguibert6WIND/graceful_restart_range
David Lamparter [Mon, 18 Feb 2019 12:10:31 +0000 (13:10 +0100)]
Merge pull request #3706 from pguibert6WIND/graceful_restart_range

Graceful restart range

6 years agoMerge pull request #3797 from donaldsharp/allow_in_dir_build
David Lamparter [Mon, 18 Feb 2019 12:09:29 +0000 (13:09 +0100)]
Merge pull request #3797 from donaldsharp/allow_in_dir_build

build: non-recursive sharpd

6 years agoMerge pull request #3808 from qlyoung/update-readme-protos
David Lamparter [Mon, 18 Feb 2019 12:07:10 +0000 (13:07 +0100)]
Merge pull request #3808 from qlyoung/update-readme-protos

README.md: update list of supported protos

6 years agoMerge pull request #3804 from qlyoung/build-remove-fPIE-add-fPIC
David Lamparter [Mon, 18 Feb 2019 11:59:41 +0000 (12:59 +0100)]
Merge pull request #3804 from qlyoung/build-remove-fPIE-add-fPIC

build: fix automake fart under MSAN

6 years agobgpd: Implement RFC8212 3746/head
Donatas Abraitis [Thu, 7 Feb 2019 08:49:04 +0000 (10:49 +0200)]
bgpd: Implement RFC8212

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
6 years agoMerge pull request #3805 from qlyoung/msan-fixes
Mark Stapp [Fri, 15 Feb 2019 20:53:53 +0000 (15:53 -0500)]
Merge pull request #3805 from qlyoung/msan-fixes

lib: fix uninitialized value use in privs.c

6 years agoMerge pull request #3798 from robgil/docker-debian9
Quentin Young [Fri, 15 Feb 2019 18:10:49 +0000 (13:10 -0500)]
Merge pull request #3798 from robgil/docker-debian9

Quick and dirty debian9 docker image

6 years agoREADME.md: update list of supported protos 3808/head
Quentin Young [Fri, 15 Feb 2019 17:57:13 +0000 (17:57 +0000)]
README.md: update list of supported protos

WHOoOoOooOoOooOOOOOo!!!

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agobgpd: fix automake fart under MSAN 3804/head
Quentin Young [Fri, 15 Feb 2019 17:32:09 +0000 (17:32 +0000)]
bgpd: fix automake fart under MSAN

"When building without VNC, automake sees that the `bgpd_bgpd_CFLAGS`
variable exists, although it is only set in the VNC-enabled case... but
since the variable exists, it unconditionally drops `AM_CFLAGS` for the
two bgp targets and uses `bgpd_bgpd_CFLAGS` instead, which will
contain... _nothing_."

This was breaking builds of bgpd binaries with MSAN enabled.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: reset the global ospf6 pointer 3802/head
Philippe Guibert [Fri, 15 Feb 2019 16:42:13 +0000 (17:42 +0100)]
ospf6d: reset the global ospf6 pointer

reset the global ospf6 pointer.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agolib: fix garbage array size in zprivs_init 3805/head
Quentin Young [Fri, 15 Feb 2019 16:27:55 +0000 (16:27 +0000)]
lib: fix garbage array size in zprivs_init

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agodocker: quick and dirty debian 9 img 3798/head
Rob Gil [Thu, 14 Feb 2019 03:06:11 +0000 (22:06 -0500)]
docker: quick and dirty debian 9 img

Signed-off-by: Rob Gil <rob@rem5.com>
6 years agolib: fix uninitialized value use in privs.c
Quentin Young [Thu, 14 Feb 2019 18:40:29 +0000 (18:40 +0000)]
lib: fix uninitialized value use in privs.c

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
6 years agoospf6d: upon interface deletion, the area if list may be updated
Philippe Guibert [Thu, 14 Feb 2019 13:04:45 +0000 (14:04 +0100)]
ospf6d: upon interface deletion, the area if list may be updated

there are some events where the list of interfaces per area should be
reviewed due to an interface is being removed. This fix avoids having
some memory leak.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agoospf6d: closing server socket when leaving ospf6d
Philippe Guibert [Thu, 14 Feb 2019 13:06:41 +0000 (14:06 +0100)]
ospf6d: closing server socket when leaving ospf6d

this commit brings consistency as it closes the socket used to carry
ospfv3 messages.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobfdd: fix CI warnings 3731/head
Rafael Zalamena [Tue, 5 Feb 2019 00:05:39 +0000 (22:05 -0200)]
bfdd: fix CI warnings

Fix a few checkpatch warnings and a clang analyzer warning of
uninitialized variable.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix discriminator mismatch log message
Rafael Zalamena [Mon, 4 Feb 2019 15:51:24 +0000 (13:51 -0200)]
bfdd: fix discriminator mismatch log message

The discriminator is an unsigned 32bit variable.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: apply new timers on on-going connections
Rafael Zalamena [Mon, 4 Feb 2019 15:44:52 +0000 (13:44 -0200)]
bfdd: apply new timers on on-going connections

Apply new timers when only one side is negotiating new settings: when
sending the final bit we must apply the remote settings, otherwise
we'll keep the previous transmission rate.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: header clean up
Rafael Zalamena [Sat, 2 Feb 2019 12:10:01 +0000 (10:10 -0200)]
bfdd: header clean up

Remove some unused definitions in the bfd daemon header.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: don't allow VRF for single hop session
Rafael Zalamena [Sat, 2 Feb 2019 12:00:09 +0000 (10:00 -0200)]
bfdd: don't allow VRF for single hop session

Single hop sessions already allow you to select the interface, which
should be enough to determine the VRF we are running in.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: implement session interface observer
Rafael Zalamena [Sat, 2 Feb 2019 11:57:08 +0000 (09:57 -0200)]
bfdd: implement session interface observer

Allow `bfdd` to configure inexisting interfaces / VRF and only activate
them once the interface/VRF start existing. This implementation doesn't
handle dynamic VRFs yet.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: generate random session identificators
Rafael Zalamena [Fri, 1 Feb 2019 11:50:06 +0000 (09:50 -0200)]
bfdd: generate random session identificators

This also avoids returning `session_id == 0` which should not happen.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: remove unused vrf/interface data structures
Rafael Zalamena [Fri, 1 Feb 2019 11:29:26 +0000 (09:29 -0200)]
bfdd: remove unused vrf/interface data structures

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: refactor session lookup
Rafael Zalamena [Fri, 1 Feb 2019 11:22:00 +0000 (09:22 -0200)]
bfdd: refactor session lookup

Use internal data to lookup sessions. This approach has two main
advantages:

  * it uses less memory because it doesn't use strings for interface /
    vrf, it uses OS indexes instead;
  * prepares code to support VRF;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: slow down on peer connection loss
Rafael Zalamena [Thu, 31 Jan 2019 20:36:44 +0000 (18:36 -0200)]
bfdd: slow down on peer connection loss

Lets be more RFC 5880 compliant and slow down control packets on
connection loss.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: don't try to start echo on protocol restart
Rafael Zalamena [Thu, 31 Jan 2019 20:21:18 +0000 (18:21 -0200)]
bfdd: don't try to start echo on protocol restart

`echo-mode` should and will automatically start after session goes up
and it is allowed by the remote peer. See `bs_echo_timer_handler` for
more information.

This avoids having echo controling code spread.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: change slow time value
Rafael Zalamena [Thu, 31 Jan 2019 20:15:35 +0000 (18:15 -0200)]
bfdd: change slow time value

Let's use the RFC 5880 suggested value of 1 second for slow
transmission speed.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: simplify timer data structure
Rafael Zalamena [Thu, 31 Jan 2019 20:10:32 +0000 (18:10 -0200)]
bfdd: simplify timer data structure

Remove some legacy left overs of the old timer data structure bits and
use a simpler version:

  We always keep the current configuration in the timer structure, but
  also keep the running timers (before poll transition) in
  `cur_timers`.

  With this we can remove `new_timers` and avoid timer copy
  configuration copy on final handler (this also simplifies peer
  show command).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: don't poll to make echo/multiplier changes
Rafael Zalamena [Thu, 31 Jan 2019 20:04:34 +0000 (18:04 -0200)]
bfdd: don't poll to make echo/multiplier changes

RFC 5880 says that it is only necessary to run polling in two cases:

  - Desired minimum transmission interval;
  - Required minimum receive interval;

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: deduplicate echo handling code
Rafael Zalamena [Thu, 31 Jan 2019 16:16:09 +0000 (14:16 -0200)]
bfdd: deduplicate echo handling code

Use the standardized echo timer handling function.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: fix bug on poll sequence
Rafael Zalamena [Wed, 30 Jan 2019 20:11:55 +0000 (18:11 -0200)]
bfdd: fix bug on poll sequence

Poll and Final bits can't be set at the same time in a packet.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: echo-mode doesn't need poll to start/stop
Rafael Zalamena [Wed, 30 Jan 2019 17:49:11 +0000 (15:49 -0200)]
bfdd: echo-mode doesn't need poll to start/stop

Remove all polling negotiation when starting/stopping `echo-mode` as it
is not necessary.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: refactor timer handling
Rafael Zalamena [Tue, 29 Jan 2019 19:33:16 +0000 (17:33 -0200)]
bfdd: refactor timer handling

Move timer calculation code outside of the packet handling function
and explain how timers are calculated.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agobfdd: refactor state change handler
Rafael Zalamena [Tue, 15 Jan 2019 22:23:06 +0000 (20:23 -0200)]
bfdd: refactor state change handler

Expand state change handling into smaller functions with more
explanatory commentaries. This also handles some corner cases that
were not being handled.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
6 years agoMerge pull request #3799 from donaldsharp/show_debugging
Rafael Zalamena [Thu, 14 Feb 2019 16:16:38 +0000 (14:16 -0200)]
Merge pull request #3799 from donaldsharp/show_debugging

Show debugging for bfd

6 years agoMerge pull request #3791 from sworleys/RT-Braces-rtadv
Mark Stapp [Thu, 14 Feb 2019 14:07:47 +0000 (09:07 -0500)]
Merge pull request #3791 from sworleys/RT-Braces-rtadv

zebra: Fix CLANG suggestion for braces on init of struct

6 years agoospf6d: unitialised buffer zone used by socket
Philippe Guibert [Thu, 14 Feb 2019 13:10:03 +0000 (14:10 +0100)]
ospf6d: unitialised buffer zone used by socket

a buffer zone is initialised, before being used by server socket.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
6 years agobfdd: Add `show debugging [bfd]` command 3799/head
Donald Sharp [Thu, 14 Feb 2019 04:24:05 +0000 (23:24 -0500)]
bfdd: Add `show debugging [bfd]` command

This will prevent vtysh from displaying `command imcomplete`
for a `show debugging` issued and we are running this
bfd daemon.  A quick look showed me that there was not
really the ability to turn on/off debugging like other
daemons.  I imagine future work can be focused here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobfdd: Add some code so we can compile from w/ in the bfdd dir
Donald Sharp [Thu, 14 Feb 2019 04:23:06 +0000 (23:23 -0500)]
bfdd: Add some code so we can compile from w/ in the bfdd dir

Copy pattern of Makefile from other daemons to allow us to
compile this thingie(tm) from within the bfdd directory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3794 from donaldsharp/sharp_import_check
Mark Stapp [Wed, 13 Feb 2019 20:25:02 +0000 (15:25 -0500)]
Merge pull request #3794 from donaldsharp/sharp_import_check

Sharp import check

6 years agoMerge pull request #3796 from donaldsharp/mpls_deletion_cleanup
Mark Stapp [Wed, 13 Feb 2019 20:19:39 +0000 (15:19 -0500)]
Merge pull request #3796 from donaldsharp/mpls_deletion_cleanup

zebra: Deletion of a lsp is not a failure event

6 years agobuild: non-recursive sharpd 3797/head
Donald Sharp [Wed, 13 Feb 2019 20:03:16 +0000 (15:03 -0500)]
build: non-recursive sharpd

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agozebra: Deletion of a lsp is not a failure event 3796/head
Donald Sharp [Wed, 13 Feb 2019 17:49:59 +0000 (12:49 -0500)]
zebra: Deletion of a lsp is not a failure event

FRR is reporting that a lsp deletion event as a failure
in the log messsages.  This will lead to confusion and
lots of fun debugging.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3622 from mjstapp/fix_cpp_compile
Donald Sharp [Wed, 13 Feb 2019 17:47:23 +0000 (12:47 -0500)]
Merge pull request #3622 from mjstapp/fix_cpp_compile

libs, daemons: changes to permit c++ compilation

6 years agoMerge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1
Donald Sharp [Wed, 13 Feb 2019 14:32:43 +0000 (09:32 -0500)]
Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1

topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev

6 years agosharpd: Add ability to track import-check nexthops 3794/head
Donald Sharp [Wed, 13 Feb 2019 14:27:19 +0000 (09:27 -0500)]
sharpd: Add ability to track import-check nexthops

Add the ability to sharp to track import-check type routes
from the cli.  Update docs too.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agosharpd: Allow the registration of import checks to zebra
Donald Sharp [Wed, 13 Feb 2019 13:55:12 +0000 (08:55 -0500)]
sharpd: Allow the registration of import checks to zebra

Minor code modification to allow the sharp_zebra.c code
to differentiate between import check or nexthop watch
types.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3778 from mjstapp/fix_dplane_update
Donald Sharp [Wed, 13 Feb 2019 00:36:02 +0000 (19:36 -0500)]
Merge pull request #3778 from mjstapp/fix_dplane_update

zebra: use update semantics for routes consistently

6 years agopbrd: Do not delete pmi until completion of rule delete. 3792/head
Donald Sharp [Tue, 12 Feb 2019 19:55:15 +0000 (14:55 -0500)]
pbrd: Do not delete pmi until completion of rule delete.

When we have a pbr-policy applied to an interface and the
rule is installed and then deleted, we would not properly
clean up the bit field for the pmi as well as not note
the rule as properly deleted.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agopbrd: If changing policy on an interface be careful what you ask for
Donald Sharp [Wed, 13 Feb 2019 00:17:05 +0000 (19:17 -0500)]
pbrd: If changing policy on an interface be careful what you ask for

When changing policy on an interface, only delete the old_pbrm
if it is different than the current, this covers the case:

current config:
int swp1
  pbr-policy DONNA

To a config entered of:

int swp1
  pbr-policy EVA

Additionally there is no need to reinstall if we enter the same
pbr-policy two times in a row.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agobgpd: parse label in pmsi tunnel attribute 3788/head
Anuradha Karuppiah [Tue, 12 Feb 2019 20:56:26 +0000 (12:56 -0800)]
bgpd: parse label in pmsi tunnel attribute

Consider the following topo VTEP1->SPINE1->VTEP2. ebgp is being used
for evpn route exchange with SPINE just acting as a pass through.

1. VTEP1 was building the type-3 IMET route with the correct PMSI
tunnel type (ingress-replication) and label (VNI)
2. Spine1 was however only parsing the tunnel-type in the attr (was
skipping parsing of the label field altogether) -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@MSP1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  TORC11(downlink-1) TORC12(downlink-2) TORC21(downlink-3) TORC22(downlink-4) TORS1(downlink-5) TORS2(downlink-6)
  Route [3]:[0]:[32]:[27.0.0.15]
  5550
    27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
      Origin IGP, valid, external, bestpath-from-AS 5550, best
      Extended Community: RT:5550:1003 ET:8
      AddPath ID: RX 0, TX 227
      Last update: Thu Feb  7 15:44:22 2019
      PMSI Tunnel Type: Ingress Replication, label: 16777213 >>>>>>>

Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@MSP1:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
3. So VTEP2 didn't rx the correct label.

In an all FRR setup this doesn't have any functional consequence but some
vendors are validating the content of the label field as well and ignoring
the IMET route from FRR (say VTEP1 is FRR and VTEP2 is 3rd-party). The
functional consequence of this VTEP2 ignores VTEP1's IMET route and doesn't
add VTEP1 to the corresponding l2-vni flood list.

This commit fixes up the PMSI attr parsing on spine-1 -
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
root@MSP1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  TORC11(downlink-1) TORC12(downlink-2) TORC21(downlink-3) TORC22(downlink-4) TORS1(downlink-5) TORS2(downlink-6)
  Route [3]:[0]:[32]:[27.0.0.15]
  5550
    27.0.0.15 from TORS1(downlink-5) (27.0.0.15)
      Origin IGP, valid, external, bestpath-from-AS 5550, best
      Extended Community: RT:5550:1003 ET:8
      AddPath ID: RX 0, TX 278
      Last update: Thu Feb  7 00:17:40 2019
      PMSI Tunnel Type: Ingress Replication, label: 1003 >>>>>>>>>>>

Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@MSP1:~#
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

Ticket: CM-23790

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agobgpd: display label as part of the PMSI tunnel attribute
Anuradha Karuppiah [Tue, 12 Feb 2019 20:53:40 +0000 (12:53 -0800)]
bgpd: display label as part of the PMSI tunnel attribute

root@TORS1:~# net show bgp l2vpn evpn route rd 27.0.0.15:4 type multicast
EVPN type-2 prefix: [2]:[ESI]:[EthTag]:[MAClen]:[MAC]
EVPN type-3 prefix: [3]:[EthTag]:[IPlen]:[OrigIP]
EVPN type-5 prefix: [5]:[ESI]:[EthTag]:[IPlen]:[IP]

BGP routing table entry for 27.0.0.15:4:[3]:[0]:[32]:[27.0.0.15]
Paths: (1 available, best #1)
  Advertised to non peer-group peers:
  MSP1(uplink-1) MSP2(uplink-2)
  Route [3]:[0]:[32]:[27.0.0.15] VNI 1003
  Local
    27.0.0.15 from 0.0.0.0 (27.0.0.15)
      Origin IGP, weight 32768, valid, sourced, local, bestpath-from-AS Local, best
      Extended Community: ET:8 RT:5550:1003
      AddPath ID: RX 0, TX 10
      Last update: Thu Feb  7 00:17:24 2019
      PMSI Tunnel Type: Ingress Replication, label: 1003 >>>>>>>>>>>>>

Displayed 1 prefixes (1 paths) with this RD (of requested type)
root@TORS1:~#

Ticket: CM-23790

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agobgpd: fill the pmsi_tnl_type into the type-3 PMSI attr
Anuradha Karuppiah [Tue, 12 Feb 2019 20:51:49 +0000 (12:51 -0800)]
bgpd: fill the pmsi_tnl_type into the type-3 PMSI attr

Currently we are hardcoding it at the time of attr building to
ingress-replication. This is just a code clean-up and has no
functional impact.

Ticket: CM-23790

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
6 years agozebra: Fix CLANG suggestion for braces on init of struct 3791/head
Stephen Worley [Tue, 12 Feb 2019 20:24:00 +0000 (15:24 -0500)]
zebra: Fix CLANG suggestion for braces on init of struct

CLANG was throwing an error because struct rtadv_rdnss(dnssl) was being
initialized with = {0} instead of {}. Change to be the latter.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
6 years agoMerge pull request #3781 from donaldsharp/pbr_debug
David Lamparter [Tue, 12 Feb 2019 17:07:14 +0000 (18:07 +0100)]
Merge pull request #3781 from donaldsharp/pbr_debug

pbrd: Add some missing debugs from external events

6 years agoMerge pull request #3783 from mjstapp/fix_bad_rm_decrement
David Lamparter [Tue, 12 Feb 2019 17:06:07 +0000 (18:06 +0100)]
Merge pull request #3783 from mjstapp/fix_bad_rm_decrement

bgpd: remove route-map decrement call on prefix-list

6 years agobgpd: remove route-map decrement call on prefix-list 3783/head
Mark Stapp [Tue, 12 Feb 2019 15:10:19 +0000 (10:10 -0500)]
bgpd: remove route-map decrement call on prefix-list

Commit b4897fa5 introduced a call to decrement a route-map counter,
applied to a prefix-list in bgp_rfapi_cfg.c. This commit removes
that call.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agoMerge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown
David Lamparter [Tue, 12 Feb 2019 13:59:39 +0000 (14:59 +0100)]
Merge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown

bgpd: if vrf is unknown, bgp deletion not complete

6 years agoMerge pull request #3771 from donaldsharp/eigrp_crash
David Lamparter [Tue, 12 Feb 2019 13:40:09 +0000 (14:40 +0100)]
Merge pull request #3771 from donaldsharp/eigrp_crash

Eigrp crash

6 years agoMerge pull request #3723 from slrz/zebra-rtadv-add-rfc8106-support
David Lamparter [Tue, 12 Feb 2019 13:30:00 +0000 (14:30 +0100)]
Merge pull request #3723 from slrz/zebra-rtadv-add-rfc8106-support

zebra: add support for IPv6 RA options for DNS configuration (RFC8106)

6 years agopbrd: Add some missing debugs from external events 3781/head
Donald Sharp [Tue, 12 Feb 2019 13:24:58 +0000 (08:24 -0500)]
pbrd: Add some missing debugs from external events

Add some debugs from events that can happen that will
influence our pbr behavior.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3719 from liam-mcb/master
Martin Winter [Tue, 12 Feb 2019 01:54:53 +0000 (08:54 +0700)]
Merge pull request #3719 from liam-mcb/master

Revert "redhat: don't Requires initscript on systemd based distros"

6 years agotests: add C++ header compatibility smoke test 3622/head
David Lamparter [Mon, 11 Feb 2019 12:22:49 +0000 (13:22 +0100)]
tests: add C++ header compatibility smoke test

Compiling an empty C file with most headers included and -Wc++-compat
gives us a build error if we introduce some stupid C++-incompatible
change.

While this won't catch everything, it's a good start.

Signed-off-by: David Lamparter <equinox@diac24.net>
6 years agolib: a few more trivial changes for C++ compatibility
Renato Westphal [Mon, 11 Feb 2019 18:10:40 +0000 (16:10 -0200)]
lib: a few more trivial changes for C++ compatibility

* command_graph.h: stop using "new" as a parameter name as that's a
  reserved C++ keyword.

* module.h: avoid using C99 designated initializers since C++ doesn't
  support them. This change hurts code readability quite considerably,
  so we should try to find a better solution later.

* pw.h: remove unneeded empty structure to silence a C++ warning.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: add macro that performs explicit static casts when using a C++ compiler
Renato Westphal [Mon, 11 Feb 2019 18:04:26 +0000 (16:04 -0200)]
lib: add macro that performs explicit static casts when using a C++ compiler

C++ doesn't support implicit casts from void pointers like C
does. And the libfrr headers have some bits of code that rely on
implicit casts in order to work. To solve this problem, add a new
"static_cast" macro that performs explicit static casts when a C++
compiler is being used, or do nothing otherwise.

NOTE: since macros are only evaluated when they are used, there
might be other macros from libfrr that will need to use "static_cast"
as well. If a header is successfully compiled using a C++ compiler,
there's no guarantee that its macros are compatible with C++. We'll
only know about such macros when they are used by C++ code, then
we'll need to adapt them one by one in the future.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: rename enum to avoid conflict
Renato Westphal [Mon, 11 Feb 2019 18:01:32 +0000 (16:01 -0200)]
lib: rename enum to avoid conflict

Two different definitions of "enum filter_type" exist in libfrr:
one in lib/filter.h and other in lib/command_match.h. Rename one
of them to resolve a conflict that happens when both headers are
included by the same file.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agolib: add extern "C" {} blocks to all libfrr headers
Renato Westphal [Thu, 7 Feb 2019 22:10:31 +0000 (20:10 -0200)]
lib: add extern "C" {} blocks to all libfrr headers

These are necessary to use functions defined in these headers from C++.

Signed-off-by: David Lamparter <equinox@diac24.net>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
6 years agozebra: use update semantics for routes consistently 3778/head
Mark Stapp [Mon, 11 Feb 2019 21:11:02 +0000 (16:11 -0500)]
zebra: use update semantics for routes consistently

Use 'update' semantics for route updates, to ensure that
netlink replace behavior works correctly.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
6 years agozebra: prefer DEFINE_MTYPE_STATIC for local memtypes 3723/head
Lars Seipel [Mon, 11 Feb 2019 01:10:50 +0000 (02:10 +0100)]
zebra: prefer DEFINE_MTYPE_STATIC for local memtypes

Signed-off-by: Lars Seipel <ls@slrz.net>
6 years agotopotests: Add code to ensure routes are as expected 3777/head
Donald Sharp [Mon, 11 Feb 2019 17:54:31 +0000 (12:54 -0500)]
topotests: Add code to ensure routes are as expected

This code just ensures that v4 and v6 routes are as expected
in the rib.  While this test addition is not that complicated it would
have caught some issues while I was attempting to handle the
switchover to a different style of rib processing.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
6 years agoMerge pull request #3774 from ton31337/fix/ospfd_instances_do_not_connect_to_default
Donald Sharp [Mon, 11 Feb 2019 17:52:31 +0000 (12:52 -0500)]
Merge pull request #3774 from ton31337/fix/ospfd_instances_do_not_connect_to_default

vtysh: Fix typo in function name

6 years agolib: remove unnamed struct in qobj for C++
David Lamparter [Mon, 11 Feb 2019 12:07:24 +0000 (13:07 +0100)]
lib: remove unnamed struct in qobj for C++

Signed-off-by: David Lamparter <equinox@diac24.net>