]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
4 years agoMerge pull request #8322 from qlyoung/topotests
Jafar Al-Gharaibeh [Wed, 28 Apr 2021 15:40:25 +0000 (10:40 -0500)]
Merge pull request #8322 from qlyoung/topotests

Assorted topotests cleanup

4 years agoMerge pull request #8583 from idryzhov/fix-topotest
Rafael Zalamena [Wed, 28 Apr 2021 10:16:43 +0000 (07:16 -0300)]
Merge pull request #8583 from idryzhov/fix-topotest

tests: fix topotest polling log

4 years agoMerge pull request #8471 from idryzhov/cleanup-num-named-lists
Donatas Abraitis [Wed, 28 Apr 2021 05:33:24 +0000 (08:33 +0300)]
Merge pull request #8471 from idryzhov/cleanup-num-named-lists

*: cleanup number-named access-lists and prefix-lists

4 years agotests: fix topotest polling log 8583/head
Igor Ryzhov [Tue, 27 Apr 2021 23:52:58 +0000 (02:52 +0300)]
tests: fix topotest polling log

The current log prints maximum wait time which is not actually correct,
because it doesn't include the command execution time. We usually have
"failed after X seconds" log with X being far longer than this maximum.

Let's print the maximum number of tries instead.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8531 from mjstapp/fix_backups_misc
Russ White [Tue, 27 Apr 2021 20:04:24 +0000 (16:04 -0400)]
Merge pull request #8531 from mjstapp/fix_backups_misc

zebra: Misc fixups for backup nexthops

4 years agoMerge pull request #8527 from opensourcerouting/fixes-20210421
Russ White [Tue, 27 Apr 2021 19:14:12 +0000 (15:14 -0400)]
Merge pull request #8527 from opensourcerouting/fixes-20210421

lib: fix zlog assert() & CLI node_exit

4 years agoMerge pull request #8487 from pguibert6WIND/ospf6_vrfs
Russ White [Tue, 27 Apr 2021 19:06:11 +0000 (15:06 -0400)]
Merge pull request #8487 from pguibert6WIND/ospf6_vrfs

ospf6d: add 'show ipv6 ospf6 vrfs' command

4 years agoMerge pull request #8572 from opensourcerouting/pthread-autoconf
Mark Stapp [Tue, 27 Apr 2021 17:50:18 +0000 (13:50 -0400)]
Merge pull request #8572 from opensourcerouting/pthread-autoconf

build: fix pthread CFLAGS for function checks

4 years agoMerge pull request #8488 from mjstapp/more_workqueue
Stephen Worley [Tue, 27 Apr 2021 15:59:33 +0000 (11:59 -0400)]
Merge pull request #8488 from mjstapp/more_workqueue

lib, zebra: use zebra workqueue for NHG updates

4 years agobuild: fix pthread CFLAGS for function checks 8572/head
David Lamparter [Tue, 27 Apr 2021 13:11:33 +0000 (15:11 +0200)]
build: fix pthread CFLAGS for function checks

The pthread_* checks for extra pthread features really need
PTHREAD_CFLAGS...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #8553 from idryzhov/fix-bgp-get
Donatas Abraitis [Tue, 27 Apr 2021 06:22:08 +0000 (09:22 +0300)]
Merge pull request #8553 from idryzhov/fix-bgp-get

bgpd: fix bgp_get_vty return values

4 years agoMerge pull request #8517 from volta-networks/ldp_defer_zebra_updates
Renato Westphal [Tue, 27 Apr 2021 02:57:57 +0000 (23:57 -0300)]
Merge pull request #8517 from volta-networks/ldp_defer_zebra_updates

ldpd: defer register for info until configured

4 years agoMerge pull request #8538 from mjstapp/re_dump_nh_labels
Renato Westphal [Tue, 27 Apr 2021 02:57:03 +0000 (23:57 -0300)]
Merge pull request #8538 from mjstapp/re_dump_nh_labels

zebra: include nexthops' label stacks in zebra rib debug

4 years agoMerge pull request #8565 from mjstapp/fix_eigrp_tlvs
Donald Sharp [Mon, 26 Apr 2021 23:38:01 +0000 (19:38 -0400)]
Merge pull request #8565 from mjstapp/fix_eigrp_tlvs

eigrpd: validate TLV lengths

4 years agobgpd: fix bgp_get_vty return values 8553/head
Igor Ryzhov [Fri, 23 Apr 2021 18:36:12 +0000 (21:36 +0300)]
bgpd: fix bgp_get_vty return values

There are multiple problems:
- commit ef7c53e2 introduced a new return value 2 which broke things,
  because a lot of code treats non-zero return as an error,
- there is an incorrect error returned when AS number mismatches.

This commit fixes both.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8548 from donaldsharp/bgp_dampening
Igor Ryzhov [Mon, 26 Apr 2021 20:13:05 +0000 (23:13 +0300)]
Merge pull request #8548 from donaldsharp/bgp_dampening

bgpd: prevent doppelganger overwrite of subsuquently configured cli

4 years agoMerge pull request #8520 from donaldsharp/ecmp_doc_change
Mark Stapp [Mon, 26 Apr 2021 15:26:18 +0000 (11:26 -0400)]
Merge pull request #8520 from donaldsharp/ecmp_doc_change

zebra: Add some flavor documentation for ECMP in zebra

4 years agoeigrpd: validate TLV lengths 8565/head
Mark Stapp [Mon, 26 Apr 2021 15:20:57 +0000 (11:20 -0400)]
eigrpd: validate TLV lengths

Check that incoming TLVS a) don't overrun the incoming packet,
b) don't underrun the required size for the type of TLV.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #8549 from sworleys/NHG-Grace-Fix
Mark Stapp [Mon, 26 Apr 2021 12:34:31 +0000 (08:34 -0400)]
Merge pull request #8549 from sworleys/NHG-Grace-Fix

zebra: Proto-NHG Fix Graceful-Restart-Retain Crash Loop

4 years agoMerge pull request #8534 from opensourcerouting/threads-vs-fork
Mark Stapp [Mon, 26 Apr 2021 11:57:15 +0000 (07:57 -0400)]
Merge pull request #8534 from opensourcerouting/threads-vs-fork

lib, pathd PCEP: creating threads before forking does _not_ work

4 years agoMerge pull request #8540 from donaldsharp/kill_them_all
Rafael Zalamena [Mon, 26 Apr 2021 11:52:38 +0000 (11:52 +0000)]
Merge pull request #8540 from donaldsharp/kill_them_all

tests: Remove kill_mininet_router_process

4 years agoMerge pull request #8555 from idryzhov/fix-bfd-test
Rafael Zalamena [Mon, 26 Apr 2021 11:49:00 +0000 (11:49 +0000)]
Merge pull request #8555 from idryzhov/fix-bfd-test

tests: fix bfd-bgp-cbit-topo3 test

4 years agozebra: debug log for redistribute_del 8517/head
Emanuele Di Pascale [Fri, 23 Apr 2021 08:49:07 +0000 (10:49 +0200)]
zebra: debug log for redistribute_del

We're firing an event debug log for zebra_redistribute_add, but not one
for zebra_redistribute_delete. Let's make it symmetric.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoldpd: defer register for info until configured
Fredi Raspall [Thu, 18 Feb 2021 22:45:08 +0000 (23:45 +0100)]
ldpd: defer register for info until configured

Instead of registering to receive default-VRF information and routes
when first connected to zebra, defer the registration until some ldp
configuration is entered.

This avoids redistributing IPv4/IPv6 routes to ldpd when not needed.

Signed-off-by: Fredi Raspall <fredi@voltanet.io>
Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agoMerge pull request #8526 from donaldsharp/sysctl_doc
Donatas Abraitis [Sun, 25 Apr 2021 08:54:13 +0000 (11:54 +0300)]
Merge pull request #8526 from donaldsharp/sysctl_doc

doc: Start talking about useful sysctl's for proper zebra operation

4 years agoMerge pull request #8543 from volta-networks/fix_bgp_invalid_nexthop
Donatas Abraitis [Sun, 25 Apr 2021 08:52:19 +0000 (11:52 +0300)]
Merge pull request #8543 from volta-networks/fix_bgp_invalid_nexthop

bgpd: fix invalid labeled nexthop check

4 years agobgpd: Prevent race condition loss of config 8548/head
Donald Sharp [Sat, 24 Apr 2021 03:50:31 +0000 (23:50 -0400)]
bgpd: Prevent race condition loss of config

If we have a situation where BGP is partially reading in a config
file for a neighbor, *and* the neighbor is coming up *and* we
have a doppelganger.  There exists a race condition when we transfer
the config from the doppelganger to the config peer that we will
overwrite later config because we are copying the config data
from the doppelganger peer( which was captured at the start of initiation
of the peering ).

From what I can tell the peer->af_flags variable is to hold configuration
flags for the local peer.  The doppelganger should never overwrite this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotests: fix bfd-bgp-cbit-topo3 test 8555/head
Igor Ryzhov [Fri, 23 Apr 2021 22:32:53 +0000 (01:32 +0300)]
tests: fix bfd-bgp-cbit-topo3 test

This test is completely incorrect on test_bfd_loss_intermediate step.
It shuts down the interface and then "waiting" for the BGP session to
fail. But instead of the actual wait it compares the output of "show bfd
peers" with the "up" state. As it does this comparison right after the
interface shutdown, the BFD session has not yet failed and the comparison
is always successful except very rare cases when the command takes a lot
of time to execute (due to the heavy load on CI system I suppose).

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoMerge pull request #8495 from opensourcerouting/ospfv3-bfd-rework
Igor Ryzhov [Fri, 23 Apr 2021 21:47:31 +0000 (00:47 +0300)]
Merge pull request #8495 from opensourcerouting/ospfv3-bfd-rework

ospf6d: rework BFD integration and add BFD profiles support

4 years agoMerge pull request #8462 from opensourcerouting/pim-bfd-refactor
Igor Ryzhov [Fri, 23 Apr 2021 21:46:29 +0000 (00:46 +0300)]
Merge pull request #8462 from opensourcerouting/pim-bfd-refactor

pimd: rework BFD integration and add profile support

4 years agoMerge pull request #8539 from donaldsharp/isis_circuit_warning
Igor Ryzhov [Fri, 23 Apr 2021 19:44:49 +0000 (22:44 +0300)]
Merge pull request #8539 from donaldsharp/isis_circuit_warning

Isis circuit warning

4 years agoldpd: set `frr_is_after_fork` in lde/ldpe 8534/head
David Lamparter [Fri, 23 Apr 2021 13:17:07 +0000 (15:17 +0200)]
ldpd: set `frr_is_after_fork` in lde/ldpe

These subprocesses don't use frr_config_fork(), so frr_is_after_fork is
never set.  While the frr_pthread stuff isn't currently used there, set
the flag anyway to avoid future headaches.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoisisd: Remove warnings and add some data to debugs for isis_csm.c 8539/head
Donald Sharp [Thu, 22 Apr 2021 19:04:15 +0000 (15:04 -0400)]
isisd: Remove warnings and add some data to debugs for isis_csm.c

When running isis and not running isis on all interfaces results
in a bunch of warn messages to the log about circuit state
changes.  These warn messages also didn't bother to inform
the end user what interface was causing the fun.  Since
the end operator cannot do anything with these warn messages
and nor should they in the vast array of normal operations
modify the code to use event debugging and turn the warns
to debugs.

Additionally add some information to clue the operator
in on to what actual interface we are talking about.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotopotests: test PIM BFD profile integration 8462/head
Rafael Zalamena [Tue, 13 Apr 2021 14:33:39 +0000 (11:33 -0300)]
topotests: test PIM BFD profile integration

Test that PIM BFD profile integration works.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: document new PIM BFD command variant
Rafael Zalamena [Tue, 13 Apr 2021 14:53:50 +0000 (11:53 -0300)]
doc: document new PIM BFD command variant

Tell user he can configure BFD profile for sessions created by PIM.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agopimd: support BFD profiles configuration
Rafael Zalamena [Tue, 13 Apr 2021 14:07:01 +0000 (11:07 -0300)]
pimd: support BFD profiles configuration

Allow users to pre configure BFD sessions with a profile.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoyang: add PIM BFD profile support
Rafael Zalamena [Tue, 13 Apr 2021 13:43:19 +0000 (10:43 -0300)]
yang: add PIM BFD profile support

Allow users to configure BFD profile for the peers in a interface.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: add new basic PIM topology test
Rafael Zalamena [Mon, 12 Apr 2021 19:47:38 +0000 (16:47 -0300)]
topotests: add new basic PIM topology test

Test for PIM (re)convergence and BFD usage.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agopimd: rework BFD integration
Rafael Zalamena [Mon, 12 Apr 2021 16:48:21 +0000 (13:48 -0300)]
pimd: rework BFD integration

Rewrite the BFD integration code to use the new library.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agobgpd: fix invalid labeled nexthop check 8543/head
Emanuele Di Pascale [Thu, 22 Apr 2021 17:04:47 +0000 (19:04 +0200)]
bgpd: fix invalid labeled nexthop check

the code processing an NHT update was only resetting the BGP_NEXTHOP_VALID
flag, so labeled nexthops were considered valid even if there was no
nexthop. Reset the flag in response to the update, and also make the
isvalid_nexthop functions a little more robust by checking the number
of nexthops.

Signed-off-by: Emanuele Di Pascale <emanuele@voltanet.io>
4 years agozebra: handle gracefulRS/retain with proto NHGs 8549/head
Stephen Worley [Thu, 22 Apr 2021 21:21:12 +0000 (17:21 -0400)]
zebra: handle gracefulRS/retain with proto NHGs

Properly handle refcounting of Proto-owned NHGs when
zebra is operating under graceful restart and retain
conditions.

We have an extra refcnt of 1 we keep for proto-owned NHGs to
indicate the upper level proto has created and owns it.

When we are reading these in from the kernel, we need to set them
to 1 as appropriate. Without this, we fail in the assert() during
zebra_nhg_proto_add() after the owning daemons resends the NHG
and the refcnts are off by one.

Also add in the same logic we use for routes when sweeping with
respect to uptimes.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
4 years agozebra: add uptime to NHEs
Stephen Worley [Thu, 22 Apr 2021 21:19:03 +0000 (17:19 -0400)]
zebra: add uptime to NHEs

Add uptime for use with NHEs to keep track of how
long we have had this NHE in our rib without an update.

This is treated exactly the same as the re->uptime for
routes. When we get an update for a route, we reset the
uptime.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
4 years agozebra: add PROTO_OWNED macro for NHE id bounds checking
Stephen Worley [Thu, 22 Apr 2021 21:16:57 +0000 (17:16 -0400)]
zebra: add PROTO_OWNED macro for NHE id bounds checking

Add a PROTO_OWNED macro for code readability when checking
ID bounds for whether a NHG is proto owned.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
4 years agotests: Remove kill_mininet_router_process 8540/head
Donald Sharp [Thu, 22 Apr 2021 19:47:37 +0000 (15:47 -0400)]
tests: Remove kill_mininet_router_process

This function kills all processes that happen to have the same
name to frr processes and it was only ever used in the setup.
Setup should not be used to kill old runs.  That should be a
separate process.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd: Use enum for circuit state
Donald Sharp [Thu, 22 Apr 2021 18:52:40 +0000 (14:52 -0400)]
isisd: Use enum for circuit state

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoisisd: use an enum for circuit states
Donald Sharp [Thu, 22 Apr 2021 18:46:53 +0000 (14:46 -0400)]
isisd: use an enum for circuit states

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agolib: BFD session handling improvement 8495/head
Rafael Zalamena [Wed, 21 Apr 2021 18:27:20 +0000 (15:27 -0300)]
lib: BFD session handling improvement

Don't uninstall sessions if the address, interface, VRF or TTL didn't change.

Update the library documentation to make it clear to other developers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agodoc: OSPFv3 BFD profile documentation
Rafael Zalamena [Fri, 16 Apr 2021 20:02:13 +0000 (17:02 -0300)]
doc: OSPFv3 BFD profile documentation

Let user know he can use BFD profiles with OSPFv3.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: test OSPFv3 BFD profiles
Rafael Zalamena [Fri, 16 Apr 2021 19:17:58 +0000 (16:17 -0300)]
topotests: test OSPFv3 BFD profiles

See if the BFD sessions created by OSPFv3 are using the configured BFD profiles.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoospf6d: add support for BFD profiles
Rafael Zalamena [Fri, 16 Apr 2021 19:17:31 +0000 (16:17 -0300)]
ospf6d: add support for BFD profiles

Allow user to pre configure BFD sessions using profiles.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agotopotests: converge OSPFv3 faster
Rafael Zalamena [Thu, 15 Apr 2021 20:34:48 +0000 (17:34 -0300)]
topotests: converge OSPFv3 faster

Tweak OSPFv3 interface configuration to converge faster.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoospf6d: rework BFD integration
Rafael Zalamena [Wed, 14 Apr 2021 15:37:01 +0000 (12:37 -0300)]
ospf6d: rework BFD integration

Use the new BFD library to integrate with BFD.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agolib: fix possible crash on BFD notification
Rafael Zalamena [Mon, 12 Apr 2021 20:59:52 +0000 (17:59 -0300)]
lib: fix possible crash on BFD notification

Allow sessions to remove themselves from the notifications without
risking crashes.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
4 years agoMerge pull request #8536 from idryzhov/bfd-enabled
Rafael Zalamena [Thu, 22 Apr 2021 18:06:48 +0000 (15:06 -0300)]
Merge pull request #8536 from idryzhov/bfd-enabled

lib: remove enabled flag for bfd sessions

4 years agozebra: include nexthops' label stacks in debugs 8538/head
Mark Stapp [Thu, 22 Apr 2021 15:51:50 +0000 (11:51 -0400)]
zebra: include nexthops' label stacks in debugs

Include nexthops' labels in an important debug early in
route processing.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agolib: remove enabled flag for bfd sessions 8536/head
Igor Ryzhov [Thu, 22 Apr 2021 12:24:49 +0000 (15:24 +0300)]
lib: remove enabled flag for bfd sessions

Currently this flag is only helpful in an extremely rare situation when
the BFD session registration was unsuccessful and after that zebra is
restarted. Let's remove this flag to simplify the API. If we ever want
to solve the problem of unsuccessful registration/deregistration, this
can be done using internal flags, without API modification.

Also add the error log to help user understand why the BFD session is
not working.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agolib: hard-fail creating threads before fork()
David Lamparter [Thu, 22 Apr 2021 10:10:27 +0000 (12:10 +0200)]
lib: hard-fail creating threads before fork()

Creating any threads before we fork() into the background (if `-d` is
given) is an extremely dangerous footgun;  the threads are created in
the parent and terminated when that exits.

This is extra dangerous because while testing, you'd often run the
daemon in foreground without `-d`, and everything works as expected.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agopathd: don't init PCEP before fork()
David Lamparter [Thu, 22 Apr 2021 10:17:42 +0000 (12:17 +0200)]
pathd: don't init PCEP before fork()

Turns out the PCEP stuff does not work particularly well if its threads
are ... missing.  Who would've thought?

Reported-by: Erik Kooistra <me@erikkooistra.nl>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agolib: add frr_config_pre hook
David Lamparter [Thu, 22 Apr 2021 11:18:19 +0000 (13:18 +0200)]
lib: add frr_config_pre hook

... for any initialization that needs to run after forking, but that
would be racy if it were just scheduled on the thread_master (since the
config load is also just a thread callback, ordering would be undefined
for another scheduled thread callback.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agolib: rename very_late_init hook to config_post
David Lamparter [Thu, 22 Apr 2021 10:06:51 +0000 (12:06 +0200)]
lib: rename very_late_init hook to config_post

very_late_init doesn't really say what this does, config_post is much
more descriptive.  (A config_pre is coming in a jiffy.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agozebra: Add some flavor documentation for ECMP in zebra 8520/head
Donald Sharp [Tue, 20 Apr 2021 13:03:00 +0000 (09:03 -0400)]
zebra: Add some flavor documentation for ECMP in zebra

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8528 from opensourcerouting/build-cleanup-20210421
Donald Sharp [Thu, 22 Apr 2021 00:46:02 +0000 (20:46 -0400)]
Merge pull request #8528 from opensourcerouting/build-cleanup-20210421

build: more cleaning

4 years agozebra: handle TE policy changes in LSP async notifs 8531/head
Mark Stapp [Thu, 25 Mar 2021 16:03:00 +0000 (12:03 -0400)]
zebra: handle TE policy changes in LSP async notifs

Handle SR-TE policy changes in the LSP async notification
handler, as we do in the normal LSP dplane results handler.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: include inner labels with recursive backups
Mark Stapp [Thu, 1 Apr 2021 15:56:30 +0000 (11:56 -0400)]
zebra: include inner labels with recursive backups

When capturing backup nexthops with recursive resolution,
ensure that inner labels from the recursive nexthop are
included in each backup (as they are with the resolving
primary nexthops).

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agozebra: fix some issues in recursive backup nexthop code
Mark Stapp [Wed, 24 Mar 2021 19:01:50 +0000 (15:01 -0400)]
zebra: fix some issues in recursive backup nexthop code

Fix a couple of small things in the code that captures backup
nexthops during recursive resolution.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
4 years agoMerge pull request #8529 from donaldsharp/reload_is_not
Mark Stapp [Wed, 21 Apr 2021 18:02:26 +0000 (14:02 -0400)]
Merge pull request #8529 from donaldsharp/reload_is_not

Reload complaining about using `is not`

4 years agolib: correctly exit CLI nodes on file config load 8527/head
David Lamparter [Thu, 8 Apr 2021 11:35:09 +0000 (13:35 +0200)]
lib: correctly exit CLI nodes on file config load

The (legacy) code for reading split configs tries to execute config
commands in parent nodes, but doesn't call the node_exit function when
it goes up to a parent node.  This breaks BGP RPKI setup (and extended
syslog, which is in the next commit.)

Doing this correctly is a slight bit involved since the node_exit
callbacks should only be called if the command is actually executed on a
parent node.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: fix possible assert() fail in zlog_fd()
David Lamparter [Sat, 10 Apr 2021 19:02:06 +0000 (21:02 +0200)]
lib: fix possible assert() fail in zlog_fd()

If the last message in a batched logging operation isn't printed due to
priority, this skips the code that flushes prepared messages through
writev() and can trigger the assert() at the end of zlog_fd().

Since any logmsg above info priority triggers a buffer flush, running
into this situation requires a log file target configured for info
priority, at least 1 message of info priority buffered, a debug message
buffered after that, and then a buffer flush (explicit or due to buffer
full).

I haven't seen this chain of events happen in the wild, but it needs
fixing anyway.

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agobuild: turn on automake warnings (& symlinks) 8528/head
David Lamparter [Wed, 21 Apr 2021 10:37:20 +0000 (12:37 +0200)]
build: turn on automake warnings (& symlinks)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: run autoupdate
David Lamparter [Wed, 21 Apr 2021 10:33:47 +0000 (12:33 +0200)]
build: run autoupdate

AC_TRY_COMPILE is deprecated too.  Also configure.ac isn't executable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: remove deprecated AC_WORDS_BIGENDIAN
David Lamparter [Wed, 21 Apr 2021 10:23:14 +0000 (12:23 +0200)]
build: remove deprecated AC_WORDS_BIGENDIAN

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: improve AX_LUA_HEADERS for crosscompile
David Lamparter [Wed, 21 Apr 2021 10:17:55 +0000 (12:17 +0200)]
build: improve AX_LUA_HEADERS for crosscompile

The preprocessor is something configure can invoke.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: use AC_CONFIG_AUX_DIR
David Lamparter [Wed, 21 Apr 2021 09:59:24 +0000 (11:59 +0200)]
build: use AC_CONFIG_AUX_DIR

aka the "put shit into a subdirectory" option

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: properly split CFLAGS from AC_CFLAGS
David Lamparter [Wed, 21 Apr 2021 09:54:48 +0000 (11:54 +0200)]
build: properly split CFLAGS from AC_CFLAGS

`CFLAGS` is a "user variable", not intended to be controlled by
configure itself.  Let's put all the "important" stuff in AC_CFLAGS and
only leave debug/optimization controls in CFLAGS.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agobuild: make builddir include path consistent
David Lamparter [Wed, 21 Apr 2021 09:19:39 +0000 (11:19 +0200)]
build: make builddir include path consistent

... by referencing all autogenerated headers relative to the root
directory.  (90% of the changes here is `version.h`.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agotools: Cleanup frr-reload.py by running black on it 8529/head
Donald Sharp [Wed, 21 Apr 2021 12:59:22 +0000 (08:59 -0400)]
tools: Cleanup frr-reload.py by running black on it

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agotools: Fix warning when running frr-reload.py
Donald Sharp [Wed, 21 Apr 2021 12:57:29 +0000 (08:57 -0400)]
tools: Fix warning when running frr-reload.py

When I run frr-reload.py I am seeing this error:

Apr 21 06:23:51 eva frrinit.sh[3776992]: /usr/lib/frr/frr-reload.py:1094: SyntaxWarning: "is not" with a literal. Did you mean "!="?
Apr 21 06:23:51 eva frrinit.sh[3776992]:   if line is not "exit-vrf":

fix

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agobuild: fix protobuf out-of-tree build
David Lamparter [Wed, 21 Apr 2021 09:12:53 +0000 (11:12 +0200)]
build: fix protobuf out-of-tree build

Otherwise it aborts with "File does not reside within any path specified
using --proto_path (or -I)"

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
4 years agoMerge pull request #8516 from patrasar/pim_register_suppress_time_crash
Igor Ryzhov [Tue, 20 Apr 2021 21:07:36 +0000 (00:07 +0300)]
Merge pull request #8516 from patrasar/pim_register_suppress_time_crash

4 years agodoc: Start talking about useful sysctl's for proper zebra operation 8526/head
Donald Sharp [Tue, 20 Apr 2021 19:52:32 +0000 (15:52 -0400)]
doc: Start talking about useful sysctl's for proper zebra operation

Add some color to useful sysctl's that are needed for FRR proper operation.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
4 years agoMerge pull request #8505 from mobash-rasool/ospfv3-max-path
Mark Stapp [Tue, 20 Apr 2021 19:37:00 +0000 (15:37 -0400)]
Merge pull request #8505 from mobash-rasool/ospfv3-max-path

ospf6d: Do not delete external table when configure max-path

4 years agoMerge pull request #8482 from wesleycoakley/docker-prefer-cmd-to-entrypoint
Mark Stapp [Tue, 20 Apr 2021 15:58:44 +0000 (11:58 -0400)]
Merge pull request #8482 from wesleycoakley/docker-prefer-cmd-to-entrypoint

docker: prefer CMD to ENTRYPOINT for flexibility

4 years agoMerge pull request #8361 from rameshabhinay/change_1
Russ White [Tue, 20 Apr 2021 15:23:49 +0000 (11:23 -0400)]
Merge pull request #8361 from rameshabhinay/change_1

bgpd: vrf route leaking related fixes

4 years agoMerge pull request #8455 from achernavin22/ospf_nssa_after_redist2
Russ White [Tue, 20 Apr 2021 14:28:49 +0000 (10:28 -0400)]
Merge pull request #8455 from achernavin22/ospf_nssa_after_redist2

ospfd: install Type-7 when NSSA area is configured after redistribution

4 years agoMerge pull request #8456 from donaldsharp/idle_to_active
Russ White [Tue, 20 Apr 2021 14:24:37 +0000 (10:24 -0400)]
Merge pull request #8456 from donaldsharp/idle_to_active

bgpd: Address LL peer not NHT when receiving connection attempt

4 years agoMerge pull request #8501 from ton31337/fix/replace_community_check
Donald Sharp [Tue, 20 Apr 2021 13:10:30 +0000 (09:10 -0400)]
Merge pull request #8501 from ton31337/fix/replace_community_check

bgpd: Check for flag existense for community instead of `if not NULL`

4 years agoMerge pull request #8373 from mjstapp/fix_ospf_timeval_dump
Russ White [Tue, 20 Apr 2021 11:39:50 +0000 (07:39 -0400)]
Merge pull request #8373 from mjstapp/fix_ospf_timeval_dump

ospfd: show seconds in timeval_dump

4 years agopimd: fix crash pim register-suppress-time command 8516/head
Sarita Patra [Tue, 20 Apr 2021 05:23:36 +0000 (22:23 -0700)]
pimd: fix crash pim register-suppress-time command

Signed-off-by: Sarita Patra <saritap@vmware.com>
4 years agoMerge pull request #8503 from opensourcerouting/one-backtrace-is-enough
Donald Sharp [Tue, 20 Apr 2021 10:11:13 +0000 (06:11 -0400)]
Merge pull request #8503 from opensourcerouting/one-backtrace-is-enough

lib: 640k backtraces should be enough for everybody

4 years agoMerge pull request #8511 from idryzhov/doc-fix-ospfd-maxpath
Donald Sharp [Tue, 20 Apr 2021 10:10:37 +0000 (06:10 -0400)]
Merge pull request #8511 from idryzhov/doc-fix-ospfd-maxpath

doc: fix ospfd maximum-paths command

4 years agoMerge pull request #8500 from ton31337/fix/indentation_for_show_ip_bgp_large_communit...
Sri Mohana Singamsetty [Tue, 20 Apr 2021 00:12:24 +0000 (17:12 -0700)]
Merge pull request #8500 from ton31337/fix/indentation_for_show_ip_bgp_large_community_list_cmd

bgpd: Fix clang-format/indentation for show_ip_bgp_large_community_list_cmd

4 years agodoc: fix ospfd maximum-paths command 8511/head
Igor Ryzhov [Mon, 19 Apr 2021 14:51:55 +0000 (17:51 +0300)]
doc: fix ospfd maximum-paths command

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
4 years agoospf6d: Do not delete external table when configure max-path 8505/head
Mobashshera Rasool [Mon, 19 Apr 2021 05:28:24 +0000 (05:28 +0000)]
ospf6d: Do not delete external table when configure max-path

Issue: When maximum-path is configured in ospf6 view, the
function ospf6_restart_spf deletes the external table as well
which is not required since that stores the redistribute routes.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
4 years agolib: fix bogus unlinkat() warning in zlog TLS exit 8503/head
David Lamparter [Mon, 19 Apr 2021 03:41:35 +0000 (05:41 +0200)]
lib: fix bogus unlinkat() warning in zlog TLS exit

Only try to unlink the buffer if we actually set it up beforehand...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agolib: don't print 2 backtraces for crashes
David Lamparter [Fri, 16 Apr 2021 02:38:25 +0000 (04:38 +0200)]
lib: don't print 2 backtraces for crashes

abort() raises SIGABRT, which would confusingly cause a 2nd backtrace to
be printed after the first one...

Signed-off-by: David Lamparter <equinox@diac24.net>
4 years agoMerge pull request #8502 from ranjanyash54/core_dump
Igor Ryzhov [Sun, 18 Apr 2021 15:23:01 +0000 (18:23 +0300)]
Merge pull request #8502 from ranjanyash54/core_dump

ospf6d: Fix coredump when "no interface IFNAME area <A.B.C.D>" is called

4 years agoospf6d: Fix coredump when "no interface IFNAME area <A.B.C.D>" is called 8502/head
Yash Ranjan [Sun, 18 Apr 2021 11:10:18 +0000 (04:10 -0700)]
ospf6d: Fix coredump when "no interface IFNAME area <A.B.C.D>" is called

When oi->area == NULL, it tries to print the
interface's area name, but no area is present.
Print the area name from the command argument instead.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
4 years agoMerge pull request #8491 from qlyoung/fix-alpine-libelf-dev-build
David Lamparter [Sun, 18 Apr 2021 06:50:20 +0000 (08:50 +0200)]
Merge pull request #8491 from qlyoung/fix-alpine-libelf-dev-build

4 years agobgpd: Check for flag existense for community instead of `if not NULL` 8501/head
Donatas Abraitis [Sun, 18 Apr 2021 04:56:39 +0000 (07:56 +0300)]
bgpd: Check for flag existense for community instead of `if not NULL`

Absolutetly cosmetic change, but let it be consistent with other checks
for optional attributes.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
4 years agobgpd: Fix clang-format/indentation for show_ip_bgp_large_community_list_cmd 8500/head
Donatas Abraitis [Sun, 18 Apr 2021 04:51:30 +0000 (07:51 +0300)]
bgpd: Fix clang-format/indentation for show_ip_bgp_large_community_list_cmd

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>