]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agoMerge pull request #7047 from qlyoung/fix-zlog-target-null-deref base_7.5
Mark Stapp [Tue, 8 Sep 2020 19:25:08 +0000 (15:25 -0400)]
Merge pull request #7047 from qlyoung/fix-zlog-target-null-deref

lib: fix possible null dereference in zlog

4 years agoMerge pull request #7031 from dslicenc/global-bgp-update-delay
Donatas Abraitis [Tue, 8 Sep 2020 18:43:51 +0000 (21:43 +0300)]
Merge pull request #7031 from dslicenc/global-bgp-update-delay

Global bgp update delay

4 years agoMerge pull request #7032 from qlyoung/devdocs-libyang-hashtable
Mark Stapp [Tue, 8 Sep 2020 17:03:16 +0000 (13:03 -0400)]
Merge pull request #7032 from qlyoung/devdocs-libyang-hashtable

Dev docs update for libyang, hash table invariants

4 years agodoc: update libyang blurb for 1.x 7032/head
Quentin Young [Tue, 1 Sep 2020 18:10:20 +0000 (14:10 -0400)]
doc: update libyang blurb for 1.x

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agodoc: add notes about hash table invariants
Quentin Young [Tue, 1 Sep 2020 18:10:06 +0000 (14:10 -0400)]
doc: add notes about hash table invariants

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x
Donald Sharp [Tue, 8 Sep 2020 16:06:10 +0000 (12:06 -0400)]
Merge pull request #6376 from opensourcerouting/bump-libyang-req-version-1.x

build, yang: bump libyang minimum required version to 1.0.184

4 years agolib: fix possible null dereference in zlog 7047/head
Quentin Young [Wed, 2 Sep 2020 21:24:54 +0000 (17:24 -0400)]
lib: fix possible null dereference in zlog

In some cases one or both of the zlog targets in use here can be null,
we need to check for that.

Interestingly it appears we don't crash even when this is the case.
Undefined behavior ftw

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6969 from ton31337/feature/autoshutdown_if_rtt_higher_than_specified
Russ White [Tue, 8 Sep 2020 15:28:40 +0000 (11:28 -0400)]
Merge pull request #6969 from ton31337/feature/autoshutdown_if_rtt_higher_than_specified

bgpd: Add `neighbor <neigh> shutdown rtt` command

4 years agotopotests: Add test for bgp update-delay configuration 7031/head
Don slice [Fri, 28 Aug 2020 19:53:03 +0000 (15:53 -0400)]
topotests: Add test for bgp update-delay configuration

Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agobgpd: add global config for update-delay
Don slice [Wed, 5 Aug 2020 19:08:17 +0000 (19:08 +0000)]
bgpd: add global config for update-delay

Enhancement to update-delay configuration to allow setting globally
rather than per-instance.  Setting the update-delay is allowed either
per-vrf or globally, but not both at the same time.

Ticket: CM-31096
Signed-off-by: Don Slice <dslice@nvidia.com>
4 years agodoc: Add `neighbor <x.x.x.x.> shutdown rtt <milliseconds>` 6969/head
Donatas Abraitis [Tue, 18 Aug 2020 20:08:16 +0000 (23:08 +0300)]
doc: Add `neighbor <x.x.x.x.> shutdown rtt <milliseconds>`

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Add `neighbor <neigh> shutdown rtt` command
Donatas Abraitis [Sat, 25 Jul 2020 06:10:56 +0000 (09:10 +0300)]
bgpd: Add `neighbor <neigh> shutdown rtt` command

This would be useful in cases with lots of peers and shutdown them
automatically if RTT goes above the specified limit.

A host with 512 or more IPv6 addresses has a higher latency due to
ipv6_addr_label(). This method tries to pick the best candidate address
fo outgoing connection and literally increases processing latency.

```
Samples: 28  of event 'cycles', Event count (approx.): 22131542
  Children      Self  Command  Shared Object      Symbol
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] entry_SYSCALL_64_fastpath
  +  100.00%     0.00%  ping6    [unknown]          [.] 0x0df0ad0b8047022a
  +  100.00%     0.00%  ping6    libc-2.17.so       [.] __sendto_nocancel
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sys_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] SYSC_sendto
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] sock_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] inet_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] rawv6_sendmsg
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_flow
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_dst_lookup_tail
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ip6_route_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] __ipv6_dev_get_saddr
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_get_saddr_eval
  +  100.00%     0.00%  ping6    [kernel.kallsyms]  [k] ipv6_addr_label
  +  100.00%   100.00%  ping6    [kernel.kallsyms]  [k] __ipv6_addr_label
  +    0.00%     0.00%  ping6    [kernel.kallsyms]  [k] schedule
```

This is how it works:

```
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
9
~# tc qdisc add dev eth1 root netem delay 120ms
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
89
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".estimatedRttInMsecs'
null
~# vtysh -c 'show bgp neigh 192.168.0.2 json' | jq '."192.168.0.2".lastResetDueTo'
"Admin. shutdown"
```

Warning message:
bgpd[14807]: 192.168.0.2 shutdown due to high round-trip-time (200ms > 150ms)

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Update RTT on KEEPALIVE message
Donatas Abraitis [Sat, 25 Jul 2020 06:10:15 +0000 (09:10 +0300)]
bgpd: Update RTT on KEEPALIVE message

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agoMerge pull request #6982 from achernavin22/ospf_nssa_after_redist
Santosh P K [Mon, 7 Sep 2020 12:54:41 +0000 (18:24 +0530)]
Merge pull request #6982 from achernavin22/ospf_nssa_after_redist

ospfd: install Type-7 when NSSA enabled after redistribution

4 years agoMerge pull request #7040 from qlyoung/fix-evpn-attribute-hash-error
Donatas Abraitis [Sat, 5 Sep 2020 12:47:38 +0000 (15:47 +0300)]
Merge pull request #7040 from qlyoung/fix-evpn-attribute-hash-error

bgpd: modify attr fields before hash insert

4 years agoMerge pull request #7037 from volta-networks/fix_traps_bgp
Donatas Abraitis [Sat, 5 Sep 2020 05:28:19 +0000 (08:28 +0300)]
Merge pull request #7037 from volta-networks/fix_traps_bgp

Fix bgpBackwardTransition traps

4 years agoMerge pull request #7051 from donaldsharp/ospf_test_speedup
Donatas Abraitis [Sat, 5 Sep 2020 05:17:31 +0000 (08:17 +0300)]
Merge pull request #7051 from donaldsharp/ospf_test_speedup

Ospf test speedup

4 years agoMerge pull request #7054 from qlyoung/fix-bgp-mplsvpn-nlri-missing-length-checks
Donatas Abraitis [Sat, 5 Sep 2020 05:17:15 +0000 (08:17 +0300)]
Merge pull request #7054 from qlyoung/fix-bgp-mplsvpn-nlri-missing-length-checks

bgpd: fix mplsvpn nlri garbage heap read

4 years agoMerge pull request #7046 from qlyoung/fix-various-integer-issues
Renato Westphal [Sat, 5 Sep 2020 01:33:48 +0000 (22:33 -0300)]
Merge pull request #7046 from qlyoung/fix-various-integer-issues

Fix various integer signedness / overflow issues

4 years agoMerge pull request #7055 from qlyoung/fix-bgp-localpref-overflow
Renato Westphal [Fri, 4 Sep 2020 21:56:46 +0000 (18:56 -0300)]
Merge pull request #7055 from qlyoung/fix-bgp-localpref-overflow

bgpd: fix asserting read of localpref

4 years agoMerge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4
Renato Westphal [Fri, 4 Sep 2020 21:44:56 +0000 (18:44 -0300)]
Merge pull request #6934 from Niral-Networks/niral_dev_vrf_isis_core_pr4

isisd, yang, doc : Support for different VRF in ISIS.

4 years agoMerge pull request #6971 from volta-networks/fix_ldp_no_config
Renato Westphal [Fri, 4 Sep 2020 19:39:16 +0000 (16:39 -0300)]
Merge pull request #6971 from volta-networks/fix_ldp_no_config

ldpd: Fix issue when starting up LDP with no configuration.

4 years agoMerge pull request #6589 from NaveenThanikachalam/gr_fixes
Donatas Abraitis [Fri, 4 Sep 2020 15:39:26 +0000 (18:39 +0300)]
Merge pull request #6589 from NaveenThanikachalam/gr_fixes

bgpd: GR fixes

4 years agoldpd: Fix issue when starting up LDP with no configuration. 6971/head
lynne [Wed, 12 Aug 2020 23:15:24 +0000 (19:15 -0400)]
ldpd: Fix issue when starting up LDP with no configuration.

LDP would mark all routes as learned on a non-ldp interface.  Then
when LDP was configured the labels were not updated correctly.  This
commit fixes issues 6841 and 6842.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
4 years agoMerge pull request #6826 from pjdruddy/bgp-auth-vrf-frr
Donatas Abraitis [Fri, 4 Sep 2020 13:03:47 +0000 (16:03 +0300)]
Merge pull request #6826 from pjdruddy/bgp-auth-vrf-frr

Bgp auth vrf frr

4 years agoMerge pull request #7053 from mjstapp/fix_ospf6_intf_sa
Donald Sharp [Fri, 4 Sep 2020 10:47:07 +0000 (06:47 -0400)]
Merge pull request #7053 from mjstapp/fix_ospf6_intf_sa

ospf6d: fix SA warning

4 years agoMerge pull request #7052 from mjstapp/fix_stream_get_data
Donald Sharp [Fri, 4 Sep 2020 00:45:05 +0000 (20:45 -0400)]
Merge pull request #7052 from mjstapp/fix_stream_get_data

lib: remove unused stream_get_data api

4 years agoMerge pull request #6891 from opensourcerouting/feature/sr-te-bgpd
Donald Sharp [Thu, 3 Sep 2020 18:52:30 +0000 (14:52 -0400)]
Merge pull request #6891 from opensourcerouting/feature/sr-te-bgpd

bgpd: Add support for SR-TE Policies in route-maps

4 years agobgpd: use stream_rewind_getp() to remove overflow 7046/head
Quentin Young [Wed, 2 Sep 2020 20:44:13 +0000 (16:44 -0400)]
bgpd: use stream_rewind_getp() to remove overflow

Passing a negative argument to a size_t parameter creates an overflow
condition

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agolib: add stream_rewind_getp()
Quentin Young [Wed, 2 Sep 2020 20:43:29 +0000 (16:43 -0400)]
lib: add stream_rewind_getp()

stream_forward_getp() cannot be used with negative numbers due to the
size_t argument, we'll end up doing overflow arithmetic.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: fix asserting read of localpref 7055/head
Quentin Young [Thu, 3 Sep 2020 18:10:33 +0000 (14:10 -0400)]
bgpd: fix asserting read of localpref

Attribute may not be long enough to contain a localpref value, resulting
in an assert on stream size. Gracefully handle this case instead.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: fix mplsvpn nlri garbage heap read 7054/head
Quentin Young [Thu, 3 Sep 2020 17:22:17 +0000 (13:22 -0400)]
bgpd: fix mplsvpn nlri garbage heap read

NLRI parsing for mpls vpn was missing several length checks that could
easily result in garbage heap reads past the end of nlri->packet.

Convert the whole function to use stream APIs for automatic bounds
checking...

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agoMerge pull request #6926 from kuldeepkash/dynamic_route_leak
Martin Winter [Thu, 3 Sep 2020 17:03:22 +0000 (19:03 +0200)]
Merge pull request #6926 from kuldeepkash/dynamic_route_leak

tests: Add bgp_vrf_dynamic_route_leak test suite

4 years agoospf6d: fix SA warning 7053/head
Mark Stapp [Thu, 3 Sep 2020 16:57:36 +0000 (12:57 -0400)]
ospf6d: fix SA warning

Fix an SA issue in ospf6_interface.c.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: remove unused stream_get_data api 7052/head
Mark Stapp [Thu, 3 Sep 2020 16:37:55 +0000 (12:37 -0400)]
lib: remove unused stream_get_data api

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Reduce run time of bgp_l3vpn_to_bgp_vrf 7051/head
Donald Sharp [Thu, 3 Sep 2020 14:52:54 +0000 (10:52 -0400)]
tests: Reduce run time of bgp_l3vpn_to_bgp_vrf

Reduces run time of the bgp_l3vpn_to_bgp_vrf topotests
from ~118 seconds to ~87 seconds by reducing hello timers
in bgp and ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bfd-topo2 run time
Donald Sharp [Thu, 3 Sep 2020 14:39:19 +0000 (10:39 -0400)]
tests: Reduce bfd-topo2 run time

Reduce run time of bfd-topo2 from ~62 seconds to ~33 seconds
by modifying the hello/dead intervals for both ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ldp-oc-acl-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:31:09 +0000 (10:31 -0400)]
tests: Reduce ldp-oc-acl-topo1 run time

Reduce the ldp-oc-acl-topo1 test run time from ~69 seconds
to ~39 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bgp-evpn-vxlan-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:23:28 +0000 (10:23 -0400)]
tests: Reduce bgp-evpn-vxlan-topo1 run time

Reduce the runtime from ~82 seconds to ~51 seconds by
reducing hello/hold timers for both bgp and ospf.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ospf-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 14:14:22 +0000 (10:14 -0400)]
tests: Reduce ospf-topo1 run time

Reduce run time from ~114 seconds to ~55 seconds by
configuring hello/dead interval timers for ospf and ospfv3

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce bgp_l3vpn_to_bgp_direct run time
Donald Sharp [Thu, 3 Sep 2020 13:59:11 +0000 (09:59 -0400)]
tests: Reduce bgp_l3vpn_to_bgp_direct run time

Reduce run time from ~76 seconds to ~47 seconds by modifying
both bgp and ospf timers to be more aggressive

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Reduce ldp-vpls-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 13:34:19 +0000 (09:34 -0400)]
tests: Reduce ldp-vpls-topo1 run time

Reduce this tests run time from ~76 seconds to ~49 seconds
by decreasing the hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup bgp_rfapi_basic_sanity run
Donald Sharp [Thu, 3 Sep 2020 13:20:12 +0000 (09:20 -0400)]
tests: Speedup bgp_rfapi_basic_sanity run

Decrease run time from ~70 seconds to ~41 seconds by
reducing hello/dead interval timers in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup bfd-profiles-topo1 runtime
Donald Sharp [Thu, 3 Sep 2020 13:09:20 +0000 (09:09 -0400)]
tests: Speedup bfd-profiles-topo1 runtime

Decrease run time from ~70 seconds to ~60 seconds
by modifying the hello/dead interval interface timers
in ospf

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Decrease ospf-sr-topo1 run time
Donald Sharp [Thu, 3 Sep 2020 13:02:43 +0000 (09:02 -0400)]
tests: Decrease ospf-sr-topo1 run time

Reduce ospf-sr-topo1 run time from ~60 seconds to ~30 seconds
by shortening the hello and dead timers.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: ospf-topo2 speed up
Donald Sharp [Wed, 2 Sep 2020 20:23:54 +0000 (16:23 -0400)]
tests: ospf-topo2 speed up

Modify ospf hello/dead timers to speed up run time from ~25 seconds to
~17 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Modify ldp-oc-topo1 to run faster
Donald Sharp [Wed, 2 Sep 2020 20:16:48 +0000 (16:16 -0400)]
tests: Modify ldp-oc-topo1 to run faster

Convert run times by lowering hello/dead interval timers to
smaller values from ~66 seconds to ~36 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: Speedup ldp-topo1 tests
Donald Sharp [Wed, 2 Sep 2020 20:07:15 +0000 (16:07 -0400)]
tests: Speedup ldp-topo1 tests

These ospf timer changes, speed up convergence from ~85 seconds to
~40 seconds.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #7043 from donaldsharp/bgp_features_speedup
Mark Stapp [Thu, 3 Sep 2020 12:14:46 +0000 (08:14 -0400)]
Merge pull request #7043 from donaldsharp/bgp_features_speedup

tests: Speed up bgp_features topotests by a lot

4 years agoospfd: install Type-7 when NSSA enabled after redistribution 6982/head
Alexander Chernavin [Tue, 25 Aug 2020 09:50:39 +0000 (05:50 -0400)]
ospfd: install Type-7 when NSSA enabled after redistribution

If NSSA is enabled before redistribution is configured, Type-7 LSA's
are installed. But if NSSA is enabled after redistribution is
configured, Type-7 LSAs are missing.

With this change, when NSSA is enabled, scan for external LSA's and
if they exist, install Type-7.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
4 years agoMerge pull request #6987 from Niral-Networks/acl_fix
Santosh P K [Thu, 3 Sep 2020 04:21:21 +0000 (09:51 +0530)]
Merge pull request #6987 from Niral-Networks/acl_fix

lib, ospf : Fix when redist is performed with route-map using access-list

4 years agolib: remove overflow arithmetic from hash stats
Quentin Young [Wed, 2 Sep 2020 20:02:55 +0000 (16:02 -0400)]
lib: remove overflow arithmetic from hash stats

Signed values get converted to unsigned for addition, so when the value
to adjust a stats variable for hash tables was negative this resulted in
overflow arithmetic, which we generally don't want.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: make flag values explicitly unsigned
Quentin Young [Wed, 2 Sep 2020 19:11:26 +0000 (15:11 -0400)]
bgpd: make flag values explicitly unsigned

When using these flag #defines, by default their types are integers but
they are always used in conjunction with unsigned integers, which
introduces some implicit conversions that really ought to be avoided.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agolib: explicitly cast -1 to uid_t
Quentin Young [Wed, 2 Sep 2020 19:05:43 +0000 (15:05 -0400)]
lib: explicitly cast -1 to uid_t

We should be explicit about what's happening here

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agotests: Speed up bgp_features topotests by a lot 7043/head
Donald Sharp [Wed, 2 Sep 2020 19:42:01 +0000 (15:42 -0400)]
tests: Speed up bgp_features topotests by a lot

Initial run of topotests on my machine takes ~210 seconds
With these changes we are at ~40 seconds

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agobgpd: modify attr fields before hash insert 7040/head
Quentin Young [Wed, 2 Sep 2020 17:16:35 +0000 (13:16 -0400)]
bgpd: modify attr fields before hash insert

bgp_attr_intern(attr) takes an attribute, duplicates it, and inserts it
into the attribute hash table, returning the inserted attr. This is done
when processing a bgp update. We store the returned attribute in the
path info struct. However, later on we modify one of the fields of the
attribute. This field is inspected by attrhash_cmp, the function that
allows the hash table to select the correct item from the hash chain for
a given key when doing a lookup on an item. By modifying the field after
it's been inserted, we open the possibility that two items in the same
chain that at insertion time were differential by attrhash_cmp becomes
equal according to that function. When performing subsequent hash
lookups, it is then indeterminate which of the equivalent items the hash
table will select from the chain (in practice it is the first one but
this may not be the one we want). Thus, it is illegal to modify
data used by a hash comparison function after inserting that data into
a hash table.

In fact this is occurring for attributes. We insert two attributes that
hash to the same key and thus end up in the same hash chain. Then we
modify one of them such that the two items now compare equal. Later one
we want to release the second item from the chain before XFREE()'ing it,
but since the two items compare equal we get the first item back, then
free the second one, which constitutes two bugs, the first being the
wrong attribute removed from the hash table and the second being a
dangling pointer stored in the hash table.

To rectify this we need to perform any modifications to an attr before
it is inserted into the table, i.e., before calling bgp_attr_intern().
This patch does that by moving the sole modification to the attr that
occurs after the insert (that I have seen) before that call.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
4 years agobgpd: fix invocation of bgpTrapBackwardTransition 7037/head
Babis Chalios [Tue, 4 Aug 2020 13:19:25 +0000 (15:19 +0200)]
bgpd: fix invocation of bgpTrapBackwardTransition

The bgpTrapBackwardTransition callback was being called only during
bgp_stop and only under the condition that peer status was Established.
The MIB defines that the event should be generated for every transition
of the BGP FSM from a higher to a lower state.

Signed-off-by: Babis Chalios <mail@bchalios.io>
4 years agoMerge pull request #6997 from opensourcerouting/cisco-acl-name
Donald Sharp [Wed, 2 Sep 2020 12:26:57 +0000 (08:26 -0400)]
Merge pull request #6997 from opensourcerouting/cisco-acl-name

lib,yang: allow cisco access lists to use names plus fixes

4 years agoMerge pull request #7027 from Niral-Networks/niral_dev_vrf_ospf6
Donald Sharp [Wed, 2 Sep 2020 12:25:09 +0000 (08:25 -0400)]
Merge pull request #7027 from Niral-Networks/niral_dev_vrf_ospf6

ospf6d : Preparing for ospf6d VRF support.

4 years agoMerge pull request #7033 from mjstapp/fix_pbr_nhg_sa
Donald Sharp [Wed, 2 Sep 2020 12:20:21 +0000 (08:20 -0400)]
Merge pull request #7033 from mjstapp/fix_pbr_nhg_sa

pbrd: fix SA warnings in nhg map

4 years agoospfd : Fix in lsa refresh when redist is done with route-map using access-list. 6987/head
Kaushik [Mon, 31 Aug 2020 11:32:30 +0000 (04:32 -0700)]
ospfd : Fix in lsa refresh when redist is done with route-map using access-list.

1. Minor change in distribute-list update timer based on lsa flag.

Co-authored-by: harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agoMerge pull request #7010 from wesleycoakley/pbrd-more-selective
Mark Stapp [Tue, 1 Sep 2020 18:54:18 +0000 (14:54 -0400)]
Merge pull request #7010 from wesleycoakley/pbrd-more-selective

pbrd: be more selective about route updates

4 years agopbrd: fix SA warning in nhg map 7033/head
Mark Stapp [Tue, 1 Sep 2020 18:23:40 +0000 (14:23 -0400)]
pbrd: fix SA warning in nhg map

Fix SA warnings in nhg map functions.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agopbrd: nh "valid" semantics in nexthop tracking 7010/head
Wesley Coakley [Tue, 1 Sep 2020 16:34:48 +0000 (12:34 -0400)]
pbrd: nh "valid" semantics in nexthop tracking

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
4 years agotests: Add bgp_vrf_dynamic_route_leak test suite 6926/head
Kuldeep Kashyap [Mon, 17 Aug 2020 04:41:51 +0000 (04:41 +0000)]
tests: Add bgp_vrf_dynamic_route_leak test suite

1. Added test to verify bgp vrf dynamic route leak functionality
2. Total execution time is ~8 mins
3. Added kernel version check, these script would be run for kernel version >= 4.19

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agotests: Add f/w support for bgp_vrf_dynamic_route_leak tests automation
Kuldeep Kashyap [Mon, 17 Aug 2020 03:57:55 +0000 (03:57 +0000)]
tests: Add f/w support for bgp_vrf_dynamic_route_leak tests automation

1. Adding f/w support for bgp_vrf_dynamic_route_leak tests automation

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agopbrd: be more selective about route updates
Wesley Coakley [Thu, 27 Aug 2020 14:04:52 +0000 (10:04 -0400)]
pbrd: be more selective about route updates

Given a received nexthop update, only send down an update to the
relevant nexthop group. Avoid sending down superfluous updates

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
4 years agoMerge pull request #7003 from GalaxyGorilla/ospf_ti_lfa_prep
Olivier Dugeon [Tue, 1 Sep 2020 14:39:29 +0000 (16:39 +0200)]
Merge pull request #7003 from GalaxyGorilla/ospf_ti_lfa_prep

ospfd: use a new vertex list for every SPF run

4 years agoMerge pull request #7016 from donaldsharp/pbr_vrf_is_burf
Russ White [Tue, 1 Sep 2020 14:31:20 +0000 (10:31 -0400)]
Merge pull request #7016 from donaldsharp/pbr_vrf_is_burf

Pbr vrf is burf

4 years agoMerge pull request #7023 from donaldsharp/eigrp_fixups
Russ White [Tue, 1 Sep 2020 14:20:32 +0000 (10:20 -0400)]
Merge pull request #7023 from donaldsharp/eigrp_fixups

Eigrp fixups

4 years agoMerge pull request #7028 from xThaid/netlink_buff
Mark Stapp [Tue, 1 Sep 2020 12:43:13 +0000 (08:43 -0400)]
Merge pull request #7028 from xThaid/netlink_buff

zebra: increase netlink receive buffer size

4 years agoospf6d : Preparing for ospf6d VRF support. 7027/head
Kaushik [Tue, 1 Sep 2020 08:31:49 +0000 (01:31 -0700)]
ospf6d : Preparing for ospf6d VRF support.

1. Removed the VRF_DEFAULT dependency from ospf6d.
2. The dependency on show command still exist
   will be fixed when the ospf6 master is available.

Co-authored-by: Harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agozebra: increase netlink receive buffer size 7028/head
Jakub Urbańczyk [Tue, 1 Sep 2020 09:35:16 +0000 (11:35 +0200)]
zebra: increase netlink receive buffer size

Signed-off-by: Jakub Urbańczyk <xthaid@gmail.com>
4 years agotests: topotest for bgp authentication 6826/head
Pat Ruddy [Thu, 6 Aug 2020 08:37:23 +0000 (09:37 +0100)]
tests: topotest for bgp authentication

18 tests which cover
authenticated passord session extablishment
password removal
wrong password
over default, default prefix-based, vrf, vrf prefix-based, multi-vrf and
multi-vrf prefix-based configurations

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agobgpd: do not clear password if peer is dynamic
Pat Ruddy [Mon, 20 Jul 2020 12:54:04 +0000 (13:54 +0100)]
bgpd: do not clear password if peer is dynamic

When deleting a dynamic peer, unsetting md5 password would cause
it to be unset on the listener allowing unauthenticated connections
from any peer in the range.
Check for dynamic peers in peer delete and avoid this.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agobgpd: associate listener with the appropriate bgp instance
Pat Ruddy [Tue, 21 Jul 2020 14:03:41 +0000 (15:03 +0100)]
bgpd: associate listener with  the appropriate bgp instance

When setting authentication on a BGP peer in a VRF the listener is
looked up from a global list. However there is no check that the
listener is the one associated with the VRF being configured. This
can result in the wrong listener beiong configured with a password,
leaving the intended listener in an open authentication state.
To simplify this lookup stash a pointer to the bgp instance in
the listener on creating (in the same way as is done for NS-based
VRFS).

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agotopotests : Topotest for different VRF in isisd 6934/head
harios_niral [Tue, 1 Sep 2020 07:56:44 +0000 (00:56 -0700)]
topotests : Topotest for different VRF in isisd

1. Topotest for isis-vrf is added for ipv4 and ipv6.
2. Test case for checking isis topology.
3. Test case for checking zebra isis routes.
4. Test case for checking linux vrf routes.
5. 2 new API's written in topotest/lib for checking vrf routes.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
4 years agodoc, yang, isisd : Support for different VRF in isisd
harios_niral [Tue, 18 Aug 2020 07:26:51 +0000 (00:26 -0700)]
doc, yang, isisd : Support for different VRF in isisd

1. Added isis with different vrf and it's dependecies.
2. Added new vrf leaf in yang.
3. A minor change for IF_DOWN_FROM_Z passing argrument is
   replaced with ifp pointer in api "isis_if_delete_hook()".
4. Minor fix in the isisd spf unit test.

Co-authored-by: Kaushik <kaushik@niralnetworks.com>"
Signed-off-by: harios_niral <hari@niralnetworks.com>
4 years agoeigrpd: make `show ip eigrp vrf all neighbor` work correctly 7023/head
Donald Sharp [Sat, 29 Aug 2020 17:14:10 +0000 (13:14 -0400)]
eigrpd: make `show ip eigrp vrf all neighbor` work correctly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoeigrpd: Make `show ip eigrp vrf all interfaces` work correctly
Donald Sharp [Sat, 29 Aug 2020 17:04:46 +0000 (13:04 -0400)]
eigrpd: Make `show ip eigrp vrf all interfaces` work correctly

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agoMerge pull request #7025 from opensourcerouting/silence-cli-warning
Quentin Young [Mon, 31 Aug 2020 18:03:25 +0000 (14:03 -0400)]
Merge pull request #7025 from opensourcerouting/silence-cli-warning

lib: silence overly verbose CLI warning

4 years agolib: silence overly verbose CLI warning 7025/head
Renato Westphal [Mon, 31 Aug 2020 14:58:24 +0000 (11:58 -0300)]
lib: silence overly verbose CLI warning

When not using the transactional CLI mode, do not display a
warning when a YANG-modeled commmand doesn't perform any effective
configuration change.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoeigrpd: Fix `show ip eigrp vrf all topology` to actually work
Donald Sharp [Sat, 29 Aug 2020 16:57:28 +0000 (12:57 -0400)]
eigrpd: Fix `show ip eigrp vrf all topology` to actually work

Fix multiple forms of this command to behave appropriately
when `vrf all` is specified.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agolib : Fix when redist is performed with route-map using access-list.
Kaushik [Tue, 25 Aug 2020 14:27:43 +0000 (07:27 -0700)]
lib : Fix when redist is performed with route-map using access-list.

1. Added new API for add/delete acl with route map notify.

Co-authored-by: harios <hari@niralnetworks.com>
Signed-off-by: Kaushik <kaushik@niralnetworks.com>
4 years agobgpd: do not unregister for prefix nexthop updates if nh exists 6891/head
Pat Ruddy [Fri, 26 Jun 2020 16:37:30 +0000 (17:37 +0100)]
bgpd: do not unregister for prefix nexthop updates if nh exists

since the addition of srte_color to the comparison for bgp nexthops
it is possible to have several nexthops per prefix but since zebra
only sores a per prefix registration we should not unregister for
nh notifications for a prefix unti all the nexthops for that prefix
have been deleted. Otherwise we can get into a deadlock situation
where BGP thinks we have registered but we have unregistered from zebra.

Signed-off-by: Pat Ruddy <pat@voltanet.io>
4 years agobgpd: extend the NHT code to understand SR-TE colors
Renato Westphal [Wed, 26 Aug 2020 17:39:33 +0000 (14:39 -0300)]
bgpd: extend the NHT code to understand SR-TE colors

Extend the NHT code so that only the affected BGP routes are affected
whenever an SR-policy is updated on zebra.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agobgpd: Add support for SR-TE Policies in route-maps
Sebastien Merle [Tue, 28 Jan 2020 11:59:57 +0000 (11:59 +0000)]
bgpd: Add support for SR-TE Policies in route-maps

Example configuration:
    route-map SET_SR_POLICY permit 10
     set sr-te color 1
     !
    router bgp 1
     bgp router-id 1.1.1.1
     neighbor 2.2.2.2 remote-as 1
     neighbor 2.2.2.2 update-source lo
     address-family ipv4 unicast
      neighbor 2.2.2.2 next-hop-self
      neighbor 2.2.2.2 route-map SET_SR_POLICY in
     exit-address-family
     !
    !
Learned BGP routes from 2.2.2.2 are mapped to the SR-TE Policy
which is uniquely determined by the BGP nexthop (2.2.2.2 in this
case) and the SR-TE color in the route-map.

Co-authored-by: Renato Westphal <renato@opensourcerouting.org>
Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Sebastien Merle <sebastien@netdef.org>
4 years agobgpd: convert NHT code to use rb-trees instead of routing tables
Renato Westphal [Thu, 9 Apr 2020 18:56:11 +0000 (15:56 -0300)]
bgpd: convert NHT code to use rb-trees instead of routing tables

Fist, routing tables aren't the most appropriate data structure
to store nexthops and imported routes since we don't need to do
longest prefix matches with that information.

Second, by converting the NHT code to use rb-trees, we can index
the nexthops using additional information, not only the destination
address.  This will be useful later to index bgpd's nexthops by
both destination and SR-TE color.

Co-authored-by: Sebastien Merle <sebastien@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
4 years agoMerge pull request #6925 from kuldeepkash/bgp_basic_functionality
Rafael Zalamena [Sun, 30 Aug 2020 10:40:28 +0000 (07:40 -0300)]
Merge pull request #6925 from kuldeepkash/bgp_basic_functionality

tests: Add new tests to bgp-basic-functionality-topo1

4 years agoMerge pull request #7020 from AnuradhaKaruppiah/evpn-rem-mac-fix
Rafael Zalamena [Sun, 30 Aug 2020 10:19:23 +0000 (07:19 -0300)]
Merge pull request #7020 from AnuradhaKaruppiah/evpn-rem-mac-fix

zebra: fix misc problems with EVPN-MH ES management

4 years agoMerge pull request #7019 from mjstapp/fix_topo_stringio
Donatas Abraitis [Sun, 30 Aug 2020 07:55:00 +0000 (10:55 +0300)]
Merge pull request #7019 from mjstapp/fix_topo_stringio

tests: small topotest improvements for python3

4 years agoeigrpd: Cleanup eigrp interface display to respect 16 characters
Donald Sharp [Sat, 29 Aug 2020 00:14:42 +0000 (20:14 -0400)]
eigrpd: Cleanup eigrp interface display to respect 16 characters

Interface length is 16 characters add some spaces to make everything
line up right.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: fix misc problems with ES management 7020/head
Anuradha Karuppiah [Wed, 8 Apr 2020 15:10:13 +0000 (08:10 -0700)]
zebra: fix misc problems with ES management

1. MAC ref of a zero ESI was accidentally creating a new ES with zero
ES id.
2. When an ES was deleted and re-added the ES was not being sent to BGP
because of a stale flag that suppressed the update as a dup.

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
4 years agoMerge pull request #7015 from donaldsharp/zebra_nht_no_heros_tonight
Mark Stapp [Fri, 28 Aug 2020 21:08:32 +0000 (17:08 -0400)]
Merge pull request #7015 from donaldsharp/zebra_nht_no_heros_tonight

zebra: When shutting down an interface immediately notify about rnh

4 years agozebra: When we get a rib deletion event be smarter 7015/head
Donald Sharp [Thu, 27 Aug 2020 19:42:16 +0000 (15:42 -0400)]
zebra: When we get a rib deletion event be smarter

When we get a rib deletion event and we already have
that particular route node in the queue to be reprocessed,
just note that someone from kernel land has done us dirty
and allow it to be cleaned up by normal processing

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agozebra: When shutting down an interface immediately notify about rnh
Donald Sharp [Thu, 27 Aug 2020 19:00:55 +0000 (15:00 -0400)]
zebra: When shutting down an interface immediately notify about rnh

Imagine a situation where a interface is bouncing up/down.
The interface comes up and daemons like pbr will get a nht
tracking callback for a connected interface up and will install
the routes down to zebra.  At this same time the interface can
go down.  But since zebra is busy handling route changes ( from pbr )
it has not read the netlink message and can get into a situation
where the route resolves properly and then we attempt to install
it into the kernel( which is rejected ).  If the interface
bounces back up fast at this point, the down then up netlink
message will be read and create two route entries off the connected
route node.  Zebra will then enqueue both route entries for future processing.

After this processing happens the down/up is collapsed into an up
and nexthop tracking sees no changes and does not inform any upper
level protocol( in this case pbr ) that nexthop tracking has changed.
So pbr still believes the nexthops are good but the routes are not
installed since pbr has taken no action.

Fix this by immediately running rnh when we signal a connected
route entry is scheduled for removal.  This should cause
upper level protocols to get a rnh notification for the small
amount of time that the connected route was bouncing around like
a madman.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
4 years agotests: small topotest improvements for python3 7019/head
Mark Stapp [Fri, 28 Aug 2020 12:38:34 +0000 (08:38 -0400)]
tests: small topotest improvements for python3

Avoid unnecessary use of StringIO in one place, use version-
dependent method in another. Remove a couple of other py2->py3
problems.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agotests: Add new tests to bgp-basic-functionality-topo1 6925/head
Kuldeep Kashyap [Mon, 17 Aug 2020 02:13:04 +0000 (02:13 +0000)]
tests: Add new tests to bgp-basic-functionality-topo1

1. Added new tests to bgp-basic-functionality-topo1
3. Execution time increased by 55 sec

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
4 years agoMerge pull request #7017 from xThaid/netlink_fix
Mark Stapp [Fri, 28 Aug 2020 12:20:28 +0000 (08:20 -0400)]
Merge pull request #7017 from xThaid/netlink_fix

zebra: fix netlink batching

4 years agopbrd: Convert pnhc->nexthop to it's own data 7016/head
Donald Sharp [Mon, 24 Aug 2020 19:25:34 +0000 (15:25 -0400)]
pbrd: Convert pnhc->nexthop to it's own data

The pnhc->nexthop was a pointer copy.  Causing issues
with the ability to move pointers around for the
different pnhc since the pnhc mirrored the nexthop
caches.  When we received a vrf change if we shared
pointers it was impossible to know if we had
already updated the code.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>