]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
19 months agoMerge pull request #12114 from opensourcerouting/feature/bgp_aigp_attribute
Russ White [Mon, 31 Oct 2022 15:24:43 +0000 (11:24 -0400)]
Merge pull request #12114 from opensourcerouting/feature/bgp_aigp_attribute

bgpd: Implement AIGP

19 months agoMerge pull request #12195 from anlancs/fix/ospfd-missing-max-metric
Donald Sharp [Mon, 31 Oct 2022 11:40:26 +0000 (07:40 -0400)]
Merge pull request #12195 from anlancs/fix/ospfd-missing-max-metric

ospfd: fix missing max-metric in show running config

19 months agoMerge pull request #12226 from spk-hebbar/zebra_fpm
Donatas Abraitis [Mon, 31 Oct 2022 11:12:58 +0000 (13:12 +0200)]
Merge pull request #12226 from spk-hebbar/zebra_fpm

zebra: Remove duplicate update of msg_type

19 months agoMerge pull request #12232 from anlancs/fix/doc-ospfd-max-metric
Donatas Abraitis [Mon, 31 Oct 2022 11:12:43 +0000 (13:12 +0200)]
Merge pull request #12232 from anlancs/fix/doc-ospfd-max-metric

doc: fix ospf's max-metric command

19 months agodoc: fix ospf's max-metric command
anlan_cs [Mon, 31 Oct 2022 08:03:04 +0000 (04:03 -0400)]
doc: fix ospf's max-metric command

"on-shutdown" and "on-startup" have the different timeout range.

Correct the timeout range for "on-shutdown" based on the current code:

```
(ospf)  max-metric router-lsa on-shutdown (5-100)
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
19 months agoMerge pull request #12230 from cscarpitta/fix/replace-inet-top-in-srv6-lib
mobash-rasool [Mon, 31 Oct 2022 06:34:26 +0000 (12:04 +0530)]
Merge pull request #12230 from cscarpitta/fix/replace-inet-top-in-srv6-lib

lib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx

19 months agolib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx
Carmine Scarpitta [Sun, 30 Oct 2022 08:15:06 +0000 (09:15 +0100)]
lib: Use `%pI6`/`%pI4` to print SRv6 seg6local ctx

This commit changes `seg6local_context2str()` to use `%pI6`/`%pI4`
instead of `inet_ntop` to print the SRv6 seg6local context information.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoMerge pull request #12224 from cscarpitta/fix/enhance-srv6-locator-chunk-free-api
Donald Sharp [Sat, 29 Oct 2022 23:56:07 +0000 (19:56 -0400)]
Merge pull request #12224 from cscarpitta/fix/enhance-srv6-locator-chunk-free-api

bgpd: Enhance the `srv6_locator_chunk_free()` API by automatically setting the pointer to the freed memory to `NULL`

19 months agoMerge pull request #12215 from LabNConsulting/working/lb/ospf-allow-for-zero
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:58:50 +0000 (16:58 -0500)]
Merge pull request #12215 from LabNConsulting/working/lb/ospf-allow-for-zero

ospfd: remove asster on zero length LSA - which is permitted by spec

19 months agoMerge pull request #12222 from LabNConsulting/working/lb/fix-p2X-acks
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:57:12 +0000 (16:57 -0500)]
Merge pull request #12222 from LabNConsulting/working/lb/fix-p2X-acks

ospfd: fix bug where acks were not be generated to incoming P2P/P2MP peers

19 months agozebra: Remove duplicate updation of msg_type
Spoorthi K [Sat, 29 Oct 2022 17:55:03 +0000 (23:25 +0530)]
zebra: Remove duplicate updation of msg_type

Signed-off-by: Spoorthi K <spk@redhat.com>
19 months agoospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors
Lou Berger [Sat, 29 Oct 2022 17:17:56 +0000 (17:17 +0000)]
ospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoMerge pull request #12220 from spk-hebbar/patch-1
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 17:02:21 +0000 (12:02 -0500)]
Merge pull request #12220 from spk-hebbar/patch-1

doc: Update with right default FPM server port

19 months agobgpd: Don't check for NULL when removing chunks
Carmine Scarpitta [Sat, 29 Oct 2022 15:31:16 +0000 (17:31 +0200)]
bgpd: Don't check for NULL when removing chunks

`srv6_locator_chunk_free()` is a wrapper around the `XFREE()` macro.
Passing a NULL pointer to `XFREE()` is safe. Therefore, checking that
the pointer passed to the `srv6_locator_chunk_free()` is not null is
unnecessary.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agobgpd: Do not set chunk pointer to NULL after free
Carmine Scarpitta [Sat, 29 Oct 2022 15:23:59 +0000 (17:23 +0200)]
bgpd: Do not set chunk pointer to NULL after free

`srv6_locator_chunk_free()` takes care of freeing the memory allocated
for a `struct srv6_locator_chunk` and setting the
`struct srv6_locator_chunk` pointer to NULL.

It is not necessary to explicitly set the pointer to NULL after invoking
`srv6_locator_chunk_free()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agolib, bgpd: Enhance `srv6_locator_chunk_free()` API
Carmine Scarpitta [Sat, 29 Oct 2022 15:04:35 +0000 (17:04 +0200)]
lib, bgpd: Enhance `srv6_locator_chunk_free()` API

A programmer can use the `srv6_locator_chunk_free()` function to free
the memory allocated for a `struct srv6_locator_chunk`.

The programmer invokes `srv6_locator_chunk_free()` by passing a single
pointer to the `struct srv6_locator_chunk` to be freed.
`srv6_locator_chunk_free()` uses `XFREE()` to free the memory.
It is the responsibility of the programmer to set the
`struct srv6_locator_chunk` pointer to NULL after freeing memory with
`srv6_locator_chunk_free()`.

This commit modifies the `srv6_locator_chunk_free()` function to take a
double pointer instead of a single pointer. In this way, setting the
`struct srv6_locator_chunk` pointer to NULL is no longer the
programmer's responsibility but is the responsibility of
`srv6_locator_chunk_free()`. This prevents programmers from making
mistakes such as forgetting to set the pointer to NULL after invoking
`srv6_locator_chunk_free()`.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
19 months agoMerge pull request #12172 from LabNConsulting/working/lb/api-zero-len-del-flag
Russ White [Sat, 29 Oct 2022 14:38:27 +0000 (10:38 -0400)]
Merge pull request #12172 from LabNConsulting/working/lb/api-zero-len-del-flag

OSPF opaques LSA API - fix bug with LL API delete, add option for zero data length withdrawals

19 months agoospfd: catch and report runt LSAs
Lou Berger [Fri, 28 Oct 2022 16:06:04 +0000 (16:06 +0000)]
ospfd: catch and report runt LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agodoc: Update with right default FPM server port
Spoorthi K [Sat, 29 Oct 2022 08:39:00 +0000 (14:09 +0530)]
doc: Update with right default FPM server port

Signed-off-by: Spoorthi K <spk@redhat.com>
19 months agoospfd: remove assert on zero length LSA - which is permitted by spec
Lou Berger [Thu, 27 Oct 2022 19:12:23 +0000 (19:12 +0000)]
ospfd: remove assert on zero length LSA - which is permitted by spec

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoMerge pull request #12216 from donaldsharp/language_none
David Lamparter [Fri, 28 Oct 2022 09:56:26 +0000 (11:56 +0200)]
Merge pull request #12216 from donaldsharp/language_none

19 months agoMerge pull request #12154 from louis-6wind/fix-te-default-bandwidth
Olivier Dugeon [Fri, 28 Oct 2022 07:29:12 +0000 (09:29 +0200)]
Merge pull request #12154 from louis-6wind/fix-te-default-bandwidth

lib: fix the default TE bandwidth

19 months agoMerge pull request #12128 from donaldsharp/pim_br_fix_crash
mobash-rasool [Fri, 28 Oct 2022 05:47:10 +0000 (11:17 +0530)]
Merge pull request #12128 from donaldsharp/pim_br_fix_crash

pimd: Remove pim_br vestiges

19 months agoMerge pull request #12176 from sworleys/BGP-InQ
Russ White [Thu, 27 Oct 2022 20:13:44 +0000 (16:13 -0400)]
Merge pull request #12176 from sworleys/BGP-InQ

bgpd,doc: limit InQ buf to allow for back pressure

19 months agodoc: `debug zebra pbr` does not need to be documented in 2 places
Donald Sharp [Thu, 27 Oct 2022 20:03:11 +0000 (16:03 -0400)]
doc: `debug zebra pbr` does not need to be documented in 2 places

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agodoc: Remove `language = none` as that sphinx no longer needs this line
Donald Sharp [Thu, 27 Oct 2022 19:59:57 +0000 (15:59 -0400)]
doc: Remove `language = none` as that sphinx no longer needs this line

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agopimd: Remove pim_br vestiges
Donald Sharp [Thu, 13 Oct 2022 19:54:43 +0000 (15:54 -0400)]
pimd: Remove pim_br vestiges

If PIM had received a register packet with the Border Router
bit set, pimd would have crashed.  Since I wrote this code
in 2015 and really have pretty much no memory of this and
no-one has ever reported this crash, let's just remove this
code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoMerge pull request #12211 from SaiGomathiN/coverity
Donatas Abraitis [Thu, 27 Oct 2022 17:04:21 +0000 (18:04 +0100)]
Merge pull request #12211 from SaiGomathiN/coverity

pimd: fixing some coverity issues

19 months agoMerge pull request #12212 from donaldsharp/clarify_issue
Donatas Abraitis [Thu, 27 Oct 2022 17:01:44 +0000 (18:01 +0100)]
Merge pull request #12212 from donaldsharp/clarify_issue

bgpd: Clarify what NHT error message means

19 months agoMerge pull request #12200 from patrasar/pimv6_rp_iif_fix
Donatas Abraitis [Thu, 27 Oct 2022 16:59:50 +0000 (17:59 +0100)]
Merge pull request #12200 from patrasar/pimv6_rp_iif_fix

pimd, pim6d: Fix rp-info OIF having PIM disabled interface

19 months agotests: adapt cspf_topo1 to the default link-params bandwidth
Louis Scalbert [Thu, 27 Oct 2022 12:45:53 +0000 (14:45 +0200)]
tests: adapt cspf_topo1 to the default link-params bandwidth

Adapt cspf_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agotests: adapt ospf_te_topo1 to the default link-params bandwidth
Louis Scalbert [Thu, 27 Oct 2022 12:36:51 +0000 (14:36 +0200)]
tests: adapt ospf_te_topo1 to the default link-params bandwidth

Adapt ospf_te_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agotests: adapt isis_te_topo1 to the default link-params bandwidth
Louis Scalbert [Thu, 27 Oct 2022 12:06:50 +0000 (14:06 +0200)]
tests: adapt isis_te_topo1 to the default link-params bandwidth

adapt isis_te_topo1 to the default link-params bandwidth

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agolib: fix the default TE bandwidth
Louis Scalbert [Wed, 19 Oct 2022 12:34:43 +0000 (14:34 +0200)]
lib: fix the default TE bandwidth

When enabling the interface link-params, a default bandwidth is assigned
to the Max, Reservable and Unreserved Bandwidth variables. If the
bandwidth is set at in the interface context, this value is used.
Otherwise, a default bandwidth value of 10 Gbps is set.

Revert the default value to 10 Mbps as it was intended in the initial
commit. 10 Mbps is a low value so that the link will not be prioritized
when computing the paths.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agoMerge pull request #12210 from louis-6wind/fix-link-params-coverity
Olivier Dugeon [Thu, 27 Oct 2022 14:01:42 +0000 (16:01 +0200)]
Merge pull request #12210 from louis-6wind/fix-link-params-coverity

lib: fix coverity scan failure in zebra_interface_link_params_read()

19 months agobgpd: Clarify what NHT error message means
Donald Sharp [Thu, 27 Oct 2022 13:21:41 +0000 (09:21 -0400)]
bgpd: Clarify what NHT error message means

When waiting on a path to reach the peer, modify the debug/show
output to give a better understanding to the operator about what
they should be looking for.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agopimd: Dereference before null check
Sai Gomathi N [Thu, 27 Oct 2022 09:36:00 +0000 (02:36 -0700)]
pimd: Dereference before null check

In pim_ecmp_nexthop_search: All paths that lead to this null pointer comparison already dereference the pointer earlier
There may be a null pointer dereference, or else the comparison against null is unnecessary.

Coverity CID-1519749

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
19 months agopimd: Unchecked return value
Sai Gomathi N [Thu, 27 Oct 2022 08:52:31 +0000 (01:52 -0700)]
pimd: Unchecked return value

In tib_sg_oil_setup: Value returned from a function is not checked for errors before being used.
If the function returns an error value, the error value may be mistaken for a normal value.
Here, only the nexthop value is being used. So casted the return type to void.

Coverity CID-1519816

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
19 months agolib: fix coverity scan failure in zebra_interface_link_params_read()
Louis Scalbert [Thu, 27 Oct 2022 08:11:25 +0000 (10:11 +0200)]
lib: fix coverity scan failure in zebra_interface_link_params_read()

The code was working but the coverity scan reported a failure.

Clarify the code to make the coverity scan happy.

Fixes: fe0a129687 ("lib,zebra: link-params are not flushed after no enable")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agoMerge pull request #12205 from proelbtn/fix-ipv4-vpn-nexthop-over-ipv6-peer
Donatas Abraitis [Thu, 27 Oct 2022 06:47:24 +0000 (07:47 +0100)]
Merge pull request #12205 from proelbtn/fix-ipv4-vpn-nexthop-over-ipv6-peer

bgpd: Fix the condition whether nexthop is changed

19 months agoMerge pull request #12204 from taspelund/soo_ip_fix
Donatas Abraitis [Thu, 27 Oct 2022 06:27:41 +0000 (07:27 +0100)]
Merge pull request #12204 from taspelund/soo_ip_fix

bgpd: Check for IP-format Site-of-Origin

19 months agoMerge pull request #12201 from donaldsharp/clang-16-robots
Jafar Al-Gharaibeh [Thu, 27 Oct 2022 04:07:05 +0000 (23:07 -0500)]
Merge pull request #12201 from donaldsharp/clang-16-robots

Clang 16 robots

19 months agoMerge pull request #12190 from manojvn/468074
Jafar Al-Gharaibeh [Thu, 27 Oct 2022 04:05:47 +0000 (23:05 -0500)]
Merge pull request #12190 from manojvn/468074

ospf6d: Fix for memory leak issues in ospf6.

19 months agoMerge pull request #12179 from LabNConsulting/working/lb/p2mp-improvements
Jafar Al-Gharaibeh [Thu, 27 Oct 2022 03:46:10 +0000 (22:46 -0500)]
Merge pull request #12179 from LabNConsulting/working/lb/p2mp-improvements

  ospf: optimization for FRR's P2MP mode

19 months agobgpd: Fix the condition whether nexthop is changed
Ryoga Saito [Thu, 27 Oct 2022 01:17:50 +0000 (10:17 +0900)]
bgpd: Fix the condition whether nexthop is changed

Given that the following topology, route server MUST not modify NEXT_HOP
attribute because route server isn't in the actual routing path. This
behavior is required to comply RFC7947

(Router A) <-(eBGP peer)-> (Route Server) <-(eBGP peer)-> (Router B)

RFC7947 says as follows:

> As the route server does not participate in the actual routing of
> traffic, the NEXT_HOP attribute MUST be passed unmodified to the route
> server clients, similar to the "third-party" next-hop
> feature described in Section 5.1.3. of [RFC4271].

However, current FRR is violating RFC7947 in some cases. If routers and
route server established BGP peer over IPv6 connection and routers
advertise ipv4-vpn routes through route server, route server will modify
NEXT_HOP attribute in these advertisements.

This is because the condition to check whether NEXT_HOP attribute should
be changed or not is wrong. We should use (afi, safi) as the key to
check, but (nhafi, safi) is actually used. This causes the RFC7947
violation.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
19 months agobgpd: Check for IP-format Site-of-Origin
Trey Aspelund [Wed, 26 Oct 2022 20:53:09 +0000 (20:53 +0000)]
bgpd: Check for IP-format Site-of-Origin

When deciding whether to apply "neighbor soo" filtering towards a peer,
we were only looking for SoO ecoms that use either AS or AS4 encoding.
This makes sure we also check for IPv4 encoding, since we allow a user
to configure that encoding style against the peer.

Config:
```
router bgp 1
 address-family ipv4 unicast
  network 100.64.0.2/32 route-map soo-foo
  neighbor 192.168.122.12 soo 3.3.3.3:20
 exit-address-family
!
route-map soo-foo permit 10
 set extcommunity soo 3.3.3.3:20
exit
```

Before:
```
ub20# show ip bgp neighbors 192.168.122.12 advertised-routes
BGP table version is 5, local router ID is 100.64.0.222, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

    Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0    100  32768 i
*> 100.64.0.2/32    0.0.0.0                  0    100  32768 i

Total number of prefixes 2
```

After:
```
ub20# show ip bgp neighbors 192.168.122.12 advertised-routes
BGP table version is 5, local router ID is 100.64.0.222, vrf id 0
Default local pref 100, local AS 1
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

    Network          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0    100  32768 i

Total number of prefixes 1
```

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
19 months agobgpd: make the input-queue log more understandable
Stephen Worley [Wed, 26 Oct 2022 17:23:21 +0000 (13:23 -0400)]
bgpd: make the input-queue log more understandable

Make the input-queue log a bit more understandble to a person
debugging an issue.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
19 months agoMerge pull request #12199 from tewok/frr-routes-table-columns
Russ White [Wed, 26 Oct 2022 13:48:41 +0000 (09:48 -0400)]
Merge pull request #12199 from tewok/frr-routes-table-columns

bgpd: fixed misaligned columns in BGP routes table

19 months agoospfd: fix missing max-metric in show running config
anlan_cs [Tue, 25 Oct 2022 06:48:06 +0000 (02:48 -0400)]
ospfd: fix missing max-metric in show running config

```
(ospf)  max-metric router-lsa administrative
```

Currently this running config depends at least one `area` with *active*
`network`, otherwise it will not occur.

The check on this dependency is redundant and wrong, just remove it.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
19 months agoospf6d: Make ospf6d happy with clang-16
Donald Sharp [Wed, 26 Oct 2022 11:41:03 +0000 (07:41 -0400)]
ospf6d: Make ospf6d happy with clang-16

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agoldpd: Make ldpd happy with clang-16
Donald Sharp [Wed, 26 Oct 2022 11:40:48 +0000 (07:40 -0400)]
ldpd: Make ldpd happy with clang-16

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
19 months agopimd: Make pimd happy with clang-16
Donald Sharp [Wed, 26 Oct 2022 11:39:47 +0000 (07:39 -0400)]
pimd: Make pimd happy with clang-16

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
19 months agopathd: Make pathd happy with clang-16
Donald Sharp [Wed, 26 Oct 2022 11:39:14 +0000 (07:39 -0400)]
pathd: Make pathd happy with clang-16

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
19 months agobgpd: Implement Accumulated IGP Metric Attribute for BGP
Donatas Abraitis [Wed, 12 Oct 2022 18:06:47 +0000 (21:06 +0300)]
bgpd: Implement Accumulated IGP Metric Attribute for BGP

https://www.rfc-editor.org/rfc/rfc7311.html

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agodoc: Add documentation for AIGP
Donatas Abraitis [Wed, 12 Oct 2022 18:04:35 +0000 (21:04 +0300)]
doc: Add documentation for AIGP

bgp bestpath aigp
neighbor PEER aigp

route-map X permit 10
 set aigp-metric <igp-metric|VALUE>

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agolib: Add ptr_get_be64() function
Donatas Abraitis [Wed, 12 Oct 2022 18:03:42 +0000 (21:03 +0300)]
lib: Add ptr_get_be64() function

Get a single uint64_t value from two uint32_t values.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
19 months agopimd, pim6d: Fix rp-info OIF having PIM disabled interface
Sarita Patra [Wed, 26 Oct 2022 04:25:23 +0000 (21:25 -0700)]
pimd, pim6d: Fix rp-info OIF having PIM disabled interface

Problem:
frr(config)# show ip pim rp-info
RP address group/prefix-list OIF I am RP Source Group-Type
109.0.0.3 224.0.0.0/4 ens192 no Static ASM

frr(config)# int ens192
frr(config-if)# no ip pim

frr(config) show ip pim rp-info
RP address group/prefix-list OIF I am RP Source Group-Type
109.0.0.3 224.0.0.0/4 ens192 no Static ASM

rp-info OIF is still having ens192 which is PIM disabled.
Fixing this as part of this PR.

Issue: #12044

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agoisisd: Make clang-16 compiler happy with isisd
Donald Sharp [Wed, 26 Oct 2022 00:06:49 +0000 (20:06 -0400)]
isisd: Make clang-16 compiler happy with isisd

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
19 months agopceplib: Fix clang-16 not happy with build
Donald Sharp [Wed, 26 Oct 2022 00:04:43 +0000 (20:04 -0400)]
pceplib: Fix clang-16 not happy with build

In this case it was functions without a prototype

Signed-off-by: Donald Sharp <donaldsharp72@gmail.com>
19 months agoMerge pull request #12166 from anlancs/fix/bgpd-wildcard
Russ White [Tue, 25 Oct 2022 15:34:38 +0000 (11:34 -0400)]
Merge pull request #12166 from anlancs/fix/bgpd-wildcard

bgpd: return failure for wildcard ERT

19 months agoospf: optimization for FRR's P2MP mode
Lou Berger [Fri, 21 Oct 2022 20:35:13 +0000 (20:35 +0000)]
ospf: optimization for FRR's P2MP mode

FRR implements a non-standard, but compatible approach for
sending update LSAs (it always send to 224.0.0.5) on P2MP
interfaces. This change makes it so acks are also sent to
224.0.0.5.

Since the acks are multicast, this allows an optimization
where we don't send back out the incoming P2MP interface
immediately allow time to rx multicast ack from neighbors
on the same net that rx'ed the original (multicast) update.

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agotopotests: test_ospf_p2mp.py - check for full adjacencies and basic DB info
Lou Berger [Fri, 21 Oct 2022 16:44:45 +0000 (16:44 +0000)]
topotests: test_ospf_p2mp.py - check for full adjacencies and basic DB info

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoMerge pull request #12187 from mjstapp/mjs_fix_bgp_allowas
Russ White [Tue, 25 Oct 2022 15:26:06 +0000 (11:26 -0400)]
Merge pull request #12187 from mjstapp/mjs_fix_bgp_allowas

bgpd: fix unconfig of allowas_in; add to show output

19 months agoMerge pull request #12184 from nberlee/master
mobash-rasool [Tue, 25 Oct 2022 15:23:50 +0000 (20:53 +0530)]
Merge pull request #12184 from nberlee/master

vtysh: Ensure an empty string does not get printed for host/domain

19 months agobgpd: fixed misaligned columns in BGP routes table
Wayne Morrison [Tue, 25 Oct 2022 14:45:35 +0000 (10:45 -0400)]
bgpd: fixed misaligned columns in BGP routes table

Column headers in BGP routes table are not aligned with data when
RPKI status is available.  This was fixed to insert a space at the
beginning of the header and at the beginning of lines that do not
have RPKI status.

This fix requires that several testing templates be adjusted to
match the new output.

Signed-off-by: Wayne Morrison <wmorrison@netgate.com>
19 months agoMerge pull request #12069 from opensourcerouting/fix/local-as_reset
Russ White [Tue, 25 Oct 2022 13:50:24 +0000 (09:50 -0400)]
Merge pull request #12069 from opensourcerouting/fix/local-as_reset

bgpd: Reuse flag action for reseting session for `neighbor PEER local-as`

19 months agoMerge pull request #12142 from opensourcerouting/fix/sendholdtimer
Russ White [Tue, 25 Oct 2022 13:46:48 +0000 (09:46 -0400)]
Merge pull request #12142 from opensourcerouting/fix/sendholdtimer

bgpd: Honor default holdtime when triggering session reset for SendHoldTimer

19 months agoMerge pull request #12151 from louis-6wind/fix-mpls-te
Olivier Dugeon [Tue, 25 Oct 2022 11:51:24 +0000 (13:51 +0200)]
Merge pull request #12151 from louis-6wind/fix-mpls-te

isisd: fixes for mpls-te

19 months agoMerge pull request #12125 from louis-6wind/fix-link-params
Olivier Dugeon [Tue, 25 Oct 2022 08:53:23 +0000 (10:53 +0200)]
Merge pull request #12125 from louis-6wind/fix-link-params

lib,zebra,ospf: link-params are not flushed after "no enable"

19 months agoospf6d: Fix for memory leak issues in ospf6.
Manoj Naragund [Tue, 25 Oct 2022 07:43:10 +0000 (00:43 -0700)]
ospf6d: Fix for memory leak issues in ospf6.

Problem:
Multiple memory leaks in ospf6.

 260 ==6637== 32 bytes in 1 blocks are definitely lost in loss record 5 of 24
 261 ==6637==    at 0x4C31FAC: calloc (vg_replace_malloc.c:762)
 262 ==6637==    by 0x4E8A1BF: qcalloc (memory.c:111)
 263 ==6637==    by 0x11EE27: ospf6_summary_add_aggr_route_and_blackhole (ospf6_asbr.c:2779)
 264 ==6637==    by 0x11EEBA: ospf6_originate_new_aggr_lsa (ospf6_asbr.c:2811)
 265 ==6637==    by 0x4E7C6A7: hash_clean (hash.c:325)
 266 ==6637==    by 0x11FA93: ospf6_handle_external_aggr_update (ospf6_asbr.c:3164)
 267 ==6637==    by 0x11FA93: ospf6_asbr_summary_process (ospf6_asbr.c:3386)
 268 ==6637==    by 0x4EB739B: thread_call (thread.c:1692)
 269 ==6637==    by 0x4E85B17: frr_run (libfrr.c:1068)
 270 ==6637==    by 0x119535: main (ospf6_main.c:228)

 356 ==6637== 240 bytes in 12 blocks are indirectly lost in loss record 13 of 24
 357 ==6637==    at 0x4C2FE96: malloc (vg_replace_malloc.c:309)
 358 ==6637==    by 0x4E8A0DA: qmalloc (memory.c:106)
 359 ==6637==    by 0x13545C: ospf6_lsa_alloc (ospf6_lsa.c:724)
 360 ==6637==    by 0x1354E3: ospf6_lsa_create_headeronly (ospf6_lsa.c:756)
 361 ==6637==    by 0x1355F2: ospf6_lsa_copy (ospf6_lsa.c:790)
 362 ==6637==    by 0x13B58B: ospf6_dbdesc_recv_slave (ospf6_message.c:976)
 363 ==6637==    by 0x13B58B: ospf6_dbdesc_recv (ospf6_message.c:1038)
 364 ==6637==    by 0x13B58B: ospf6_read_helper (ospf6_message.c:1838)
 365 ==6637==    by 0x13B58B: ospf6_receive (ospf6_message.c:1875)
 366 ==6637==    by 0x4EB739B: thread_call (thread.c:1692)
 367 ==6637==    by 0x4E85B17: frr_run (libfrr.c:1068)
 368 ==6637==    by 0x119535: main (ospf6_main.c:228)

RCA:
1. when the ospf6 area is being deleted, the neighbor related information
   was not being cleaned up.
2. when aggr route gets deleted from rt_aggr_tbl the corrsponding summary
   route attched to the aggr route was not being deleted.

Fix:
Added the ospf6_neighbor_delete in ospf6_area_delete to free the
neighbor related information and added ospf6_route_delete while
freeing external aggr route to free the summary route.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
19 months agovtysh: Ensure an empty string does not get printed for host/domain
Nico Berlee [Sun, 23 Oct 2022 14:42:51 +0000 (16:42 +0200)]
vtysh: Ensure an empty string does not get printed for host/domain

vtysh show running-config is showing:
frr version 8.3.1_git
frr defaults traditional
hostname test
log file /etc/frr/frr.log informational
log timestamp precision 3
domainname
service integrated-vtysh-config

domainname should not be printed in this case at all. If the
host has no search/domainname configured, frr_reload.py
crashes on invalid config from `vtysh show running-config`

Basically the same change as commit a7141b8

Signed-off-by: Nico Berlee <nico.berlee@on2it.net>
19 months agobgpd: checkpatch fixes in bgp_io code
Stephen Worley [Mon, 24 Oct 2022 21:35:04 +0000 (17:35 -0400)]
bgpd: checkpatch fixes in bgp_io code

Some checkpatch fixes for comments in the bgp_io code.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
19 months agobgpd,doc: limit InQ buf to allow for back pressure
Stephen Worley [Fri, 21 Oct 2022 16:45:50 +0000 (12:45 -0400)]
bgpd,doc: limit InQ buf to allow for back pressure

Add a default limit to the InQ for messages off the bgp peer
socket. Make the limit configurable via cli.

Adding in this limit causes the messages to be retained in the tcp
socket and allow for tcp back pressure and congestion control to kick
in.

Before this change, we allow the InQ to grow indefinitely just taking
messages off the socket and adding them to the fifo queue, never letting
the kernel know we need to slow down. We were seeing under high loads of
messages and large perf-heavy routemaps (regex matching) this queue
would cause a memory spike and BGP would get OOM killed. Modifying this
leaves the messages in the socket and distributes that load where it
should be in the socket buffers on both send/recv while we handle the
mesages.

Also, changes were made to allow the ringbuffer to hold messages and
continue to be filled by the IO pthread while we wait for the Main
pthread to handle the work on the InQ.

Memory spike seen with large numbers of routes flapping and route-maps
with dozens of regex matching:

```
Memory statistics for bgpd:
System allocator statistics:
  Total heap allocated:  > 2GB
  Holding block headers: 516 KiB
  Used small blocks:     0 bytes
  Used ordinary blocks:  160 MiB
  Free small blocks:     3680 bytes
  Free ordinary blocks:  > 2GB
  Ordinary blocks:       121244
  Small blocks:          83
  Holding blocks:        1
```

With most of it being held by the inQ (seen from the stream datastructure info here):

```
Type                          : Current#   Size       Total     Max#  MaxBytes
...
...
Stream                        :   115543 variable  26963208 15970740 3571708768
```

With this change that memory is capped and load is left in the sockets:

RECV Side:
```
State    Recv-Q    Send-Q                           Local Address:Port                         Peer Address:Port    Process
ESTAB    265350    0            [fe80::4080:30ff:feb0:cee3]%veth1:36950         [fe80::4c14:9cff:fe1d:5bfd]:179      users:(("bgpd",pid=1393334,fd=26))
         skmem:(r403688,rb425984,t0,tb425984,f1816,w0,o0,bl0,d61)

```

SEND Side:
```
State  Recv-Q  Send-Q                        Local Address:Port                  Peer Address:Port   Process
ESTAB  0       1275012   [fe80::4c14:9cff:fe1d:5bfd]%veth1:179    [fe80::4080:30ff:feb0:cee3]:36950   users:(("bgpd",pid=1393443,fd=27))
         skmem:(r0,rb131072,t0,tb1453568,f1916,w1300612,o0,bl0,d0)

```

Signed-off-by: Stephen Worley <sworley@nvidia.com>
19 months agobgpd: fix config of allowas_in; add to show output
Mark Stapp [Thu, 20 Oct 2022 20:47:12 +0000 (16:47 -0400)]
bgpd: fix config of allowas_in; add to show output

Ensure that un-configuring allowas-in for a peer or group
clears the related flags and integer value. Tighten the use
of the integer counter so that it's only used when the config
flag is set. Add show output if allowas-in is enabled.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
19 months agoMerge pull request #11673 from cscarpitta/srv6-per-vrf-sid
Donatas Abraitis [Mon, 24 Oct 2022 14:30:10 +0000 (17:30 +0300)]
Merge pull request #11673 from cscarpitta/srv6-per-vrf-sid

bgpd: add support for SRv6 L3VPN for IPv4 and IPv6 address families using a single SID

19 months agobgpd: return failure for wildcard ERT
anlan_cs [Fri, 21 Oct 2022 05:17:29 +0000 (01:17 -0400)]
bgpd: return failure for wildcard ERT

The "RTLIST..." list should be maintained integrity. If wildcard check
failed, it should immediately return failure. Otherwise user configuration
will be partial.

```
anlan(config-router-af)# route-target export *:55 33:33
% Wildcard '*' only applicable for import
anlan(config-router-af)# route-target both *:55 33:33
% Wildcard '*' only applicable for import
```

With this commit, the RTs without wildcard will not be executed as before. And
the same for `no` form.

Signed-off-by: anlan_cs <vic.lan@pica8.com>
19 months agoisisd: fix recreating the LS TED after re-enabling MPLS TE
Louis Scalbert [Mon, 17 Oct 2022 16:40:42 +0000 (18:40 +0200)]
isisd: fix recreating the LS TED after re-enabling MPLS TE

When disabling and re-enabling the "mpls-te on" command, the LS TED
database is deleted but not re-created.

Cleanup the LS TED database instead of deleting it when disabling
"mpls-te".

Fixes: 1fa6385040.. ("isisd: Correct Valgrind errors")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agoisisd: fix sending remote interface ip address after enabling MPLS TE
Louis Scalbert [Mon, 17 Oct 2022 15:35:12 +0000 (17:35 +0200)]
isisd: fix sending remote interface ip address after enabling MPLS TE

If MPLS TE is enabled, the router encodes the local and remote interface
IP address in the "Extended Reachability" TLV.

> east-vm(config)# do show isis database detail east-vm.00-00
>  Extended Reachability: 0007.e901.3333.00 (Metric: 10)
>    Local Interface IP Address(es): 10.126.0.2
>    Remote Interface IP Address(es): 10.126.0.3
>    Maximum Bandwidth: 1.76258e+08 (Bytes/sec)

The remote interface is added when the circuit adjacency comes up after
setting MPLS TE. However, if MPLS TE is enabled after, the remote
address is not added. It happens after disabling and re-enabling the
MPLS TE.

> east-vm(config)# router isis 1
> east-vm(config-router)# no mpls on
> east-vm(config-router)# mpls on
> east-vm(config)# do show isis database detail east-vm.00-00
>  Extended Reachability: 0007.e901.3333.00 (Metric: 10)
>    Local Interface IP Address(es): 10.126.0.2
>    Maximum Bandwidth: 1.76258e+08 (Bytes/sec)

Update the remote IPv4 and IPv6 of all adjacencies after enabling MPLS
TE.

Fixes: 1b3f47d04c ("isisd: Update TLVs processing for TE, RI & SR")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
19 months agoMerge pull request #12026 from kuldeepkash/bgp_local_asn
Donatas Abraitis [Mon, 24 Oct 2022 06:16:59 +0000 (09:16 +0300)]
Merge pull request #12026 from kuldeepkash/bgp_local_asn

tests: Add bgp local asn test suite

19 months agoMerge pull request #12173 from sworleys/VNI-chrstr-Fix
Donatas Abraitis [Mon, 24 Oct 2022 05:59:17 +0000 (08:59 +0300)]
Merge pull request #12173 from sworleys/VNI-chrstr-Fix

bgpd: fix vni_str NULL check in evpn rt show run

19 months agoMerge pull request #12178 from opensourcerouting/fix/revert_13111667513a0f91a8e875cdf...
Donald Sharp [Sun, 23 Oct 2022 19:13:26 +0000 (15:13 -0400)]
Merge pull request #12178 from opensourcerouting/fix/revert_13111667513a0f91a8e875cdf12c940ea2b60b05

Revert "doc: Add `neighbor PEER extended-optional-parameters` command"

19 months agoRevert "doc: Add `neighbor PEER extended-optional-parameters` command"
Donatas Abraitis [Fri, 21 Oct 2022 18:45:29 +0000 (21:45 +0300)]
Revert "doc: Add `neighbor PEER extended-optional-parameters` command"

I don't know how I missed that it was already defined. Let's just revert it.

This reverts commit 13111667513a0f91a8e875cdf12c940ea2b60b05.

19 months agotopotest: ospfapi - test opaque all type add/withdrawals, with and wo zero length
Lou Berger [Wed, 19 Oct 2022 20:26:13 +0000 (20:26 +0000)]
topotest: ospfapi - test opaque all type add/withdrawals, with and wo zero length

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoospfd/ospfclient: add option to flush/withdrawal with zero length
Lou Berger [Sun, 16 Oct 2022 15:19:37 +0000 (15:19 +0000)]
ospfd/ospfclient: add option to flush/withdrawal with zero length

default behavior is unchanged, i.e., to not zero

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agobgpd: fix vni_str NULL check in evpn rt show run
Stephen Worley [Fri, 21 Oct 2022 15:18:12 +0000 (11:18 -0400)]
bgpd: fix vni_str NULL check in evpn rt show run

Fix the vni_str NULL check for wildcard route-targets
in evpn show run. This will never be NULL if we add 1
here. Though it should also never be NULL since ":" should
always exist. Better to be safe than sorry.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
19 months agoospfd: ospf_apiserver.c - fix link local opaque LSA delete
Lou Berger [Fri, 21 Oct 2022 11:12:11 +0000 (11:12 +0000)]
ospfd: ospf_apiserver.c - fix link local opaque LSA delete

Signed-off-by: Lou Berger <lberger@labn.net>
19 months agoMerge pull request #12094 from patrasar/pimv6_rp_linklocal
Donatas Abraitis [Fri, 21 Oct 2022 07:34:28 +0000 (10:34 +0300)]
Merge pull request #12094 from patrasar/pimv6_rp_linklocal

pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP

19 months agoMerge pull request #11600 from patrasar/pimv6_bsm_clis
Donatas Abraitis [Fri, 21 Oct 2022 06:41:22 +0000 (09:41 +0300)]
Merge pull request #11600 from patrasar/pimv6_bsm_clis

pim6d:  BSM CLIs implementation

19 months agoMerge pull request #12140 from opensourcerouting/fix/watchfrr_dont_givup
Jafar Al-Gharaibeh [Fri, 21 Oct 2022 04:46:47 +0000 (23:46 -0500)]
Merge pull request #12140 from opensourcerouting/fix/watchfrr_dont_givup

watchfrr: Delay restart_kill if still reading configuration

19 months agoMerge pull request #12160 from donaldsharp/debug_nh_fix
Jafar Al-Gharaibeh [Fri, 21 Oct 2022 04:43:46 +0000 (23:43 -0500)]
Merge pull request #12160 from donaldsharp/debug_nh_fix

Debug nh fix

19 months agotests: Add lib changes to support bgp local asn feature
Kuldeep Kashyap [Tue, 27 Sep 2022 03:27:02 +0000 (08:57 +0530)]
tests: Add lib changes to support bgp local asn feature

Added lib changes to support bgp local
asn feature config changes

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
19 months agotests: Add bgp local asn test suite
Kuldeep Kashyap [Tue, 27 Sep 2022 03:25:28 +0000 (08:55 +0530)]
tests: Add bgp local asn test suite

Adding test to verify functionality
of local asn bgp feature.

Signed-off-by: Kuldeep Kashyap <kashyapk@vmware.com>
19 months agoMerge pull request #12155 from LabNConsulting/working/lb/opaque-lsa-zero-len
Jafar Al-Gharaibeh [Thu, 20 Oct 2022 14:19:45 +0000 (09:19 -0500)]
Merge pull request #12155 from LabNConsulting/working/lb/opaque-lsa-zero-len

OSPF: allow for zero length opaque LSAs

19 months agolib: Remove unnecessary comparison, for linked list
Donald Sharp [Wed, 19 Oct 2022 16:57:28 +0000 (12:57 -0400)]
lib: Remove unnecessary comparison, for linked list

In the comparison function for a linked list code was
always checking against passed in NULL's.  The comparison
function will never receive a NULL value for data from
the linklist.c code.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agozebra: Fix debug of filtering out prefix due to routemap
Donald Sharp [Wed, 19 Oct 2022 16:44:55 +0000 (12:44 -0400)]
zebra: Fix debug of filtering out prefix due to routemap

The debug for notification about a filtered prefix was
just printing the nexthop ifindex and vrf id.  Not all
nexthops have this data.  Just print out the actual nexthop

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
19 months agopimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP
Sarita Patra [Tue, 11 Oct 2022 01:38:14 +0000 (18:38 -0700)]
pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP

Problem:
=======
frr(config)# do show ipv6 pim interface
 Interface  State  Address                   PIM Nbrs  PIM DR  FHR  IfChannels
 ens192     up     fe80::250:56ff:feb7:3619  0         local   0    1

Configure ens192 interface link-local address as RP.
frr(config)# ipv6 pim rp fe80::250:56ff:feb7:3619
No Path to RP address specified: fe80::250:56ff:feb7:3619

frr(config)# do show ipv6 pim rp-info
 RP address                group/prefix-list  OIF      I am RP  Source  Group-Type
 fe80::250:56ff:feb7:3619  ff00::/8           Unknown  yes      Static  ASM

Fix:
===
RP should not be link-local, multicast and unspecified address.

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopimd, pim6d: Define pim_addr_is_multicast API
Sarita Patra [Thu, 13 Oct 2022 04:37:28 +0000 (21:37 -0700)]
pimd, pim6d: Define pim_addr_is_multicast API

pim_addr_is_multicast API will check if the address is multicast
address or not.

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopim6d: Update BSM cli/show/debug commands in pimv6.rst
Sarita Patra [Thu, 14 Jul 2022 12:11:51 +0000 (05:11 -0700)]
pim6d: Update BSM cli/show/debug commands in pimv6.rst

Update the below commands in pimv6.rst
ipv6 pim bsm
ipv6 unicast-bsm
show ipv6 pim bsr
show ipv6 pim bsrp-info
show ipv6 pim bsm-database
debug pimv6 bsm

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopim6d: Add "show ipv6 pim bsrp-info [vrf NAME] [json]" cli
Sarita Patra [Tue, 12 Jul 2022 14:44:40 +0000 (07:44 -0700)]
pim6d: Add "show ipv6 pim bsrp-info [vrf NAME] [json]" cli

Signed-off-by: Sarita Patra <saritap@vmware.com>
19 months agopim6d: Add "[no] debug pimv6 bsm" cli
Sarita Patra [Tue, 12 Jul 2022 13:48:33 +0000 (06:48 -0700)]
pim6d: Add "[no] debug pimv6 bsm" cli

The cli "[no] debug pimv6 bsm" is used to enable/
disable bsm debugs for PIMV6

Signed-off-by: Sarita Patra <saritap@vmware.com>