Commit Graph

17715 Commits

Author SHA1 Message Date
Mark Stapp
f2412b2d19 zebra: begin evpn neighbor install via dataplane
Initial work to move evpn neighbor programming to the dataplane
subsystem.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-23 10:09:38 -04:00
vdhingra
d4c7ac0105 zebra: Added a few more information in route_entry while dumping
re->nexthop_num and re->nexthop_active_num are calculated while rib
processing. Also It helps in encoding the ZAPI message.
It's good to dump these parameters also, when the system is in
abnormal state.

Signed-off-by: vishaldhingra<vdhingra@vmware.com>
2019-08-23 06:02:53 -07:00
Sri Mohana Singamsetty
401ba2adf9
Merge pull request #4864 from donaldsharp/nullzero
tests: Add a couple simple Null0 spelling tests
2019-08-22 16:53:41 -07:00
Renato Westphal
e38f2209b8
Merge pull request #4868 from mjstapp/fix_stream_resize_api
lib: remove deprecated stream_resize api
2019-08-22 19:39:59 -03:00
Renato Westphal
e782cca726 isisd: add support for IPv6 BFD peers
Make isisd create BFD sessions over IPv6 when IS-IS is configured
for IPv6 operation only.

When IS-IS is enabled for both IPv4 and IPv6 on a given interface,
prefer creating a BFD session over IPv6 to avoid having two BFD
sessions protecting the same IS-IS adjacency.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-22 12:52:44 -03:00
Marcel Röthke
8add171952 bgpd: automatically disable rpki when the last cache is removed instead of erroring out
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-22 17:39:00 +02:00
Marcel Röthke
dd783f3e1d bgpd: deprecate rpki initial sync timeout commands
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-22 17:31:24 +02:00
Marcel Röthke
6893064b42 bgpd: cleanup properly if rtr mgr cannot add a cache
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-22 17:31:09 +02:00
Marcel Röthke
a2ed7b2b18 bgpd: ensure rpki cache preference values are unique even if rtr mgr is not yet started
Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-22 17:30:51 +02:00
Mark Stapp
13afe82b5b lib: remove deprecated stream_resize api
Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-22 08:52:25 -04:00
Ashish Pant
bca7983774 tests: Enhance execution logs in topojson
Signed-off-by: Ashish Pant <ashish12pant@gmail.com>

1. Add check if show running output is corrupted as frr-reload does
   not return cause of failure, just the error codes.
2. Change logger level to debug for some extra information.
3. Modify logger messages for more clear information.
4. Print configuration commands to console instead of show running
5. Print show command output to console.
6. Move show running output within flag show_router_config.
7. Add retry decorator for retyring show commands.
2019-08-22 16:24:45 +05:30
Donald Sharp
ad4c7e8d4e
Merge pull request #4778 from mjstapp/dplane_macs
zebra: use dataplane for evpn macs
2019-08-21 20:26:29 -04:00
Russ White
f197ecb35f
Merge pull request #4857 from dslicenc/bgpd-clear-afi-safi
bgpd: make clear bgp * clear all peers in all afi/safis
2019-08-21 14:53:32 -04:00
Donald Sharp
a7e52bd7b6 tests: Add a couple simple Null0 spelling tests
Add a bit of code to test different spelling of Null0 routes.
This was broken at some point in the past and with recent
changes is working again, but it would be nice to
know when this breaks again.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-21 11:44:48 -04:00
Renato Westphal
3923b6e309 lib: fix a couple more doc comments
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 11:41:14 -03:00
Renato Westphal
ef231ac76c lib: switch str2prefix_ipv4() to use inet_pton()
This is the second part of commit 8d92004979, which converted
only one of the two calls to inet_aton().

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 11:41:10 -03:00
Renato Westphal
363be4dd90 isisd: unify isis_nexthop and isis_nexthop6 into a single struct
This unification allows us to write code that works for both IPv4 and
IPv6, reducing duplication.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 01:04:03 -03:00
Renato Westphal
9e1194c20c isisd: reuse the nexthop lookup functions to avoid code duplication
Nothing special here.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 01:03:51 -03:00
Renato Westphal
1e4d64aa6f isisd: remove unnecessary null checks
These null checks don't make sense because a) these two functions
are never called with a NULL IP address and b) the same pointers are
dereferenced later without any protection. Remove these NULL checks
to make the code less confusing.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 00:57:17 -03:00
Renato Westphal
6fa6324d4b isisd: remove unused struct fields
These fields were introduced by commit e38e0df01a, but they were
never put to any use. Remove them.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 00:57:17 -03:00
Renato Westphal
681b22affa lib: fix doc comment of the "cli_show_end" northbound callback
The 'show_defaults' parameter is present on the "cli_show" callback
only.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 00:53:00 -03:00
Renato Westphal
20054cb4b1 lib: fix uint32_t overflow in a couple of CLI commands
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 00:53:00 -03:00
Renato Westphal
6a2b0d9a7a lib: don't ignore stream errors in some zapi decode functions
Some other ZAPI decode functions still use void return values and
can't propagate stream errors to their callers. They need to be fixed
as well in the future.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-21 00:53:00 -03:00
Mark Stapp
9316c82336
Merge pull request #4835 from vishaldhingra/ipv4_linklocal
zebra : redistribute IPV4 link local connected routes consistently.
2019-08-20 15:30:19 -04:00
Sri Mohana Singamsetty
bc90819210
Merge pull request #4858 from donaldsharp/bgp_default
bgpd: Remove declarations of unused functions
2019-08-20 10:29:53 -07:00
Sri Mohana Singamsetty
d1c6230236
Merge pull request #4846 from vivek-cumulus/rfc-5549-gua-fix-ra
Fix nexthop reg and RA enable for IPv4 route exchange using GUA IPv6 peering
2019-08-20 09:07:54 -07:00
Donald Sharp
7299243511 bgpd: Remove declarations of unused functions
Code inspection found some functions being declared
in a .h file but FRR does not have the functions
implemented.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-20 09:59:39 -04:00
Don Slice
dc91261567 bgpd: make clear bgp * clear all peers in all afi/safis
Problem reported that "clear bgp *" only cleared ipv6 peers.
Changed the logic to clear all afi/safis of all peers in
that case.  Also improved the operation of clearing
individual afi/safi using soft/in/out to do the right thing.

Ticket: CM-25887
Signed-off-by: Don Slice <dslice@cumulusnetworks.com>
2019-08-20 13:50:58 +00:00
Stephen Worley
3c6e0bd472 lib: Sort zapi_nexthops on the encode
Sort nexthops before we push them to zebra. This offloads
the nexthop sorting zebra is doing onto the upper level protocols
so that when it gets to zebra and we construct a group, it just has
to append them to the tail for every nexthop.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-08-19 15:56:45 -04:00
Stephen Worley
8c15fa95a8 lib: Add tail check before nexthop insertion
Add a tail check to see if we can just put the nexthop
at the end of the already sorted list before iteration.

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-08-19 13:55:50 -04:00
Donatas Abraitis
8d3c0d341a
Merge pull request #4848 from donaldsharp/spelling_errors
debian packaging issues found
2019-08-19 19:30:23 +03:00
Stephen Worley
b43434ad8e zebra: Append rparent labels when resolving nexthop
When resolving a nexthop, append its labels to the one its
resolving to along with the labels that may already be present there.

Before we were ignoring labels if the resolving level was greater than
two.

Before:
```
S>  2.2.2.2/32 [1/0] via 7.7.7.7 (recursive), label 2222, 00:00:07
  *                    via 7.7.7.7, dummy1 onlink, label 1111, 00:00:07
S>  3.3.3.3/32 [1/0] via 2.2.2.2 (recursive), label 3333, 00:00:04
  *                    via 7.7.7.7, dummy1 onlink, label 1111, 00:00:04
K>* 7.7.7.7/32 [0/0] is directly connected, dummy1, label 1111, 00:00:17
C>* 192.168.122.0/24 is directly connected, ens3, 00:00:17
K>* 192.168.122.1/32 [0/100] is directly connected, ens3, 00:00:17
ubuntu_nh#
```

This patch:
```
S>  2.2.2.2/32 [1/0] via 7.7.7.7 (recursive), label 2222, 00:00:04
  *                    via 7.7.7.7, dummy1 onlink, label 1111/2222, 00:00:04
S>  3.3.3.3/32 [1/0] via 2.2.2.2 (recursive), label 3333, 00:00:02
  *                    via 7.7.7.7, dummy1 onlink, label 1111/2222/3333, 00:00:02
K>* 7.7.7.7/32 [0/0] is directly connected, dummy1, label 1111, 00:00:11
C>* 192.168.122.0/24 is directly connected, ens3, 00:00:11
K>* 192.168.122.1/32 [0/100] is directly connected, ens3, 00:00:11
ubuntu_nh#
```

Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
2019-08-19 12:28:45 -04:00
Donald Sharp
e671f9fb1f pbrd, sharpd, staticd: Add some color to sample configuration files
The sample configuration files for pbrd, sharpd and staticd
where all the same.  Add some bit of color to help new people
get rolling on these three daemons.

Signed-off-by: Donald Sharp <sharpd@cumulusnetwork.com>
2019-08-19 10:36:53 -04:00
Donald Sharp
f79f7a7bb2 *: Fix spelling errors pointed out by debian packaging
Debian packaging when run finds a bunch of spelling errors:

I: frr: spelling-error-in-binary usr/bin/vtysh occurences occurrences
I: frr: spelling-error-in-binary usr/lib/frr/bfdd Amount of times Number of times
I: frr: spelling-error-in-binary usr/lib/frr/bgpd occurences occurrences
I: frr: spelling-error-in-binary usr/lib/frr/bgpd recieved received
I: frr: spelling-error-in-binary usr/lib/frr/isisd betweeen between
I: frr: spelling-error-in-binary usr/lib/frr/ospf6d Infomation Information
I: frr: spelling-error-in-binary usr/lib/frr/ospfd missmatch mismatch
I: frr: spelling-error-in-binary usr/lib/frr/pimd bootsrap bootstrap
I: frr: spelling-error-in-binary usr/lib/frr/pimd Unknwon Unknown
I: frr: spelling-error-in-binary usr/lib/frr/zebra Requsted Requested
I: frr: spelling-error-in-binary usr/lib/frr/zebra uknown unknown
I: frr: spelling-error-in-binary usr/lib/x86_64-linux-gnu/frr/libfrr.so.0.0.0 overriden overridden

This commit fixes all of them except the bgp `recieved` issue due to
it being part of json output.  That one will need to go through
a deprecation cycle.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-19 10:36:53 -04:00
Donald Sharp
604321440e
Merge pull request #4841 from rtrlib/2019-08-16-bugfix-master
bgpd: rpki fixes (master)
2019-08-19 09:57:18 -04:00
Mark Stapp
cdfd5e2797
Merge pull request #4842 from opensourcerouting/fix-isis-bfd-display
isisd: fix display of the "isis bfd" command
2019-08-19 08:17:01 -04:00
vivek
3d0b43d7c5 bgpd: Ensure correct checks for EVPN route import
In a situation where a VRF has configured route targets for importing
EVPN routes, this configuration may exist prior to the VRF being
ready to have EVPN routes installed into it - e.g., still missing
the L3VNI configuration or associated interface information. Ensure
that this is taken into account during EVPN route import and unimport.
Without this fix, EVPN routes would end up being prematurely imported
into the VRF routing table and consequently installed as inactive
(because the nexthop information would be incorrect when BGP informs
zebra).

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
2019-08-18 23:07:59 -07:00
vivek
5408e68e24 bgpd: Display peer info in NHT output
When a BGP next hop tracking (NHT) entry is created for a peer,
display it in the corresponding "show" command output.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-18 22:21:38 -07:00
vivek
e2d3a90954 bgpd: Fix nexthop reg for IPv4 route exchange using GUA IPv6 peering
In the case of IPv4 route exchange using GUA IPv6 peering, the route install
into the FIB involves mapping the immediate next hop to an IPv4 link-local
address and installing neighbor entries for this next hop address. To
accomplish the latter, IPv6 Router Advertisements are exchanged (the next hop
or peer must also have this enabled) and the RAs are dynamically initiated
based on next hop resolution.

However, in the case of a passive connection where the local system has not
initiated anything, no NHT entry is created for the peer, hence RAs were not
getting triggered. Address this by ensuring that a NHT entry is created even
in this situation. This is done at the time the connection becomes established
because the code has other assumptions that a NHT entry will be present only
for the "configured" peer. The API to create the entry ensures there are
no duplicates.

Signed-off-by: Vivek Venkatraman <vivek@cumulusnetworks.com>
Reviewed-by:   Donald Sharp <sharpd@cumulusnetworks.com>
2019-08-18 22:12:06 -07:00
Juergen Werner
fd267f0808 zebra: Correct /32 addr del with broadcast set
Since we are now away from the dual use of the destination field, there
is no need to single out /32 addresses as broadcast. This was bugged
anyway, since the same /32 criteria was used for IPv6 addresses as well,
when `connected_check_ptp` is called in `connected_delete_ipv6`.

Fixes: 3053
Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
2019-08-18 18:59:45 +02:00
Juergen Werner
0f3af7386e zebra: Do not use connection dest for bcast
The `destination` field of the connection structure was used to store
the broadcast address, if the connection was not p2p. This multipurpose
is not very evident and the benefits over calculating the bcast address
on the fly minimal.

Signed-off-by: Juergen Werner <juergen@opensourcerouting.org>
2019-08-18 18:54:46 +02:00
Donald Sharp
f067bdf8e2
Merge pull request #4832 from ddutt/master
Clean up zebra's show interface display
2019-08-17 09:00:47 -04:00
Renato Westphal
def117f732 isisd: fix display of the "isis bfd" command
We need to indent this command using one leading whitespace otherwise
vtysh will have problems to display it appropriately.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2019-08-16 18:00:58 -03:00
Marcel Röthke
24b7eb485d bgpd: fix bgp_table range lookup
In case the topmost node has a larger prefix length than the lookup
prefix it never matches even if it was still lower than maxlen

This also alters a test case to check for this bug.

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-16 16:42:11 +02:00
Marcel Röthke
798df969aa bgpd: remove initial sync timeout in rpki startup code
The initial sync timeout breaks config load and is not necessary anyway.

Fix #4827

Signed-off-by: Marcel Röthke <marcel.roethke@haw-hamburg.de>
2019-08-16 16:39:03 +02:00
Quentin Young
9a48b3afad
Merge pull request #4837 from mjstapp/fix_ospf_redist_debug
ospfd: add redist message detail to debug
2019-08-14 16:57:01 -04:00
Dinesh Dutt
d7325ee773 bgpd: Display the imported route information for EVPN routes
For IPv4/v6 unicast routes that have been imported from EVPN Prefix
routes, display the information about where the route has been imported
from allowing for easy tracing of how a FIB/RIB entry got populated.

Signed-off-by: Dinesh G Dutt <5016467+ddutt@users.noreply.github.com>
2019-08-14 19:27:56 +00:00
Mark Stapp
ae4080c5a2 ospfd: add redist message detail to debug
Add the specific message being processed when ospfd receives
a redistribution from zebra.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2019-08-14 13:45:14 -04:00
Quentin Young
079412c7aa
Merge pull request #4836 from mruprich/python-3.8
build: add check for python-3.8
2019-08-14 13:06:24 -04:00
vdhingra
79becec8ac zebra : zebra redistributing IPV4 link local Addresses inconsistently.
Create an interface with IP4 link local address 169.254.0.131/25.
In BGP enable the redistribute connected. Now Zebra will not send
the route corresponding to IPV4 link local address. Now made this
interface down and up. Zebra sends the route to BGP.
Zebra should not send this route to BGP.
This Fix would make the behaviour consistent and would not send the
routes corresponding to IPV4 Link local addresses.

Signed-off-by: vishaldhingra <vdhingra@vmware.com>
2019-08-14 06:44:22 -07:00