Commit Graph

23809 Commits

Author SHA1 Message Date
David Lamparter
adf8924df6 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>
2021-04-23 15:17:07 +02:00
David Lamparter
38554d3ae6 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>
2021-04-22 13:25:38 +02:00
David Lamparter
159246be24 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>
2021-04-22 13:24:51 +02:00
David Lamparter
bf645e31f6 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>
2021-04-22 13:20:34 +02:00
David Lamparter
2bafda27a6 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>
2021-04-22 13:16:20 +02:00
Donald Sharp
85e40093a9
Merge pull request #8528 from opensourcerouting/build-cleanup-20210421
build: more cleaning
2021-04-21 20:46:02 -04:00
Mark Stapp
7b58ed7295
Merge pull request #8529 from donaldsharp/reload_is_not
Reload complaining about using `is not`
2021-04-21 14:02:26 -04:00
David Lamparter
7c2275ac86 build: turn on automake warnings (& symlinks)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:37 +02:00
David Lamparter
1b636c0ad4 build: run autoupdate
AC_TRY_COMPILE is deprecated too.  Also configure.ac isn't executable.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:37 +02:00
David Lamparter
19083e4f75 build: remove deprecated AC_WORDS_BIGENDIAN
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:37 +02:00
David Lamparter
6fc9987217 build: improve AX_LUA_HEADERS for crosscompile
The preprocessor is something configure can invoke.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:36 +02:00
David Lamparter
8b11dfcaec build: use AC_CONFIG_AUX_DIR
aka the "put shit into a subdirectory" option

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2021-04-21 15:42:36 +02:00
David Lamparter
0c4285d77e 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>
2021-04-21 15:42:36 +02:00
David Lamparter
09781197b6 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>
2021-04-21 15:42:33 +02:00
Donald Sharp
61dc17d8cb tools: Cleanup frr-reload.py by running black on it
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2021-04-21 08:59:22 -04:00
Donald Sharp
0ed6a49d90 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>
2021-04-21 08:57:29 -04:00
David Lamparter
9219708b13 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>
2021-04-21 11:13:25 +02:00
Igor Ryzhov
bf6005d5f4
Merge pull request #8516 from patrasar/pim_register_suppress_time_crash 2021-04-21 00:07:36 +03:00
Mark Stapp
adb7fb636f Merge pull request #8505 from mobash-rasool/ospfv3-max-path
ospf6d: Do not delete external table when configure max-path
2021-04-20 15:37:00 -04:00
Mark Stapp
fe390fafc5
Merge pull request #8482 from wesleycoakley/docker-prefer-cmd-to-entrypoint
docker: prefer CMD to ENTRYPOINT for flexibility
2021-04-20 11:58:44 -04:00
Russ White
2bbf1bd88b
Merge pull request #8361 from rameshabhinay/change_1
bgpd: vrf route leaking related fixes
2021-04-20 11:23:49 -04:00
Russ White
8c3d6b8be5
Merge pull request #8455 from achernavin22/ospf_nssa_after_redist2
ospfd: install Type-7 when NSSA area is configured after redistribution
2021-04-20 10:28:49 -04:00
Russ White
0ab9f53044
Merge pull request #8456 from donaldsharp/idle_to_active
bgpd: Address LL peer not NHT when receiving connection attempt
2021-04-20 10:24:37 -04:00
Donald Sharp
9c95ede706
Merge pull request #8501 from ton31337/fix/replace_community_check
bgpd: Check for flag existense for community instead of `if not NULL`
2021-04-20 09:10:30 -04:00
Russ White
7408af70f5
Merge pull request #8373 from mjstapp/fix_ospf_timeval_dump
ospfd: show seconds in timeval_dump
2021-04-20 07:39:50 -04:00
Sarita Patra
6f5f05029c pimd: fix crash pim register-suppress-time command
Signed-off-by: Sarita Patra <saritap@vmware.com>
2021-04-20 03:57:50 -07:00
Donald Sharp
117d216ba0
Merge pull request #8503 from opensourcerouting/one-backtrace-is-enough
lib: 640k backtraces should be enough for everybody
2021-04-20 06:11:13 -04:00
Donald Sharp
0433e60cb3
Merge pull request #8511 from idryzhov/doc-fix-ospfd-maxpath
doc: fix ospfd maximum-paths command
2021-04-20 06:10:37 -04:00
Sri Mohana Singamsetty
97444b25ad
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
2021-04-19 17:12:24 -07:00
Igor Ryzhov
25d6c9671b doc: fix ospfd maximum-paths command
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2021-04-19 17:51:55 +03:00
Mobashshera Rasool
ffdc63f9b4 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>
2021-04-19 05:28:24 +00:00
David Lamparter
4b4935bbc2 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>
2021-04-19 05:47:09 +02:00
David Lamparter
5be4799dc5 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>
2021-04-19 05:35:04 +02:00
Igor Ryzhov
8d31c67c79
Merge pull request #8502 from ranjanyash54/core_dump
ospf6d: Fix coredump when "no interface IFNAME area <A.B.C.D>" is called
2021-04-18 18:23:01 +03:00
Yash Ranjan
f85a41124b 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>
2021-04-18 04:22:56 -07:00
David Lamparter
79ec61be27
Merge pull request #8491 from qlyoung/fix-alpine-libelf-dev-build 2021-04-18 08:50:20 +02:00
Donatas Abraitis
29e72930b1 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>
2021-04-18 07:56:39 +03:00
Donatas Abraitis
ef3364f0f5 bgpd: Fix clang-format/indentation for show_ip_bgp_large_community_list_cmd
Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2021-04-18 07:52:07 +03:00
Martin Winter
6e0368f61a
Merge pull request #8434 from donaldsharp/python_bullshit
Python pylint stuff
2021-04-16 23:17:04 +02:00
Mark Stapp
c1f42d2614
Merge pull request #8490 from qlyoung/fix-bgp-handle-socket-read-errors-in-main-pthread
bgpd: fix uninit value when handling bgp read errs
2021-04-16 16:07:50 -04:00
Wesley Coakley
3a33be1329
docker: prefer CMD to ENTRYPOINT
Specifying watchfrr as CMD instead of ENTRYPOINT allows one to easily
override this command when starting a docker container. This allows
simple, manual testing via (e.g.) bash. With ENTRYPOINT only the
container will simply explode with an exit code if watchfrr exits.

For instance one could start a shell session in this container via:

```
docker run --name test --rm -i -t <frr-container> bash
```

The default behavior (`docker run <frr-container>` with no command
specified) is not changed.

Signed-off-by: Wesley Coakley <wcoakley@nvidia.com>
2021-04-16 13:05:44 -04:00
Quentin Young
9513086d4e docker: pin alpine base image to 3.13
'latest' isn't appropriate for us

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-16 13:02:18 -04:00
Quentin Young
daff938c7e alpine: add missing libelf-dev dependency
Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-16 13:02:15 -04:00
Mark Stapp
861ea6f268
Merge pull request #8465 from opensourcerouting/vtysh-scan-snafu
fix vtysh_scan SNAFUs
2021-04-16 08:23:20 -04:00
Quentin Young
b8cfb2cd41 bgpd: fix uninit value when handling bgp read errs
Compiler warns about uninitialized value, although in practice it is
unreachable.

Also updates a function comment explaining what that value does.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
2021-04-15 18:07:44 -04:00
David Lamparter
010bf6f1ca python: add demo checker tool using frr.xref
More of a demo on what to do with the frr.xref file, but also slightly
useful in finding vtysh SNAFUs :)

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-15 23:12:45 +02:00
David Lamparter
ee4dcee834 vtysh: add lib/thread.c to vtysh_scan
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-15 23:12:45 +02:00
David Lamparter
9cb089fc43 vtysh: add lib/resolver.c to vtysh_scan
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-15 23:12:45 +02:00
David Lamparter
c4e57cd52e vtysh: add lib/spf_backoff.c to vtysh_scan
Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-15 23:12:45 +02:00
David Lamparter
48843422d3 vtysh: add lib/log_vty.c to vtysh_scan
Rather than copying everything over, include the file in vtysh_scan for
automatic pickup.

Signed-off-by: David Lamparter <equinox@diac24.net>
2021-04-15 23:12:45 +02:00