Igor Ryzhov [Wed, 24 Mar 2021 10:16:15 +0000 (13:16 +0300)]
vtysh: hide "show configuration running" command
This command is currently useful only for developers.
Let's hide it to not confuse end users by having both
"show runnning-config" and "show configuration running".
no point in scheduling an LSP refresh immediately if we know it is
going to be postponed again due to the network still being in its
instability grace period
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
when we receive an event from BFDD and we end up throwing it away,
make sure that we log (with debug guards) the reason for this, so
we can troubleshoot issues like the one addressed by the previous
commit.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
A wrong check was silently skipping the initialization of the bfd_session
struct in the adjacency if the router was not configured for IPv6. This
would cause BFD events to be ignored regardless of the configuration.
Also add a function to return the "name" of an adjacency and use it in a
couple of places, including the new log, instead of repeating the same
code in a bunch of places.
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
Chirag Shah [Thu, 18 Mar 2021 05:04:33 +0000 (22:04 -0700)]
doc: add seqno to bgp as path list section
Add sequence no option to bgp as-path list cli syntax.
Add sequence no to example config.
Add auto generated sequence no in running-config if its not
provided in config.
David Lamparter [Tue, 16 Mar 2021 05:11:15 +0000 (06:11 +0100)]
tests: simplify docker rsync & support worktrees
The previous, more complex mechanism failed to take into account that
git worktrees only have a stub .git file & copying the worktree itself
is not enough. Just extract a file list beforehand & don't bother with
git inside the container.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Wed, 17 Mar 2021 05:39:34 +0000 (06:39 +0100)]
pathd: remove mid-string line breaks
cf. workflow.rst ("lines over 80 characters are allowed for text strings
to make it possible to search the code for them"), matching Linux kernel
coding style.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Tue, 2 Mar 2021 18:40:07 +0000 (19:40 +0100)]
lib: temporary workaround for LabN CI
Accept macros without ; for LabN CI *only*. This is a bit hairy since
we can't generate warnings for this, so it's very limited in both scope
and duration.
Signed-off-by: David Lamparter <equinox@diac24.net>
David Lamparter [Sun, 21 Feb 2021 05:18:10 +0000 (06:18 +0100)]
*: require semicolon after DEFINE_MTYPE & co
Back when I put this together in 2015, ISO C11 was still reasonably new
and we couldn't require it just yet. Without ISO C11, there is no
"good" way (only bad hacks) to require a semicolon after a macro that
ends with a function definition. And if you added one anyway, you'd get
"spurious semicolon" warnings on some compilers...
With C11, `_Static_assert()` at the end of a macro will make it so that
the semicolon is properly required, consumed, and not warned about.
Consistently requiring semicolons after "file-level" macros matches
Linux kernel coding style and helps some editors against mis-syntax'ing
these macros.
Signed-off-by: David Lamparter <equinox@diac24.net>
Gaurav Goyal [Thu, 11 Mar 2021 00:46:37 +0000 (13:46 +1300)]
nhrpd: Retry IPSec if NHRP is repeatedly failing
This prevents a failed IPSec connection from preventing DMVPN from working.
A failure situation can be reproduced using a Cisco peer, and and disabling then
re-enabling the tunnel IPSec protection (after the IPSec connection has
already been established).
Donald Sharp [Wed, 17 Mar 2021 02:28:29 +0000 (22:28 -0400)]
bgpd: If we have a SAFI conflict do not allow labeled unicast to reset
If we have a SAFI conflict, ie we are trying to activate safi's
UNICAST and LABELED_UNICAST at the same time, we should not
cause bestpath to be rerun and we should not try to put
labels on everything.
ckishimo [Tue, 16 Mar 2021 23:19:50 +0000 (00:19 +0100)]
tests: fix warning when checking ospfv3 convergence
The following error is shown when running the OSPFv3 tests
2021-03-16 23:37:44,792 INFO: Function returned global name 'data_rid' is not defined
2021-03-16 23:37:44,792 INFO: Retry [#1] after sleeping for 2s
2021-03-16 23:37:46,794 INFO: Verifying OSPF6 neighborship on router r1:
2021-03-16 23:37:46,993 INFO: Output for command [ show ipv6 ospf6 neighbor ] on router r1:
Neighbor ID Pri DeadTime State/IfState Duration I/F[State]
2.2.2.2 1 00:00:03 Full/PointToPoint 00:00:01 r1-r2-eth0[PointToPoint]
Fix the "data_rid" warning by using the correct variable
ckishimo [Tue, 16 Mar 2021 22:47:18 +0000 (23:47 +0100)]
ospf6d: fix iface commands lost when removing from area
In OSPFv3 when removing the interface from an area, all ospf6
interface commands are lost, so when changing the area you need
to reconfigure all ospf6 interface commands again
r1# conf t
r1(config)# router ospf6
r1(config-ospf6)# no interface r1-r2-eth0 area 0.0.0.0
r1(config-ospf6)# exit
r1# sh run
interface r1-r2-eth0
ipv6 address 2013:12::1/64
! <----- missing all ipv6 ospf6 commands
router ospf6
ospf6 router-id 1.1.1.1
!
This is because the interface is being deleted instead of disabled
(see PR#7717) I believe the interface should be left as disabled
(not deleted) when removing the interface from the area
Mark Stapp [Mon, 22 Feb 2021 20:06:28 +0000 (15:06 -0500)]
zebra: add ui control for use of backup nexthops in resolution
Add a control and api for the use of backup nexthops in
recursive resolution. With 'no', we won't try to use installed
backup nexthops when resolving a recursive route.
lynne [Sun, 14 Mar 2021 17:11:15 +0000 (13:11 -0400)]
ospfd6: Clear locks when ospf messages need to be chunked
When there are too many LSA updates to be sent in a packet the code needs to
correctly clear the locks that are taken while walking the lists and then wait
for the appropriate timer to expire to continue walking the list. The routine
that was being called would not properly remove all the locks that needed to be
cleared, and would also try to incorrectly delete the lsa/route. The code now
clears the locks and leaves the lsa on the list. When the timers fire again
the code continues walking the list to send the rest of the lsas to the
neighbor.
Mark Stapp [Tue, 16 Mar 2021 15:28:25 +0000 (11:28 -0400)]
doc: add more notes about new topotests
Add some extra notes to the dev doc section about writing new
topotests: check for OS/kernel support if necessary; avoid
volatile or unstable data like ifindices or link-locals.
incorrectly was setting the metric value to 1 for the underlying
connected interface. Modify the code to use a metric value of 0
instead of 1 that now represents the actual metric value that
was originally passed up.
This was noticed when the `show bgp ipv4 uni` command was
inserting a `(metric 1)` into output where before it was not.
Igor Ryzhov [Tue, 9 Mar 2021 22:35:55 +0000 (01:35 +0300)]
bfdd: warn users about echo-mode restrictions
Echo-mode implementation is currently broken. Instead of sending packets
to it's own address, bfdd is sending echo packets to the peer's address.
It may seem to work when testing between two FRR instances, because FRR
loops back such packets, but no other implementation is supposed to do
that.
Let's warn users that the current implementation works only between two
FRR instances.
Igor Ryzhov [Tue, 9 Mar 2021 22:17:47 +0000 (01:17 +0300)]
bfdd: fix starting echo receive timer
Currently this timer is only started when we receive the first echo
packet. If we never receive the packet, the timer is never started and
the user falsely assumes that echo function is working.
error: taking address of packed member 'rsp_addr' of class or structure 'igmp_mtrace' may result in an unaligned pointer value [-Werror,-Waddress-of-packed-member]
Follow the pattern used in the code to solve this problem for clang