Loïc Sang [Mon, 6 May 2024 15:30:01 +0000 (17:30 +0200)]
if: fix same connected address
Using the same address with a different prefix length is not supported.
If we configure two identical addresses with different
netmasks 192.168.1.1/30 and then 192.168.1.1/29. Zebra sends
'192.168.1.1' with a prefix length of 29. However, the function
'zebra_interface_address_read()' reads '192.168.1.1/30' because the
prefix length is not checked.
Alexander Rose [Thu, 11 Apr 2024 11:07:33 +0000 (13:07 +0200)]
ospf6d: Redistribute metric for AS-external route
When ospf6d originates an AS-external route that has been read from a kernel
routing table, then the metric of that route was ignored until now.
If a routemap is configured, then this metric will be redistributed from
now on.
Using metric increment and decrement in routemaps is supported by ospf6d now.
Signed-off-by: Alexander Rose <alexander.rose@secunet.com>
When BGP receives an SRV6_LOCATOR_ADD message from zebra, it calls the
`bgp_zebra_process_srv6_locator_add()` function to process the message.
`bgp_zebra_process_srv6_locator_add()` decodes the message first, and
then if the pointer to the default BGP instance is NULL (i.e. the
default BGP instance is not configured yet), it returns early without
doing anything and without using the decoded message information.
This commit fixes the order of the operations executed by
`bgp_zebra_process_srv6_locator_add()`. We first ensure that the default
BGP instance is ready and we return early if it is not. Then, we decode
the message and do something with the information contained in it.
Chirag Shah [Fri, 2 Feb 2024 20:11:58 +0000 (12:11 -0800)]
bgpd: [GR] fix mode change vtysh return code
When a bgp neighbor graceful-restart config mode change
is applied, after accepting the config if it does not
take effect instead of throwing vtysh error code,
return the success to vtysh and warn the user.
The debug log is already present at critical code point
where GR failure is seen during config apply.
Chirag Shah [Fri, 22 Mar 2024 20:25:18 +0000 (13:25 -0700)]
zebra: bridge flap handle vlan membership update
Upon bridge flap, the associated SVD case,
VLAN membership is not updated correctly.
When SVI comes up, the VNI could not associate
with it as bridge VLAN membership was not updated.
Martin Buck [Mon, 22 Apr 2024 11:01:22 +0000 (13:01 +0200)]
tests: Modify inter-area ECMP topotest to also test redundant ABRs
So far, this test only convered redundant paths to one ABR, now it checks
redundant paths to redundant ABRs, covering both cases. Useful as a
regression test for #15777.
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
Martin Buck [Mon, 22 Apr 2024 15:13:23 +0000 (17:13 +0200)]
ospf6d: Fix nexthop computation for inter-area multi-ABR ECMP
Pre-b74e965, we always merged nexthops of old (existing) and new (newly
generated, based on a LSA update) routes, making it impossible to remove
individual nexthops from a route. b74e965 replaced this by copying nexthops
from the new route to the old route. This works as long as the old and new
route are derived from the same LSA (e.g. multiple ECMP paths to the same
ABR). However, in case of multiple parallel ABRs, each of them originates a
LSA and the nexthops derived from them need to be combined to get the proper
route nexthops. So instead of trying to incrementally update the route
nexthops based on the old and new route nexthops, always recompute the route
nexthops by merging all of its path nexthops (which we're already updating
based on the LSA being processed).
Fixes #15777.
Signed-off-by: Martin Buck <mb-tmp-tvguho.pbz@gromit.dyndns.org>
David Lamparter [Thu, 2 May 2024 09:00:17 +0000 (11:00 +0200)]
build: hppa is weird
hppa (yes, HP PA-RISC) apparently creates relocations that refer to
".init+0x12345" for everything, referencing way past the end of the
.init section. While this is only fallback code hit when XREF_SETUP()
is missing (i.e. the FRRouting.XREF ELF note is absent), try to make it
work anyway.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 2 May 2024 08:57:31 +0000 (10:57 +0200)]
build: warn/fail on missing `XREF_SETUP()`
While clippy tries really, really hard to work under adverse conditions,
and this catches missing XREF_SETUP() on almost all CPU architectures,
this doesn't quite work on hppa. So, make it a warning on *all*
platforms (or error for --enable-dev-build) in order to catch it before
shipping off to Debian's buildd and blowing up there...
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 2 May 2024 08:55:11 +0000 (10:55 +0200)]
*: add XREF_SETUP() to libraries and utilites
This is theoretically not needed if neither DEFUNs nor zlog_* calls are
used, except I'm about to turn it into a build error to catch the cases
where it _is_ necessary. Which is libmgmt_be_nb.la in this case, where
it causes build failures on hppa.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Tue, 30 Apr 2024 12:13:22 +0000 (14:13 +0200)]
tools/gcc-plugins: warn for `suseconds_t` format
The plugin was already catching attempts to print `time_t` without
casting it first (there is no valid printf specifier without a cast),
but `__suseconds64_t` needs the same treatment. (Probably
`__suseconds_t` too, if it exists, which I'm not sure it does - but that
doesn't matter, the plugin ignores non-existing types.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Tue, 30 Apr 2024 12:18:03 +0000 (14:18 +0200)]
lib: fix `time_t` print without cast
The gcc plugin wasn't warning about printing `suseconds_t` (which is
`time_t`, but in `struct timeval`.) It needs to be printed with a cast,
just like `time_t`. Luckily there is only one such usage.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
David Lamparter [Thu, 2 May 2024 20:07:24 +0000 (22:07 +0200)]
build: exclude deprecated decls from -Werror
Other parts of the system can change (e.g. libc-ares), making things
deprecated, and then our build fails for no reason inside FRR. This
shouldn't be an error.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
With the commit `605df8d4`, all real things are moved into dplane.
So the operations mentioned in this comment have nothing to do with
this function `netlink_link_change()`.
Donald Sharp [Tue, 30 Apr 2024 14:53:48 +0000 (10:53 -0400)]
zebra: Ensure proper decoding of netlink message
As part of the kernel netlink functionality, it is
possible that a bit of nested attributes can be
passed up. This attribute has a type value which
is stored in the lower 8 bits and in the upper 8
bits are a couple control flags that can be used.
FRR can parse this data and then just throw away
the value unless we mask off the upper 8 bits.
Let's ensure that it can be properly parsed.
David Lamparter [Tue, 30 Apr 2024 09:52:37 +0000 (11:52 +0200)]
build: link libatomic if available
It'll generally exist but be empty on systems that don't need it.
(Some 32bit platforms now need it due to 64bit time_t, and the platform
may not have 64bit atomic ops.)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
bgpd: Apply NOOP when doing negative commands for GR operations
E.g.:
```
% The Graceful Restart command used is not valid at this moment.
zsh: exit 1 vtysh -c configure -c 'router bgp' -c 'no neighbor 127.0.0.1 graceful-restart
1
```
This does not make sense frr-reload to fail.
Instead, just ignore such requests if they are just NOOP.
bgpd : Ensure logging for dynamic neighbor listen limit reached
Dynamic neighbors exceeding the listen limit were rejected without appropriate logging.
Previously, only rejection logs were generated, leaving users unaware of when the limit being reached.
Adding a log message for when the listen limit is reached
bgpd : Prevent deletion of BGP peer groups associated to listen range
Description:
-----
Deleting a peer group also deletes its associated BGP listen range.
This behaviour is undesired as it could cause unintended configuration changes.
Fix :
-----
-Do not allow peer group deletion until they are no longer associated with any listen range.
-Check the count of listen ranges attached to the group.
If any listen ranges are found, returns a configuration warning, preventing the deletion.
pimd crashs while unconfigure of rp ka timer as we are trying to access
a yand dnode(suppress timer) which does not exist at the moment.
User just configured rp keepalive timer and not suppress timer,
the yang dnode would not be present. Instead of directly accessing
yang_dnode_get_unit16, first check the yang node exist using
the xpath.
Before:
------
tor-11(config)# no ip pim rp keep-alive-timer 3000
vtysh: error reading from pimd: Success (0)Warning: closing connection to pimd because of an I/O error!
Broadcast message from root@tor-11 (somewhere) (Mon Apr 22 17:29:12 2024):
cumulus-core: Running cl-support for core files "pimd.25467.1713806952.core"
After:
-----
tor-11(config)# no ip pim rp keep-alive-timer 3000
tor-11(config)#
Signed-off-by: Donald Sharp <sharpd@nvidia.com> Signed-off-by: Vijayalaxmi Basavaraj <vbasavaraj@nvidia.com>