]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
5 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

5 years agodoc: update build dependencies for debian systems
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>
5 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

5 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

5 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

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 agobgpd: Implement RFC8212
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>
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 agobfdd: fix CI warnings
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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
5 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>
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 agopbrd: Do not delete pmi until completion of rule delete.
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>
5 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>
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