]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agodoc: complete area id for ospf's "range" command 10495/head
anlan_cs [Fri, 4 Feb 2022 02:09:45 +0000 (10:09 +0800)]
doc: complete area id for ospf's "range" command

Like other commands, just complete area id.
Additonally replace `IPV4_PREFIX` with generic `A.B.C.D/M`.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10464 from pguibert6WIND/negogiate
Mark Stapp [Tue, 1 Feb 2022 18:00:54 +0000 (13:00 -0500)]
Merge pull request #10464 from pguibert6WIND/negogiate

topotests: fix typo about bgp_dont_capability folder name

3 years agoMerge pull request #10428 from ton31337/fix/attr_extra_ipv6_ecommunity
Russ White [Tue, 1 Feb 2022 16:38:39 +0000 (11:38 -0500)]
Merge pull request #10428 from ton31337/fix/attr_extra_ipv6_ecommunity

bgpd: Move out ipv6_ecommunity struct from attr to attr_extra

3 years agoMerge pull request #10413 from anlancs/bfd-with-check
Russ White [Tue, 1 Feb 2022 16:18:52 +0000 (11:18 -0500)]
Merge pull request #10413 from anlancs/bfd-with-check

bfdd,doc,yang: a few minor commits for bfdd

3 years agoMerge pull request #10373 from anlancs/ospf-add-asbr
Igor Ryzhov [Tue, 1 Feb 2022 16:04:33 +0000 (19:04 +0300)]
Merge pull request #10373 from anlancs/ospf-add-asbr

ospfd: fix missing "aggregation timer" in running configuration

3 years agoMerge pull request #10391 from gromit1811/bug_9720_ecmp_inter_area_topotest_3paths
Russ White [Tue, 1 Feb 2022 15:55:13 +0000 (10:55 -0500)]
Merge pull request #10391 from gromit1811/bug_9720_ecmp_inter_area_topotest_3paths

tests: Topotest for checking ECMP inter-area nexthop handling

3 years agotopotests: fix typo about bgp_dont_capability folder name 10464/head
Philippe Guibert [Tue, 1 Feb 2022 15:52:20 +0000 (16:52 +0100)]
topotests: fix typo about bgp_dont_capability folder name

The folder bgp_dont_capability.. was wrong. Use negotiate
instead of negogiate.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #10431 from ton31337/fix/rpki
Russ White [Tue, 1 Feb 2022 15:48:58 +0000 (10:48 -0500)]
Merge pull request #10431 from ton31337/fix/rpki

bgpd: Handle TCP connection errors with connection callbacks for RPKI

3 years agoMerge pull request #10430 from ton31337/fix/addpath_maximum-prefix-out
Igor Ryzhov [Tue, 1 Feb 2022 15:38:57 +0000 (18:38 +0300)]
Merge pull request #10430 from ton31337/fix/addpath_maximum-prefix-out

bgpd: Add bgp_check_selected() helper and just consistency changes

3 years agoMerge pull request #10322 from iqras23/coverity
Igor Ryzhov [Tue, 1 Feb 2022 13:27:04 +0000 (16:27 +0300)]
Merge pull request #10322 from iqras23/coverity

bgpd: Addressing few coverity issues

3 years agobgpd: Add bgp_check_selected() helper for abstraction 10430/head
Donatas Abraitis [Thu, 27 Jan 2022 08:12:59 +0000 (10:12 +0200)]
bgpd: Add bgp_check_selected() helper for abstraction

Just check if the path is selected to be advertised: best path or addpath
capable.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Convert bgp_addpath_encode_[tr]x() to bool from int
Donatas Abraitis [Thu, 27 Jan 2022 07:51:59 +0000 (09:51 +0200)]
bgpd: Convert bgp_addpath_encode_[tr]x() to bool from int

Rename addpath_encode[d] to addpath_capable to be consistent.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #10446 from anlancs/staticd-cleanup
Igor Ryzhov [Tue, 1 Feb 2022 10:33:13 +0000 (13:33 +0300)]
Merge pull request #10446 from anlancs/staticd-cleanup

staticd: small cleanup

3 years agoMerge pull request #10435 from ckishimo/ospf6d_distance
Igor Ryzhov [Tue, 1 Feb 2022 10:28:44 +0000 (13:28 +0300)]
Merge pull request #10435 from ckishimo/ospf6d_distance

ospf6d: fix distance not applied

3 years agoMerge pull request #10459 from ckishimo/ospfd_distance
Igor Ryzhov [Tue, 1 Feb 2022 10:28:33 +0000 (13:28 +0300)]
Merge pull request #10459 from ckishimo/ospfd_distance

ospfd: fix distance not applied

3 years agoMerge pull request #10442 from ton31337/fix/reuse_bgp_path_info_extra_get
Igor Ryzhov [Tue, 1 Feb 2022 09:19:23 +0000 (12:19 +0300)]
Merge pull request #10442 from ton31337/fix/reuse_bgp_path_info_extra_get

bgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info

3 years agoMerge pull request #10443 from mjstapp/zebra_re_opaque
Igor Ryzhov [Tue, 1 Feb 2022 09:19:11 +0000 (12:19 +0300)]
Merge pull request #10443 from mjstapp/zebra_re_opaque

zebra: name the route_entry opaque struct more specifically

3 years agoMerge pull request #10449 from ton31337/fix/vty_json
Igor Ryzhov [Tue, 1 Feb 2022 09:18:48 +0000 (12:18 +0300)]
Merge pull request #10449 from ton31337/fix/vty_json

*: Missing vty_json conversions

3 years agobuild: FRR 8.3 development version frr-8.3-dev
Donatas Abraitis [Tue, 1 Feb 2022 09:02:03 +0000 (11:02 +0200)]
build: FRR 8.3 development version

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Fix expected type from format string to unsigned int 10322/head
Iqra Siddiqui [Wed, 19 Jan 2022 07:25:21 +0000 (23:25 -0800)]
bgpd: Fix expected type from format string to unsigned int

Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
3 years agoospfd: remove extra space 10459/head
ckishimo [Mon, 31 Jan 2022 23:34:34 +0000 (00:34 +0100)]
ospfd: remove extra space

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospfd: print maximum paths in show ip ospf json
ckishimo [Mon, 31 Jan 2022 23:11:47 +0000 (00:11 +0100)]
ospfd: print maximum paths in show ip ospf json

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospfd: print administrative distance in show ip ospf
ckishimo [Mon, 31 Jan 2022 23:08:54 +0000 (00:08 +0100)]
ospfd: print administrative distance in show ip ospf

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospfd: restart spf when distance is updated
ckishimo [Mon, 31 Jan 2022 22:58:14 +0000 (23:58 +0100)]
ospfd: restart spf when distance is updated

if r1 has a route received from a neighbor with the default administrative
distance configured

    r1# sh ip route
    Codes: K - kernel route, C - connected, S - static, R - RIP,
           O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
           T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
           f - OpenFabric,
           > - selected route, * - FIB route, q - queued, r - rejected, b - backup
           t - trapped, o - offload failure

    O>* 1.1.1.1/32 [110/20] via 10.0.12.2, r1-r2-eth0, weight 1, 00:00:41

if we change the administrative distance

    r1(config)# router ospf
    r1(config-router)# distance 50

this is not applied as there are no changes in the routing table

    r1# sh ip route
    Codes: K - kernel route, C - connected, S - static, R - RIP,
           O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
           T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
           f - OpenFabric,
           > - selected route, * - FIB route, q - queued, r - rejected, b - backup
           t - trapped, o - offload failure

    O>* 1.1.1.1/32 [110/20] via 10.0.12.2, r1-r2-eth0, weight 1, 00:00:13

This commit will force the update of the routing table with the new configured distance

    r1# sh ip route
    Codes: K - kernel route, C - connected, S - static, R - RIP,
           O - OSPF, I - IS-IS, B - BGP, E - EIGRP, N - NHRP,
           T - Table, v - VNC, V - VNC-Direct, A - Babel, F - PBR,
           f - OpenFabric,
           > - selected route, * - FIB route, q - queued, r - rejected, b - backup
           t - trapped, o - offload failure

    O>* 1.1.1.1/32 [50/20] via 10.0.12.2, r1-r2-eth0, weight 1, 00:00:14

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agobgpd: Fixing dead code
Iqra Siddiqui [Wed, 19 Jan 2022 07:14:03 +0000 (23:14 -0800)]
bgpd: Fixing dead code

Description:
-Removing break statements which will never be executed.
-Adding missing 'cmd' variable.

Co-authored-by: Kantesh Mundaragi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
3 years agobgpd: Fixing memcmp to avoid coverity issue
Iqra Siddiqui [Tue, 18 Jan 2022 08:36:13 +0000 (00:36 -0800)]
bgpd: Fixing memcmp to avoid coverity issue

Description:
Replacing memcmp at certain places,
to avoid the coverity issues caused by it.

Co-authored-by: Kantesh Mundargi <kmundaragi@vmware.com>
Signed-off-by: Iqra Siddiqui <imujeebsiddi@vmware.com>
3 years agoMerge pull request #10451 from donaldsharp/route_tag_ntohl base_8.2
Igor Ryzhov [Mon, 31 Jan 2022 19:50:48 +0000 (22:50 +0300)]
Merge pull request #10451 from donaldsharp/route_tag_ntohl

ospfd: Convert output to host order from network order for route_tag

3 years agobgpd,pimd,isisd,nhrpd: Convert to vty_json() 10449/head
Donatas Abraitis [Mon, 31 Jan 2022 19:20:41 +0000 (21:20 +0200)]
bgpd,pimd,isisd,nhrpd: Convert to vty_json()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #10448 from ton31337/fix/zebra_ospf6d_json_leak
Donald Sharp [Mon, 31 Jan 2022 17:58:19 +0000 (12:58 -0500)]
Merge pull request #10448 from ton31337/fix/zebra_ospf6d_json_leak

ospf6d: Fix memory leak for `show ipv6 ospf6 zebra json`

3 years agoospfd: Convert output to host order from network order for route_tag 10451/head
Donald Sharp [Mon, 31 Jan 2022 17:49:55 +0000 (12:49 -0500)]
ospfd: Convert output to host order from network order for route_tag

FRR stores the route_tag in network byte order.  Bug filed indicates
that the `show ip ospf route` command shows the correct value.
Every place route_tag is dumped in ospf_vty.c the ntohl function
is used first.

Fixes: #10450
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: Fix memory leak for `show ipv6 ospf6 zebra json` 10448/head
Donatas Abraitis [Mon, 31 Jan 2022 13:56:56 +0000 (15:56 +0200)]
ospf6d: Fix memory leak for `show ipv6 ospf6 zebra json`

$ for x in $(seq 1 10000); do vtysh -c 'show ipv6 ospf6 zebra json' >/dev/null; done

Before:
```
$ vtysh -c 'show memory ospf6d' | grep 'Total heap allocated'
  Total heap allocated:  26 MiB
```

After:
```
$ vtysh -c 'show memory ospf6d' | grep 'Total heap allocated'
  Total heap allocated:  2256 KiB
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: name the route_entry opaque struct more specifically 10443/head
Mark Stapp [Tue, 9 Nov 2021 14:35:54 +0000 (09:35 -0500)]
zebra: name the route_entry opaque struct more specifically

The name 'opaque' is a little general - call the route_entry
struct 're_opaque' to make it more specific.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
3 years agotools: Handle new lines for json_object_to_json_string_ext()
Donatas Abraitis [Mon, 31 Jan 2022 13:34:24 +0000 (15:34 +0200)]
tools: Handle new lines for json_object_to_json_string_ext()

Just to handle %s and %s\n.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agostaticd: small cleanup 10446/head
anlan_cs [Mon, 31 Jan 2022 06:16:07 +0000 (14:16 +0800)]
staticd: small cleanup

Two small cleanups, just remove duplication.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agotests: Topotest for checking ECMP inter-area nexthop handling 10391/head
Martin Buck [Sun, 3 Oct 2021 12:39:15 +0000 (14:39 +0200)]
tests: Topotest for checking ECMP inter-area nexthop handling

Used to reproduce #9720 and may also serve as a regression test in the
future.

Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
3 years agoospfd: adjust type of "aggr_delay_interval" 10373/head
anlan_cs [Fri, 28 Jan 2022 14:01:54 +0000 (09:01 -0500)]
ospfd: adjust type of "aggr_delay_interval"

Adjust type of "aggr_delay_interval":
Just replace `unsigned int` with `uint16_t` for range is (50..1800).

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoospf6d: adjust type of "aggr_delay_interval"
anlan_cs [Thu, 20 Jan 2022 08:05:11 +0000 (03:05 -0500)]
ospf6d: adjust type of "aggr_delay_interval"

Adjust type of "aggr_delay_interval":
Just replace `unsigned int` with `uint16_t` for range is (50..1800).

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoospfd: fix missing "aggregation timer" in running configuration
anlan_cs [Wed, 19 Jan 2022 13:42:02 +0000 (08:42 -0500)]
ospfd: fix missing "aggregation timer" in running configuration

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoospfd: a few minor fixes on ospfd cli
anlan_cs [Wed, 19 Jan 2022 12:24:50 +0000 (07:24 -0500)]
ospfd: a few minor fixes on ospfd cli

Two minor fixes:
    - remove redundant "(a.b.c.d/m)" in "prefix" description
    - remove some annoying space in "summary-address" and "tag"

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agobgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info 10442/head
Donatas Abraitis [Fri, 28 Jan 2022 19:11:12 +0000 (21:11 +0200)]
bgpd: Reuse bgp_path_info_extra_get() for allocating new bgp path info

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9869 from leonshaw/fix/evpn-queue
Mark Stapp [Fri, 28 Jan 2022 16:58:43 +0000 (11:58 -0500)]
Merge pull request #9869 from leonshaw/fix/evpn-queue

zebra: Fix EVPN route nexthop config order

3 years agoMerge pull request #10357 from ton31337/fix/peer_address_self_check_relax
Russ White [Fri, 28 Jan 2022 16:12:45 +0000 (11:12 -0500)]
Merge pull request #10357 from ton31337/fix/peer_address_self_check_relax

bgpd: Relax peer to be on the same host

3 years agoospf6d: print administrative distance in show ipv6 ospf 10435/head
ckishimo [Wed, 26 Jan 2022 21:46:44 +0000 (22:46 +0100)]
ospf6d: print administrative distance in show ipv6 ospf

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospf6d: restart spf when distance is updated
ckishimo [Wed, 26 Jan 2022 21:41:36 +0000 (22:41 +0100)]
ospf6d: restart spf when distance is updated

if r1 has a route received from a neighbor and the same route
configured as static, the administrative distance will determine
which route to use

r1(config)# ipv6 route 1:1::1/128 Null0 70

r1# sh ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

S>* 1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:12
O   1:1::1/128 [110/20] via fe80::1833:c9ff:fe7b:3e43, r1-r2-eth0, weight 1, 00:00:49

The static route is selected. If we now change the administrative distance
in ospf6, the OSPF route should be selected

r1(config)# router ospf6
r1(config-ospf6)# distance 50

r1# sh ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

S>* 1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:39
O   1:1::1/128 [110/20] via fe80::1833:c9ff:fe7b:3e43, r1-r2-eth0, weight 1, 00:01:16

However the distance is not applied as there are no changes in the routing table

This commit will force the update of the routing table with the new configured distance

r1# sh ipv6 route
Codes: K - kernel route, C - connected, S - static, R - RIPng,
       O - OSPFv3, I - IS-IS, B - BGP, N - NHRP, T - Table,
       v - VNC, V - VNC-Direct, A - Babel, F - PBR,
       f - OpenFabric,
       > - selected route, * - FIB route, q - queued, r - rejected, b - backup
       t - trapped, o - offload failure

O>* 1:1::1/128 [50/20] via fe80::8cb7:e6ff:fef5:2344, r1-r2-eth0, weight 1, 00:00:03
S   1:1::1/128 [70/0] unreachable (blackhole), weight 1, 00:00:19

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agozebra: Fix EVPN route nexthop config order 9869/head
Xiao Liang [Fri, 22 Oct 2021 07:45:33 +0000 (15:45 +0800)]
zebra: Fix EVPN route nexthop config order

EVPN route add should be queued to preserve the config order.
In particular, against deletion in rib_delete().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
3 years agoMerge pull request #10408 from idryzhov/no-opaque-by-default
Donatas Abraitis [Fri, 28 Jan 2022 10:54:16 +0000 (12:54 +0200)]
Merge pull request #10408 from idryzhov/no-opaque-by-default

*: do not send opaque data to zebra by default

3 years agoMerge pull request #10159 from taspelund/retain-peer-asn
Donatas Abraitis [Fri, 28 Jan 2022 07:22:06 +0000 (09:22 +0200)]
Merge pull request #10159 from taspelund/retain-peer-asn

bgpd: retain peer asn even with remove-private-AS

3 years agoMerge pull request #10389 from gromit1811/bugfix_9720_ecmp_inter_area
Donatas Abraitis [Fri, 28 Jan 2022 07:09:51 +0000 (09:09 +0200)]
Merge pull request #10389 from gromit1811/bugfix_9720_ecmp_inter_area

ospf6d: Fix ECMP inter-area route nexthop update

3 years agoMerge pull request #10420 from donaldsharp/zebra_multicast_vrf_cleanup
Donatas Abraitis [Fri, 28 Jan 2022 06:55:12 +0000 (08:55 +0200)]
Merge pull request #10420 from donaldsharp/zebra_multicast_vrf_cleanup

zebra: Actually delete the table we are looking for

3 years agoMerge pull request #10433 from idryzhov/vrrp-ip-addr-is-zero
Quentin Young [Thu, 27 Jan 2022 21:08:15 +0000 (16:08 -0500)]
Merge pull request #10433 from idryzhov/vrrp-ip-addr-is-zero

3 years agoMerge pull request #10434 from idryzhov/isis-attached-bit
Mark Stapp [Thu, 27 Jan 2022 20:54:59 +0000 (15:54 -0500)]
Merge pull request #10434 from idryzhov/isis-attached-bit

isisd: remove deprecated command

3 years agoisisd: remove deprecated command 10434/head
Igor Ryzhov [Thu, 27 Jan 2022 18:12:22 +0000 (21:12 +0300)]
isisd: remove deprecated command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agovrrpd: use ipaddr_is_zero when needed 10433/head
Igor Ryzhov [Thu, 27 Jan 2022 18:05:40 +0000 (21:05 +0300)]
vrrpd: use ipaddr_is_zero when needed

Replace custom implementation or call to ipaddr_isset with a call to
ipaddr_is_zero.

ipaddr_isset is not fully correct, because it's fine to have some
non-zero bytes at the end of the struct in case of IPv4 and the function
doesn't allow that.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Handle TCP connection errors with connection callbacks for RPKI 10431/head
Donatas Abraitis [Thu, 27 Jan 2022 09:14:11 +0000 (11:14 +0200)]
bgpd: Handle TCP connection errors with connection callbacks for RPKI

Before this patch, if the first server crashed or was terminated, RPKI
connection keeps _active_ forever.

With this patch, if we catch connection problem (FATAL), we reset RPKI, to
switch to another available RTR-Server by using configured preference.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9880 from louis-oui/maximum-prefix-out
Donatas Abraitis [Thu, 27 Jan 2022 06:49:31 +0000 (08:49 +0200)]
Merge pull request #9880 from louis-oui/maximum-prefix-out

bgpd: fixes maximum prefix out

3 years agobgpd: Move out ipv6_ecommunity struct from attr to attr_extra 10428/head
Donatas Abraitis [Wed, 26 Jan 2022 19:40:29 +0000 (21:40 +0200)]
bgpd: Move out ipv6_ecommunity struct from attr to attr_extra

This is the initial work to move all non IPv4/IPv6 AFI related
attributes/structs to attr->extra to avoid unnecesarry allocations.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agotopotests: set bgp peer-group with maximum-prefix-out 9880/head
Louis Scalbert [Mon, 25 Oct 2021 11:25:35 +0000 (13:25 +0200)]
topotests: set bgp peer-group with maximum-prefix-out

Set different combinations of bgp peer-group with a maximum-prefix-out
value.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agobgpd: fix peer-group with maximum-prefix-out
Louis Scalbert [Mon, 25 Oct 2021 11:25:19 +0000 (13:25 +0200)]
bgpd: fix peer-group with maximum-prefix-out

When setting maximum-prefix-out on peer-group, the applied value on
member is 0.

Fix usage of maximum-prefix-out on peer-group.

The peer_maximum_prefix_out_(un)set functions are derived from
peer_maximum_prefix_(un)set.

Fixes: fde246e8353a ("bgpd: Add an option to limit outgoing prefixes")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agotopotests: bgp no neighbor X.X.X.X maximum-prefix-out Y
Louis Scalbert [Mon, 25 Oct 2021 11:24:09 +0000 (13:24 +0200)]
topotests: bgp no neighbor X.X.X.X maximum-prefix-out Y

Test the ability to use the following configure command with a Y value:

no neighbor X.X.X.X maximum-prefix-out Y

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agobgpd: allow no neighbor X.X.X.X maximum-prefix-out [(1-4294967295)]
Louis Scalbert [Mon, 25 Oct 2021 11:23:38 +0000 (13:23 +0200)]
bgpd: allow no neighbor X.X.X.X maximum-prefix-out [(1-4294967295)]

Specifying a number is not possible with command no neighbor X.X.X.X
maximum-prefix-out

> frr(config-router-af)# no neighbor 192.168.1.2 maximum-prefix-out 1
> % Unknown command: no neighbor 192.168.1.2 maximum-prefix-out 1

This patch allows it.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agoMerge pull request #10425 from ckishimo/ospf6d_nssa
Donald Sharp [Wed, 26 Jan 2022 14:56:34 +0000 (09:56 -0500)]
Merge pull request #10425 from ckishimo/ospf6d_nssa

ospf6d: show if area is NSSA

3 years agozebra: Don't double delete the table we are cleaning up 10420/head
Donald Sharp [Mon, 24 Jan 2022 20:37:54 +0000 (15:37 -0500)]
zebra: Don't double delete the table we are cleaning up

vrf_disable is always called first before
vrf_delete.  The rnh_table and rnh_table_multicast tables
are already deleted as part of vrf_disable.  No need
to do it again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoospf6d: show if area is NSSA 10425/head
ckishimo [Tue, 25 Jan 2022 17:49:27 +0000 (18:49 +0100)]
ospf6d: show if area is NSSA

This PR will include if the area is NSSA in the output of "show ipv6 ospf"

    r2# show ipv6 ospf
     ...
     Area 0.0.0.0
         Number of Area scoped LSAs is 8
         Interface attached to this area: r2-eth1
         SPF last executed 20.46717s ago
     Area 0.0.0.1[Stub]
         Number of Area scoped LSAs is 9
         Interface attached to this area: r2-eth0
         SPF last executed 20.46911s ago
     Area 0.0.0.2[NSSA]
         Number of Area scoped LSAs is 14
         Interface attached to this area: r2-eth2
         SPF last executed 20.46801s ago

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoospf6d: fix indentation in show ipv6 ospf area
ckishimo [Tue, 25 Jan 2022 17:47:47 +0000 (18:47 +0100)]
ospf6d: fix indentation in show ipv6 ospf area

Signed-off-by: ckishimo <carles.kishimoto@gmail.com>
3 years agoMerge pull request #10410 from idryzhov/pim-memleaks
Quentin Young [Tue, 25 Jan 2022 16:41:09 +0000 (11:41 -0500)]
Merge pull request #10410 from idryzhov/pim-memleaks

3 years agoMerge pull request #10411 from idryzhov/if-config-vrf-name
Russ White [Tue, 25 Jan 2022 16:34:59 +0000 (11:34 -0500)]
Merge pull request #10411 from idryzhov/if-config-vrf-name

*: do not print vrf name for interface config when using vrf-lite

3 years agoMerge pull request #10395 from qlyoung/fix-pim-xpath-buffer-sizes
David Lamparter [Tue, 25 Jan 2022 16:22:39 +0000 (17:22 +0100)]
Merge pull request #10395 from qlyoung/fix-pim-xpath-buffer-sizes

3 years agoMerge pull request #10419 from qlyoung/fix-logrotate-staticd-typo
Igor Ryzhov [Tue, 25 Jan 2022 13:58:12 +0000 (16:58 +0300)]
Merge pull request #10419 from qlyoung/fix-logrotate-staticd-typo

redhat: logrotate file has typo for staticd

3 years agobfdd,yang: optimize nb with YANG 10413/head
anlan_cs [Mon, 24 Jan 2022 01:54:11 +0000 (20:54 -0500)]
bfdd,yang: optimize nb with YANG

A few optimizations for bfd NB:
    - Remove unuseful checks for parameters with the same values
    - Replace checking values of bfd parameters with YANG's "range"
    - Append "required-echo-receive-interval" with 0 for it can be disabled

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agotests: add topotest for remove-private-AS 10159/head
Trey Aspelund [Thu, 20 Jan 2022 22:40:13 +0000 (22:40 +0000)]
tests: add topotest for remove-private-AS

Introduces a topotest to validate proper AS-Path manipulation when using
"neighbor ... remove-private-AS".

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agobgpd: retain peer asn even with remove-private-AS
Trey Aspelund [Tue, 16 Nov 2021 21:11:26 +0000 (21:11 +0000)]
bgpd: retain peer asn even with remove-private-AS

In situations where remove-private-AS is configured for eBGP peers
residing in a private ASN, the peer's ASN was not being retained
in the AS-Path which can allow loops to occur. This was addressed
in a prior commit but it only addressed cases where the "replace-AS"
keyword was configured.
This commit ensures we retain the peer's ASN when using
"remove-private-AS" for eBGP peers in a private ASN regardless of other
keywords.

Setup:
=========
router bgp 4200000002
 neighbor enp1s0 interface v6only remote-as external
 neighbor enp6s0 interface v6only remote-as external
 !
 address-family ipv4 unicast
  neighbor enp6s0 remove-private-AS
 exit-address-family

ub18# show ip bgp sum | include 420000
BGP router identifier 100.64.0.111, local AS number 4200000002 vrf-id 0    <<<<< local asn 4200000002
ub20(enp1s0)    4 4200000001        22        22        0    0    0 00:00:57            1        1
ub20(enp6s0)    4 4200000001        21        22        0    0    0 00:00:57            0        1   <<<< peer asn 4200000001

ub18# show ip bgp | include 0.2
Default local pref 100, local AS 4200000002
*> 100.64.0.2/32    enp1s0                   0             0 4200000001 4200000004 4200000005 4200000001 i

Before ("remote-private-AS" only):
=========
ub18# show ip bgp neighbors enp6s0 advertised-routes | include 100.64.0.2
*> 100.64.0.2/32    ::                                     0 i     <<<<<  empty as-path, no way to prevent loop

After ("remote-private-AS" only):
=========
ub18# show ip bgp neighbors enp6s0 advertised-routes | include 100.64.0.2
*> 100.64.0.2/32    ::                                     0 4200000001 4200000001 i    <<<< retain peer's asn, breaks loop

Ticket: 2857047
Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
3 years agoredhat: logrotate file has typo for staticd 10419/head
Quentin Young [Mon, 24 Jan 2022 20:05:48 +0000 (15:05 -0500)]
redhat: logrotate file has typo for staticd

s/static/staticd

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years ago*: do not send opaque data to zebra by default 10408/head
Igor Ryzhov [Sun, 23 Jan 2022 13:08:46 +0000 (16:08 +0300)]
*: do not send opaque data to zebra by default

Opaque data takes up a lot of memory when there are a lot of routes on
the box. Given that this is just a cosmetic info, I propose to disable
it by default to not shock people who start using FRR for the first time
or upgrades from an old version.

Fixes #10101.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopimd: fix interface info memory leak 10410/head
Igor Ryzhov [Sun, 23 Jan 2022 21:17:48 +0000 (00:17 +0300)]
pimd: fix interface info memory leak

When the interface is deleted from the system, its info must be freed.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopimd: move iface lib initialization to a proper place
Igor Ryzhov [Sun, 23 Jan 2022 21:16:59 +0000 (00:16 +0300)]
pimd: move iface lib initialization to a proper place

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agopimd: fix misuse of xpath buf size constants 10395/head
Quentin Young [Thu, 20 Jan 2022 22:24:30 +0000 (17:24 -0500)]
pimd: fix misuse of xpath buf size constants

XPATH_MAXLEN denotes the maximum length of an XPATH. It does not make
sense to allocate a buffer intended to contain an XPATH with a size
larger than the maximum allowable size of an XPATH. Consequently this PR
removes buffers that do this. Prints into these buffers are now checked
for overflow.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #10374 from opensourcerouting/bgp-reset-counters
Russ White [Mon, 24 Jan 2022 12:52:11 +0000 (07:52 -0500)]
Merge pull request #10374 from opensourcerouting/bgp-reset-counters

bgpd: Reset message statistics with clear command

3 years agoMerge pull request #10380 from ton31337/feature/show_graceful_restart_timer_per_prefix
Russ White [Mon, 24 Jan 2022 12:51:19 +0000 (07:51 -0500)]
Merge pull request #10380 from ton31337/feature/show_graceful_restart_timer_per_prefix

bgpd: Show Graceful Restart seconds remaining per prefix

3 years agoMerge pull request #10381 from idryzhov/drop-gw-addr
Russ White [Mon, 24 Jan 2022 12:50:20 +0000 (07:50 -0500)]
Merge pull request #10381 from idryzhov/drop-gw-addr

BGP EVPN overlay index fixes and improvements

3 years agoMerge pull request #10402 from ton31337/fix/capability_extended-nexthop_cli_hidden
Russ White [Mon, 24 Jan 2022 12:35:21 +0000 (07:35 -0500)]
Merge pull request #10402 from ton31337/fix/capability_extended-nexthop_cli_hidden

bgpd: Show negative form of capability extended-nexthop for interface…

3 years agoMerge pull request #10407 from idryzhov/ospf-opaque-crash
Russ White [Mon, 24 Jan 2022 12:34:30 +0000 (07:34 -0500)]
Merge pull request #10407 from idryzhov/ospf-opaque-crash

ospfd: fix crash on "ospf send-extra-data zebra"

3 years agoMerge pull request #10412 from idryzhov/zebra-vrf-delete
Russ White [Mon, 24 Jan 2022 12:33:53 +0000 (07:33 -0500)]
Merge pull request #10412 from idryzhov/zebra-vrf-delete

zebra: fix vrf deletion

3 years ago*: do not print vrf name for interface config when using vrf-lite 10411/head
Igor Ryzhov [Sun, 23 Jan 2022 21:07:20 +0000 (00:07 +0300)]
*: do not print vrf name for interface config when using vrf-lite

VRF name should not be printed in the config since 574445ec. The update
was done for NB config output but I missed it for regular vty output.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agodoc: clarify bfd parameters' overriden method
anlan_cs [Mon, 24 Jan 2022 01:36:31 +0000 (20:36 -0500)]
doc: clarify bfd parameters' overriden method

Here "new" is very puzzling. If new parameters with default values on peer
configuration node are set, they will not be used yet.

So just clarify it:
Only "non-default" values on peer configuration node are set, they can override
the conrresponding values from profile.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoyang: fix "minimum-ttl" missing default value
anlan_cs [Mon, 24 Jan 2022 01:27:05 +0000 (20:27 -0500)]
yang: fix "minimum-ttl" missing default value

Just like other parameters of bfd, "minimum-ttl" should also have
a default value. Parameters with default value will not be displayed
in running configuration.

Additionly adjust the other "range" with double quotation marks.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agoMerge pull request #10406 from idryzhov/zebra-opaque-memleak
Donatas Abraitis [Mon, 24 Jan 2022 07:38:54 +0000 (09:38 +0200)]
Merge pull request #10406 from idryzhov/zebra-opaque-memleak

zebra: fix opaque data memleak

3 years agoMerge pull request #10318 from donaldsharp/redistribution
Russ White [Mon, 24 Jan 2022 03:30:24 +0000 (22:30 -0500)]
Merge pull request #10318 from donaldsharp/redistribution

OSPF Redistribution

3 years agoMerge pull request #10352 from ton31337/fix/autocomplete_neighbor_peergroup
Russ White [Mon, 24 Jan 2022 03:29:44 +0000 (22:29 -0500)]
Merge pull request #10352 from ton31337/fix/autocomplete_neighbor_peergroup

bgpd: Add peer-groups to neighbor autocomplete

3 years agoMerge pull request #10348 from ton31337/fix/gr_dynamic_neighbors2
Russ White [Mon, 24 Jan 2022 03:28:34 +0000 (22:28 -0500)]
Merge pull request #10348 from ton31337/fix/gr_dynamic_neighbors2

bgpd: Graceful-restart / LLGR with dynamic peers

3 years agobfdd: correct one word of comment
anlan_cs [Mon, 24 Jan 2022 01:25:21 +0000 (20:25 -0500)]
bfdd: correct one word of comment

Signed-off-by: anlan_cs <vic.lan@pica8.com>
3 years agozebra: fix vrf deletion 10412/head
Igor Ryzhov [Sun, 23 Jan 2022 22:51:10 +0000 (01:51 +0300)]
zebra: fix vrf deletion

VRF deletion code must be called after the corresponding interface
deletion code.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: fix crash on "ospf send-extra-data zebra" 10407/head
Igor Ryzhov [Sun, 23 Jan 2022 13:10:55 +0000 (16:10 +0300)]
ospfd: fix crash on "ospf send-extra-data zebra"

`ospf->new_table` is NULL if the OSPF instance has no routes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agozebra: fix opaque data memleak 10406/head
Igor Ryzhov [Sun, 23 Jan 2022 12:39:04 +0000 (15:39 +0300)]
zebra: fix opaque data memleak

Opaque data should be freed together with route entry in case of errors.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Show negative form of capability extended-nexthop for interface peers 10402/head
Donatas Abraitis [Fri, 21 Jan 2022 21:31:58 +0000 (23:31 +0200)]
bgpd: Show negative form of capability extended-nexthop for interface peers

```
exit1-debian-11(config-router)# neighbor 192.168.100.3 remote-as external
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
 neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# no neighbor 192.168.100.3 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor eth0 interface remote-as external
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
exit1-debian-11(config-router)# no neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)# do sh run | include extended
 no neighbor eth0 capability extended-nexthop
exit1-debian-11(config-router)#
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #10398 from patrasar/pim_debug_fix
Quentin Young [Fri, 21 Jan 2022 19:08:48 +0000 (14:08 -0500)]
Merge pull request #10398 from patrasar/pim_debug_fix

3 years agoMerge pull request #8011 from donaldsharp/starvation
Jafar Al-Gharaibeh [Fri, 21 Jan 2022 15:01:42 +0000 (09:01 -0600)]
Merge pull request #8011 from donaldsharp/starvation

lib: Figure out if we are being starved for cpu

3 years agopimd: debug pim fixes 10398/head
sarita patra [Fri, 21 Jan 2022 11:02:16 +0000 (03:02 -0800)]
pimd: debug pim fixes

Enable debug commands "debug pim packetdump send" and
"debug pim packetdump receive" in config mode.

Display "debug pim nht rp" in show running config.

Signed-off-by: sarita patra <saritap@vmware.com>
3 years agoMerge pull request #10392 from pguibert6WIND/isis_vrf_change
Igor Ryzhov [Thu, 20 Jan 2022 17:47:33 +0000 (20:47 +0300)]
Merge pull request #10392 from pguibert6WIND/isis_vrf_change

3 years agotopotests: apply bgp maximum-prefix-out without clearing the neighbor
Louis Scalbert [Thu, 21 Oct 2021 14:54:23 +0000 (16:54 +0200)]
topotests: apply bgp maximum-prefix-out without clearing the neighbor

The current maximum-prefix-out topo-test starts a configuration with a
maximum-prefix-out.

Test the application of new maximum-prefix-out value without clearing
the neighbor.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
3 years agobgpd: apply maximum-prefix-out without clearing the neighbor
Louis Scalbert [Wed, 20 Oct 2021 14:26:30 +0000 (16:26 +0200)]
bgpd: apply maximum-prefix-out without clearing the neighbor

Abstract:
- The command "neighbor PEER maximum-prefix-out NUMBER" cannot be applied
  without clearing the BGP neighbor.
- Apply the maximum-prefix-out value as soon as it is modified without
  clearing the neighbor.

subgroup_update_packet() and subgroup_withdraw_packet() respectively
manages the announcement and withdrawal BGP message to the peer.
subgrp->scount counter counts the number of sent prefixes.

Before the patch, the maximum out prefix limitation was applied in
subgroup_update_packet() in order that subgrp->scount never exceeds the
limit. Setting a limit inferior to the effective number of sent prefix
did not result in sending any withdrawal message to reduce the number of
sent prefixes. Without clearing the BGP neighbor, the limitation only
applied to the announcement of new prefixes when the limitation was
over.

With the patch, the limitation is checked in subgroup_announce_check().
The function is intended to say whether a prefix has to be announced in
regards to the prefix-list, route-map... Now when a maximum-prefix-out
value is changed/removed, the neighbor AFI/SAFI table is re-parsed in
the same way as for the application of route-map, prefix-lists...

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>