Commit Graph

14871 Commits

Author SHA1 Message Date
Rafael Zalamena
0592db9630 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>
2019-02-14 14:17:29 -02:00
Rafael Zalamena
8bd859f6d3 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>
2019-02-14 14:17:29 -02:00
Rafael Zalamena
c0ef9a8a50 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>
2019-02-14 14:17:29 -02:00
Rafael Zalamena
aef131afc5 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>
2019-02-14 14:17:29 -02:00
Rafael Zalamena
09720d3189
Merge pull request #3799 from donaldsharp/show_debugging
Show debugging for bfd
2019-02-14 14:16:38 -02:00
Mark Stapp
1d0c39fbd8
Merge pull request #3791 from sworleys/RT-Braces-rtadv
zebra: Fix CLANG suggestion for braces on init of struct
2019-02-14 09:07:47 -05:00
Philippe Guibert
c8b9f5fb12 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>
2019-02-14 14:17:33 +01:00
Donald Sharp
a244e59954 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>
2019-02-13 23:24:05 -05:00
Donald Sharp
6038fe4584 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>
2019-02-13 23:23:48 -05:00
Mark Stapp
77a4dd9320
Merge pull request #3794 from donaldsharp/sharp_import_check
Sharp import check
2019-02-13 15:25:02 -05:00
Mark Stapp
c919c6b6ef
Merge pull request #3796 from donaldsharp/mpls_deletion_cleanup
zebra: Deletion of a lsp is not a failure event
2019-02-13 15:19:39 -05:00
Donald Sharp
48878e16cb build: non-recursive sharpd
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-02-13 15:03:30 -05:00
Donald Sharp
3fd385c685 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>
2019-02-13 12:49:59 -05:00
Donald Sharp
cfef27e56e
Merge pull request #3622 from mjstapp/fix_cpp_compile
libs, daemons: changes to permit c++ compilation
2019-02-13 12:47:23 -05:00
Donald Sharp
01490ba25d
Merge pull request #3753 from LabNConsulting/working/master/topotest-l3mdev=1
topotest: bgp_l3vpn_to_bgp_vrf: fix setting of TCP l3mdev
2019-02-13 09:32:43 -05:00
Donald Sharp
80d5ff338d 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>
2019-02-13 09:28:38 -05:00
Donald Sharp
b47dc61ade 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>
2019-02-13 09:28:38 -05:00
Donald Sharp
7a197b9269
Merge pull request #3778 from mjstapp/fix_dplane_update
zebra: use update semantics for routes consistently
2019-02-12 19:36:02 -05:00
Donald Sharp
38e9ccde2f 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>
2019-02-12 19:22:30 -05:00
Donald Sharp
6eb499b031 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>
2019-02-12 19:21:28 -05:00
Anuradha Karuppiah
355f3c1174 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>
2019-02-12 13:06:59 -08:00
Anuradha Karuppiah
27f28ccced 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>
2019-02-12 13:06:52 -08:00
Anuradha Karuppiah
d03239d09b 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>
2019-02-12 13:06:48 -08:00
Stephen Worley
844e918027 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>
2019-02-12 15:24:00 -05:00
David Lamparter
7e737f3d40
Merge pull request #3781 from donaldsharp/pbr_debug
pbrd: Add some missing debugs from external events
2019-02-12 18:07:14 +01:00
David Lamparter
c3b9c7ef68
Merge pull request #3783 from mjstapp/fix_bad_rm_decrement
bgpd: remove route-map decrement call on prefix-list
2019-02-12 18:06:07 +01:00
Mark Stapp
f503d522ec 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>
2019-02-12 10:10:19 -05:00
David Lamparter
8be328303c
Merge pull request #3773 from pguibert6WIND/bgp_delete_vrfid_unknown
bgpd: if vrf is unknown, bgp deletion not complete
2019-02-12 14:59:39 +01:00
David Lamparter
e0196a847f
Merge pull request #3771 from donaldsharp/eigrp_crash
Eigrp crash
2019-02-12 14:40:09 +01:00
David Lamparter
0fe29323f5
Merge pull request #3723 from slrz/zebra-rtadv-add-rfc8106-support
zebra: add support for IPv6 RA options for DNS configuration (RFC8106)
2019-02-12 14:30:00 +01:00
Donald Sharp
2f61710b73 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>
2019-02-12 08:24:58 -05:00
Martin Winter
b7d673c043
Merge pull request #3719 from liam-mcb/master
Revert "redhat: don't Requires initscript on systemd based distros"
2019-02-12 08:54:53 +07:00
David Lamparter
8ed561e1f1 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>
2019-02-11 22:34:12 -02:00
Renato Westphal
7f04943d6b 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>
2019-02-11 22:34:12 -02:00
Renato Westphal
343cd13e17 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>
2019-02-11 22:34:12 -02:00
Renato Westphal
c139972c0f 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>
2019-02-11 22:34:12 -02:00
Renato Westphal
5e2444690b 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>
2019-02-11 22:34:12 -02:00
Mark Stapp
8263d1d0d9 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>
2019-02-11 16:11:02 -05:00
Lars Seipel
110765e34a zebra: prefer DEFINE_MTYPE_STATIC for local memtypes
Signed-off-by: Lars Seipel <ls@slrz.net>
2019-02-11 21:46:06 +01:00
Donald Sharp
556f76e18f 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>
2019-02-11 12:54:31 -05:00
Donald Sharp
34afe42a80
Merge pull request #3774 from ton31337/fix/ospfd_instances_do_not_connect_to_default
vtysh: Fix typo in function name
2019-02-11 12:52:31 -05:00
David Lamparter
f8cd615bc4 lib: remove unnamed struct in qobj for C++
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11 15:49:49 -02:00
David Lamparter
f3dd45d108 lib: remove extra top-level ;
Signed-off-by: David Lamparter <equinox@diac24.net>
2019-02-11 15:49:49 -02:00
David Lamparter
c8a65463b2 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>
2019-02-11 15:49:49 -02:00
David Lamparter
be566e4e45 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>
2019-02-11 15:49:49 -02:00
David Lamparter
cd2d58525e 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>
2019-02-11 15:49:49 -02:00
Mark Stapp
5ad218a655 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>
2019-02-11 15:49:49 -02:00
Mark Stapp
95ce849b58 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>
2019-02-11 15:49:49 -02:00
Mark Stapp
d01b92fd75 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>
2019-02-11 15:49:49 -02:00
Donatas Abraitis
462ea14a8d vtysh: Fix typo in function name
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2019-02-11 18:38:35 +02:00