Commit Graph

19881 Commits

Author SHA1 Message Date
Julien D
94b21e3c0d doc: add RFC to VRRP
Add the VRRP bloc + RFC associated

Signed-off-by: barajus <julien.dhaille@gmail.com>
2020-05-11 21:46:20 +02:00
Renato Westphal
c78dec5385
Merge pull request #6381 from qlyoung/clean-grpc
lib: remove unnecessary rpc request in grpc
2020-05-11 16:36:00 -03:00
Quentin Young
f6239dc799 lib: remove unnecessary rpc request in grpc
Bit of leftover copypaste code there.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-05-11 12:52:17 -04:00
Donatas Abraitis
420752a9b6
Merge pull request #6379 from donaldsharp/ip_as_path_removal_really
Ip as path removal really
2020-05-11 17:22:19 +03:00
Donald Sharp
9b6fddd415 doc: Fix doc to reflect reality on the ground
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-11 08:46:34 -04:00
Donald Sharp
0feba3716e bgpd: really remove the no ip as-path... command
We had already removed the `ip as-path..` command
to have `bgp as-path` but for some reason a `no ip as-path..`
command ALIAS was still around.  Kill with extreme prejudice.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-11 08:45:11 -04:00
Donald Sharp
f3a9e1ab65 *: Update version string
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-11 08:04:15 -04:00
Quentin Young
6677126402
Merge pull request #6374 from opensourcerouting/grpc-undue-warning
lib: fix undue warning during gRPC module initialization
2020-05-11 00:24:54 -04:00
Donatas Abraitis
ec76a1d174 bgpd: Use default AFI_IP6/SAFI_UNICAST when displaying statistics
Without specifying a default afi/safi we get a segfault:

```
(gdb) frame 4
bgp_table_stats (..., afi=32724, safi=SAFI_UNICAST, ...
11349		if (!bgp->rib[afi][safi]) {
(gdb)
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-09 21:33:51 +03:00
Ameya Dharkar
10f70510b9 bgpd: EVPN RT-2 advertised with 2 labels for prefix-routes-only config
L3VNI is configured with "prefix-routes-only" flag. Even in this case,
intermittently, we observed that local EVPN MACIP routes are installed and
advertised with 2 labels and 2 export RTs.

This is a sequencing issue. Consider following case where L2VNI 200 and L3VNI
1000 are configured for tenant vrf vrf-blue.

Bug is observed for following sequence of events:
1. vrf-blue BGP instance is created.
2. L2VNI is created in bgp for vni 200. It is linked to the tenant vrf vrf-blue
in function bgpevpn_link_to_l3vni.
Following code sets "VNI_FLAG_USE_TWO_LABELS" flag for vni 200 as L3VNI is not
yet attached to vrf-blue BGP instance.

/* check if we are advertising two labels for this vpn */
if (!CHECK_FLAG(bgp_vrf->vrf_flags, BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY))
	SET_FLAG(vpn->flags, VNI_FLAG_USE_TWO_LABELS);

2. Now L3VNI is attached to vrf-blue BGP instance. In this case, we set
BGP_VRF_L3VNI_PREFIX_ROUTES_ONLY flag for vrf-blue but we do not clear
VNI_FLAG_USE_TWO_LABELS flag set on the corresponding L2VNIs.

This fix resolves following 2 issues observed above.
1. When L2VNI is created in BGP, flag VNI_FLAG_USE_TWO_LABELS should not be set
for this VNI if BGP vrf is not attached to any L3VNI.
2. When L3VNI is attached to the BGP vrf, set "VNI_FLAG_USE_TWO_LABELS" flag
if "prefix-routes-only" is not for the vrf.

UT cases:
1. Flap "prefix-routes-only" config for a vrf.
2. Test following triggers for vrfs with and without "prefix-routes-only"
   - Flap L2VNI from kernel.
   - Flap L3VNI from kernel.

Signed-off-by: Ameya Dharkar <adharkar@vmware.com>
2020-05-08 21:10:10 -07:00
Renato Westphal
69ec583289 lib: fix undue warning during gRPC module initialization
This warning only shows up when a daemon is started with --log=stdout.
Fix it.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
2020-05-09 00:50:45 -03:00
Renato Westphal
0dca7bb209
Merge pull request #6368 from qlyoung/async-grpc
Async grpc
2020-05-09 00:48:52 -03:00
Quentin Young
ecf9fb30b7 lib: convert GRPC plugin to async
Synchronous GRPC services are called from arbitrary threads. This makes
access to anything outside the GRPC module unsafe. We need to convert
the plugin to use the async model that allows us to control our own
threads.

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
2020-05-08 15:50:11 -04:00
Chirag Shah
0edcb505a3 lib: use frr_pthread to spawn grpc pthread
start grpc thread with frr_pthread library
callbacks to integrate with rcu infrastructure.

If a thread is created using native pthread callbacks
and if zlog is used then it leads to crash.

Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
2020-05-08 15:50:11 -04:00
Donatas Abraitis
555fc63c75
Merge pull request #6348 from dslicenc/frr-reload-bfd
tools: fix frr traceback on bgp neighbor bfd deletion
2020-05-08 18:56:01 +03:00
Mark Stapp
a6f1ad43f0
Merge pull request #6362 from donaldsharp/typedef_i_hatez_it
Typedef replacements
2020-05-08 09:44:58 -04:00
Donald Sharp
91e6f25bc0 zebra: remove typedef rib_update_event_t from system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:10:49 -04:00
Donald Sharp
630d596249 zebra: Remove typedef rib_table_info_t from system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:10:49 -04:00
Donald Sharp
4d5647d076 zebra: Remove typedef rib_tables_iter_state from system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:10:49 -04:00
Donald Sharp
f921557186 zebra: Remove typedef rnh_type_t from system
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:10:49 -04:00
Donald Sharp
67ceb40869 zebra: Remove typedef netlink_route_info_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:10:49 -04:00
Donald Sharp
7cf190690c zebra: Remove the typedef netlink_nh_info_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
c4528712b0 zebra: Remove typedef of mpls_srgb_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
57dd86429f zebra: Remove enum around ipv6_nd_suppress_ra_status
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
768e40bde9 zebra: Remvoe typedef for zfpm_glob_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
a78c2b98f7 zebra: Remove typedef zfpm_msg_format_e
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
1d6a3ee83c zebra: Remove the typedef for zfrpm_state_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
eeaf257b79 zebra: Remove typedef of zfpm_stats_t
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donald Sharp
332cba05a3 zebra: Remove typedef around zfpm_rnodes_iter
Typedef's are not used in our system remove.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-08 08:08:04 -04:00
Donatas Abraitis
bcf7b9e1c9
Merge pull request #6363 from donaldsharp/no_no_no
bgpd: `bgp bestpath bandwidth` should not be a legal command
2020-05-08 10:12:26 +03:00
Mark Stapp
faad472899
Merge pull request #6365 from donaldsharp/bsd_v6_Null_bs
zebra: Add code to install v6 blackhole routes on *bsd
2020-05-07 13:12:55 -04:00
Donald Sharp
381477e8a6 zebra: Add code to install v6 blackhole routes on *bsd
This code was just missing.  Take the few minutes and
get it done.

!
ip route 4.5.6.7/32 Null0
ipv6 route 4::5/128 Null0
!
$ netstat -rn
Routing tables

Internet:
Destination        Gateway            Flags     Netif Expire
default            192.168.122.1      UGS      vtnet0
4.5.6.7/32         127.0.0.1          UG1B        lo0
127.0.0.1          link#2             UH          lo0
192.168.122.0/24   link#1             U        vtnet0
192.168.122.40     link#1             UHS         lo0

Internet6:
Destination                       Gateway                       Flags     Netif Expire
::/96                             ::1                           UGRS        lo0
::1                               link#2                        UH          lo0
::ffff:0.0.0.0/96                 ::1                           UGRS        lo0
4::5/128                          ::1                           UG1B        lo0
fe80::/10                         ::1                           UGRS        lo0
fe80::%vtnet0/64                  link#1                        U        vtnet0
fe80::5054:ff:fe5a:e705%vtnet0    link#1                        UHS         lo0
fe80::%lo0/64                     link#2                        U           lo0
fe80::1%lo0                       link#2                        UHS         lo0
ff02::/16                         ::1                           UGRS        lo0
$

$ uname -a
FreeBSD donna 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC  amd64
$

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-07 11:24:05 -04:00
Donald Sharp
ad36d216b1 bgpd: bgp bestpath bandwidth should not be a legal command
The `bgp bestpath bandwidth` command should not be a legal
command.  Pull out the `no` form to allow this.  Allow
`no bgp bestpath bandwidth` to work as we would expect.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-07 10:03:31 -04:00
Donald Sharp
b4b1d1ebdb
Merge pull request #6356 from ton31337/fix/aggregator_0_ignore
bgpd: Ignore aggregator attribute if it's malformed (0.0.0.0)
2020-05-06 19:43:21 -04:00
Jafar Al-Gharaibeh
a9b763e381
Merge pull request #6358 from donaldsharp/zebra_onlink
zebra: Loosen ONLINK restrictions a tiny bit
2020-05-06 15:25:48 -05:00
Mark Stapp
03ab61c488
Merge pull request #6359 from sworleys/NHG-No-IPv4-IPv6
zebra: abstract 5549 check into a function
2020-05-06 15:42:52 -04:00
Renato Westphal
57ecb94d17
Merge pull request #6357 from mjstapp/fix_ldp_topo1_how
tests: remove unused ref files from ldp topotest
2020-05-06 12:23:36 -03:00
Renato Westphal
ee02198a38
Merge pull request #6352 from volta-networks/fix_ldp_dscp
ldpd: LDP does not always send traffic with correct DSCP value.
2020-05-06 12:23:01 -03:00
Donald Sharp
5cfaa2d92b zebra: Loosen ONLINK restrictions a tiny bit
Loosen the ONLINK restrictions such that when an upper
level protocol sends us a nexthop with an ONLINK attribute
just ensure that interface is up and usable.  ONLINK effectively
means we know what we are doing to the kernel.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
2020-05-06 10:15:41 -04:00
Karen Schoener
def23eb395 ldpd: LDP does not always send traffic with correct DSCP value.
Adding code so that the LDP neighbor that does not initiate the
TCP connection also sets the DSCP (via setsocketopt).

Signed-off-by: Karen Schoener <karen@voltanet.io>
2020-05-06 09:46:07 -04:00
Mark Stapp
fa6e939421 tests: remove unused ref files from ldp topotest
Remove a couple of a couple of mis-named reference output files
from the ldp-topo1 suite.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
2020-05-06 09:31:21 -04:00
Donatas Abraitis
cbfc39df11 bgpd: Ignore aggregator attribute if it's malformed (0.0.0.0)
This is not the attribute involved in path selection and by rfc7606 it should
be just ignored.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-06 12:55:55 +03:00
Donatas Abraitis
6ded3e181b bgpd: Use slightly modified version of error message if AS path contains 0
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-06 12:55:13 +03:00
Quentin Young
6f2f2e6172
Merge pull request #6347 from opensourcerouting/llvm-callgraph
tools: LLVM-based call graphs
2020-05-05 17:40:21 -04:00
Quentin Young
794c2b2d73
Merge pull request #6350 from pureport/fix/bgp_double_community_free
bgpd: Check to ensure community attributes exist before freeing them
2020-05-05 17:39:28 -04:00
Josh Cox
2c15754ea3 bgpd: Check to ensure community attributes exist before freeing them
Community attributes might have been removed by an inbound route map, so we
should check to ensure they still exist before trying to free them.
This fixes a segfault described in issue #6345.

Signed-off-by: Josh Cox <josh.cox@pureport.com>
2020-05-05 15:59:38 -04:00
David Lamparter
d973526821
Merge pull request #6349 from qlyoung/hook-cpp-compat 2020-05-05 21:42:29 +02:00
Donatas Abraitis
d55811ccb2 bgpd: Set a proper SAFI for labaled-unicast when looking for scount
The problem is that peer_af_array returns NULL when SAFI is changed to
unicast. We use unicast table, but peer is created and activated under
labeled-unicast, hence we should lookup with a proper SAFI id.

Without this patch peer_af_find() returns NULL and we can't show
PfxSnt in `show bgp summary`.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2020-05-05 22:27:01 +03:00
Rafael Zalamena
5f66e9a070 doc: document new FPM next hop group commands
Let the user know it is possible to disable next hop groups netlink feature.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-05 16:22:07 -03:00
Rafael Zalamena
b55ab92abd fpm: add toggle to enable/disable next hop groups
If you haven't migrated your FPM server to use next hop groups, it is
possible that you want to disable this feature. This commit implements
a toggle to enable/disable next hop groups usage (even if your Linux
kernel is not using it).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
2020-05-05 16:22:07 -03:00