]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 years agotools: fix new init script wrt. multi-instance
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>
5 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>
5 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>
5 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

5 years agoisisd: skip over deleted fragments
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>
5 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

5 years agoXSTRDUP function signature fix
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.

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 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

5 years agoREADME.md: update list of supported protos
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>
5 years agobgpd: fix automake fart under MSAN
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>
5 years agoospf6d: reset the global ospf6 pointer
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>
5 years agolib: fix garbage array size in zprivs_init
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>
5 years agodocker: quick and dirty debian 9 img
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>
5 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>
5 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>
5 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>
5 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

5 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

5 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>
5 years agobfdd: Add `show debugging [bfd]` command
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>
5 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>
5 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

5 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

5 years agobuild: non-recursive sharpd
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>
5 years agozebra: Deletion of a lsp is not a failure event
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>
5 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

5 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

5 years agosharpd: Add ability to track import-check nexthops
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>
5 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>
5 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

5 years agobgpd: parse label in pmsi tunnel attribute
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>
5 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>
5 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>
5 years agozebra: Fix CLANG suggestion for braces on init of struct
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>
5 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

5 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

5 years agobgpd: remove route-map decrement call on prefix-list
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>
5 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

5 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

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

5 years agopbrd: Add some missing debugs from external events
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>
5 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"

5 years agotests: add C++ header compatibility smoke test
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>
5 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>
5 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>
5 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>
5 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>
5 years agozebra: use update semantics for routes consistently
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>
5 years agozebra: prefer DEFINE_MTYPE_STATIC for local memtypes
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>
5 years agotopotests: Add code to ensure routes are as expected
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>
5 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

5 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>
5 years agolib: remove extra top-level ;
David Lamparter [Mon, 11 Feb 2019 10:40:19 +0000 (11:40 +0100)]
lib: remove extra top-level ;

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: make atomic ops C++ compatible
David Lamparter [Mon, 11 Feb 2019 10:38:57 +0000 (11:38 +0100)]
lib: make atomic ops C++ compatible

C++ doesn't have ISO C11 stdatomic.h or "_Atomic inttype", so use
std::atomic instead to get the headers compatible.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: make union prefixptr C++-compatible
David Lamparter [Mon, 11 Feb 2019 10:41:26 +0000 (11:41 +0100)]
lib: make union prefixptr C++-compatible

Add a no-op conversion constructor to tell C++ that union prefixptr
accepts any of its member types.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agolib: revert table.h change for C++
David Lamparter [Mon, 11 Feb 2019 12:10:16 +0000 (13:10 +0100)]
lib: revert table.h change for C++

This reverts the lib/table.h change from commit
049b31f7d810fd70069e3edbbd3fea6b5c7af98f.

Signed-off-by: David Lamparter <equinox@diac24.net>
5 years agoisisd: rename northbound delete apis
Mark Stapp [Wed, 30 Jan 2019 10:07:39 +0000 (11:07 +0100)]
isisd: rename northbound delete apis

To align with the change to avoid the keyword 'delete', rename
the isis northbound handlers to '_destroy'.

Signed-off-by: Mark Stapp <mjstapp@gmail.com>
5 years agolibs, rip, isis: change northbound operation enum to DESTROY
Mark Stapp [Wed, 30 Jan 2019 09:54:25 +0000 (04:54 -0500)]
libs, rip, isis: change northbound operation enum to DESTROY

Change the northbound lib operation from DELETE to DESTROY;
make the required changes in the users of the northbound, in
the cli, rip, ripng, and isis.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agolibs, daemons: changes to permit c++ compilation
Mark Stapp [Tue, 15 Jan 2019 18:34:23 +0000 (13:34 -0500)]
libs, daemons: changes to permit c++ compilation

Some misc changes to resolve some c++ compilation errors.
The goal is only to permit an external module - a plugin,
for example - to see frr headers, not to support or encourage
contributions in c++. The changes include: avoiding use
of keywords like 'new', 'delete'; cleaning up implicit
type-casting from 'void *' in several places.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agovtysh: Fix typo in function name
Donatas Abraitis [Mon, 11 Feb 2019 15:53:49 +0000 (17:53 +0200)]
vtysh: Fix typo in function name

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
5 years agobgpd: if vrf is unknown, bgp deletion not complete
Philippe Guibert [Mon, 11 Feb 2019 13:04:52 +0000 (14:04 +0100)]
bgpd: if vrf is unknown, bgp deletion not complete

there are some cases where the bgp deletion will not be complete, while
the vrf identifier of the bgp instance is not completely identified. The
vrf search based on the bgp name is the better protection, since the bgp
vrf instance is created, even if the vrf identifier is not yet known.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
5 years agoeigrpd: Do not redelete the eigrp interface data structure
Donald Sharp [Mon, 11 Feb 2019 02:19:48 +0000 (21:19 -0500)]
eigrpd: Do not redelete the eigrp interface data structure

On interface down do not delete the eigrp interface data
structure.  Ensure that the address that we have setup the
eigrp data structure ontop of is what we are deleting.

Additionally add a test to show that this is no-longer
crashing eigrp.  Future commits will further modify
this test to actually ensure that the eigrp topo is
updated correctly and the rib has the correct data.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrpd: Correctly handle the ref-count in a couple of spots
Donald Sharp [Mon, 11 Feb 2019 12:19:14 +0000 (07:19 -0500)]
eigrpd: Correctly handle the ref-count in a couple of spots

The ref count for the eigrp topology table was incorrect in a couple
of spots.  Let's clean it up.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrp: Make the eigrp_interface have a prefix instead of a *prefix
Donald Sharp [Mon, 11 Feb 2019 12:16:35 +0000 (07:16 -0500)]
eigrp: Make the eigrp_interface have a prefix instead of a *prefix

The prefix data structure was being freed yet still needed in the
future and it's a fundamental part of the eigrp_interface data
structure let's keep it there instead of having it be deleted
and then not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoeigrpd: Remove unnecessary test for pointer
Donald Sharp [Sun, 10 Feb 2019 23:19:35 +0000 (18:19 -0500)]
eigrpd: Remove unnecessary test for pointer

If we are inside the for loop then eigrp *must* be valid.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3770 from donaldsharp/detailed_debugs
David Lamparter [Mon, 11 Feb 2019 07:21:12 +0000 (08:21 +0100)]
Merge pull request #3770 from donaldsharp/detailed_debugs

zebra: Update zserv debug messages to give a bit more useful info

5 years agoMerge pull request #3767 from donaldsharp/martians_ate_my_homework
David Lamparter [Mon, 11 Feb 2019 07:20:26 +0000 (08:20 +0100)]
Merge pull request #3767 from donaldsharp/martians_ate_my_homework

bgpd: Remove unused bgp_debug_count function

5 years agoMerge pull request #3715 from qlyoung/fix-systemd-deps
David Lamparter [Mon, 11 Feb 2019 06:50:16 +0000 (07:50 +0100)]
Merge pull request #3715 from qlyoung/fix-systemd-deps

tools: fix systemd dependency graph

5 years agozebra: Update zserv debug messages to give a bit more useful info
Donald Sharp [Sun, 10 Feb 2019 16:22:03 +0000 (11:22 -0500)]
zebra: Update zserv debug messages to give a bit more useful info

When we schedule a packet for future handling, list the packet
type so that we can see what we are getting with debugs.

Also note which client and how many packets we received from that
client.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agobgpd: Remove unused bgp_debug_count function
Donald Sharp [Sat, 9 Feb 2019 23:22:01 +0000 (18:22 -0500)]
bgpd: Remove unused bgp_debug_count function

This function was not used anywhere, remove it from the system.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agoMerge pull request #3760 from patrasar/RP_configure_inconsistent_addr_mask
Donald Sharp [Fri, 8 Feb 2019 12:37:43 +0000 (07:37 -0500)]
Merge pull request #3760 from patrasar/RP_configure_inconsistent_addr_mask

pimd: reject inconsistent address/mask "ip pim rp command"

5 years agoMerge pull request #3761 from patrasar/fix_refresh_oil_timer
Donald Sharp [Fri, 8 Feb 2019 12:31:12 +0000 (07:31 -0500)]
Merge pull request #3761 from patrasar/fix_refresh_oil_timer

pimd: Don't refersh the oif_creation timer if S,G already present

5 years agopimd: reject inconsistent address/mask "ip pim rp command"
Sarita Patra [Fri, 8 Feb 2019 09:35:21 +0000 (01:35 -0800)]
pimd: reject inconsistent address/mask "ip pim rp command"

Issue: Configure "ip pim rp x.x.x.x 225.0.0.0/4".
Show running config shows "ip pim rp x.x.x.x 224.0.0.0/4"
This is mis-leading.

Root-cause: Internally 225.0.0.0/4 is getting converted to
224.0.0.0/4 group mask, since the prefix length is 4.

Fix: Restrict the user to configure inconsistent group address
mask by throughing a cli error "Inconsistent address and mask".

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agopimd: Don't refersh the oif_creation timer if S,G already present
Sarita Patra [Fri, 8 Feb 2019 07:50:12 +0000 (23:50 -0800)]
pimd: Don't refersh the oif_creation timer if S,G already present

Issue: Shut the RP interface in the router RP. LHR will get to know
RP becomes not-reachable, so it send a prune towards the RP. On
receiving the prune, RP clear the (*, G) entry, but (S, G) should
not get removed if present.
Now no-shut the RP interface in the router RP. LHR will send a (*, G)
join towards the RP. On receiving join FRR create the (*, G) entry.
Along with this, it also add the interface(join received) in the OIL
of (S, G) and also refresh the (S, G) timer.

Fix: Dont refresh the timer for S, G or (*, G), if the flag for the
channel OIL is PIM_OIF_FLAG_PROTO_ANY.

Signed-off-by: Sarita Patra <saritap@vmware.com>
5 years agoMerge pull request #3752 from mjstapp/fix_wq_static_func
Donald Sharp [Thu, 7 Feb 2019 22:24:06 +0000 (17:24 -0500)]
Merge pull request #3752 from mjstapp/fix_wq_static_func

libs: remove useless static work_queue_free helper

5 years agobgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expected
Lou Berger [Sun, 3 Feb 2019 15:12:33 +0000 (15:12 +0000)]
bgp_l3vpn_to_bgp_vrf: verify TCP l3mdev set as expected

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agobgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
Lou Berger [Sun, 3 Feb 2019 15:23:06 +0000 (15:23 +0000)]
bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev

Signed-off-by: Lou Berger <lberger@labn.net>
5 years agoMerge pull request #3745 from chiragshah6/evpn_dev1
Russ White [Thu, 7 Feb 2019 19:36:46 +0000 (14:36 -0500)]
Merge pull request #3745 from chiragshah6/evpn_dev1

EVPN advertise svi ip as macip route changes via config command

5 years agolibs: remove useless static work_queue_free helper
Mark Stapp [Thu, 7 Feb 2019 18:54:50 +0000 (13:54 -0500)]
libs: remove useless static work_queue_free helper

Collapse the old static free function into the actual public
function that was using it (and the only user of it.)

Signed-off-by: Mark Stapp <mjs@voltanet.io>
5 years agoMerge pull request #3722 from donaldsharp/static_recursive
David Lamparter [Thu, 7 Feb 2019 18:22:29 +0000 (19:22 +0100)]
Merge pull request #3722 from donaldsharp/static_recursive

Zebra fixes

5 years agoMerge pull request #3744 from mjstapp/wq_deprecated_api
David Lamparter [Thu, 7 Feb 2019 17:52:27 +0000 (18:52 +0100)]
Merge pull request #3744 from mjstapp/wq_deprecated_api

libs: remove deprecated workqueue api

5 years agoMerge pull request #3748 from donaldsharp/sharp_nht_addition
David Lamparter [Thu, 7 Feb 2019 17:48:48 +0000 (18:48 +0100)]
Merge pull request #3748 from donaldsharp/sharp_nht_addition

Sharp cleanups and new cli

5 years agoMerge pull request #3749 from rtrlib/2019-02-07-bugfix-master
David Lamparter [Thu, 7 Feb 2019 17:44:04 +0000 (18:44 +0100)]
Merge pull request #3749 from rtrlib/2019-02-07-bugfix-master

RPKI bug fixes

5 years agobgpd: fix crash when trying to remove non-existing rpki cache
Marcel Röthke [Thu, 7 Feb 2019 16:16:19 +0000 (17:16 +0100)]
bgpd: fix crash when trying to remove non-existing rpki cache

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agobgpd: fix "show rpki cache-server" for ssh caches
Marcel Röthke [Thu, 7 Feb 2019 16:12:16 +0000 (17:12 +0100)]
bgpd: fix "show rpki cache-server" for ssh caches

Fix #3662

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
5 years agosharpd: Add 'sharp data nexthop' data dump
Donald Sharp [Thu, 7 Feb 2019 14:58:38 +0000 (09:58 -0500)]
sharpd: Add 'sharp data nexthop' data dump

Add some basic data dumping about what we have watched
from the vty/vtysh cli for nexthops.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add 'sharp data route" dump command
Donald Sharp [Thu, 7 Feb 2019 14:07:32 +0000 (09:07 -0500)]
sharpd: Add 'sharp data route" dump command

When you are using the install/remove routes command, the
output goes to a log file.  This command allows for ease
of dump of timing information from the vty or vtysh.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Move route global variables into the global data structure
Donald Sharp [Thu, 7 Feb 2019 13:57:40 +0000 (08:57 -0500)]
sharpd: Move route global variables into the global data structure

Clean up the route global variables into a global data structure.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Add start of global data structures
Donald Sharp [Thu, 7 Feb 2019 13:21:24 +0000 (08:21 -0500)]
sharpd: Add start of global data structures

We have a bit of a mess with globals in the sharp daemon.
Let's start formalizing it a bit.  Future commits will
take advantage of this, as that we need to have the ability
to start dumping stats about commands we have issued.

These changes will be useful for debugging and understanding
what is going on.

Signed-off-by: Donald sharp <sharpd@cumulusnetworks.com>
5 years agosharpd: Allow nhop tracking to specify connected
Donald Sharp [Thu, 7 Feb 2019 03:03:34 +0000 (03:03 +0000)]
sharpd: Allow nhop tracking to specify connected

Allow the sharp daemon to specify whether or not a watched
nexthop should be connected or not.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agolib: MTYPE_PREFIX_FLOWSPEC should not be exposed by memory.h
Donald Sharp [Thu, 7 Feb 2019 14:35:01 +0000 (09:35 -0500)]
lib: MTYPE_PREFIX_FLOWSPEC should not be exposed by memory.h

This MTYPE should be owned by prefix.c as a STATIC for the file.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
5 years agozebra: advertise svi ip as macip route changes
Chirag Shah [Tue, 5 Feb 2019 16:38:35 +0000 (08:38 -0800)]
zebra: advertise svi ip as macip route changes

In Asymmetric and symetric routing scenario in EVPN
where each VTEP pair having different set of addresses
for the SVIs.
This knob allows reachability (ping connectivity) of
SVI IPs and resolve ARP resoultion VTEPs across racks.

This knob should not be used when same SVI IPs configured
on VTEPs across racks or when advertise default gateway
is configured.

Ticket:CM-23782
Testing Done:
Bring up EVPN symmetric routing topology with different
SVI IPs on different VTEPs. Enable advertise svi ip
at each VTEP, remote VTEPs installs arp entry for
SVI IPs via EVPN type-2 route exchange.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>