]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
3 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

3 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`

3 years agobuild: turn on automake warnings (& symlinks)
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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 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>
3 years agotools: Cleanup frr-reload.py by running black on it
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>
3 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>
3 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>
3 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

3 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

3 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

3 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

3 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

3 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

3 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`

3 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

3 years agopimd: fix crash pim register-suppress-time command
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>
3 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

3 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

3 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

3 years agodoc: fix ospfd maximum-paths command
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>
3 years agoospf6d: Do not delete external table when configure max-path
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>
3 years agolib: fix bogus unlinkat() warning in zlog TLS exit
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>
3 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>
3 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

3 years agoospf6d: Fix coredump when "no interface IFNAME area <A.B.C.D>" is called
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>
3 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

3 years agobgpd: Check for flag existense for community instead of `if not NULL`
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>
3 years agobgpd: Fix clang-format/indentation for show_ip_bgp_large_community_list_cmd
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>
3 years agoMerge pull request #8434 from donaldsharp/python_bullshit
Martin Winter [Fri, 16 Apr 2021 21:17:04 +0000 (23:17 +0200)]
Merge pull request #8434 from donaldsharp/python_bullshit

Python pylint stuff

3 years agoMerge pull request #8490 from qlyoung/fix-bgp-handle-socket-read-errors-in-main-pthread
Mark Stapp [Fri, 16 Apr 2021 20:07:50 +0000 (16:07 -0400)]
Merge pull request #8490 from qlyoung/fix-bgp-handle-socket-read-errors-in-main-pthread

bgpd: fix uninit value when handling bgp read errs

3 years agodocker: prefer CMD to ENTRYPOINT
Wesley Coakley [Thu, 15 Apr 2021 00:48:59 +0000 (20:48 -0400)]
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>
3 years agodocker: pin alpine base image to 3.13
Quentin Young [Thu, 15 Apr 2021 22:12:57 +0000 (18:12 -0400)]
docker: pin alpine base image to 3.13

'latest' isn't appropriate for us

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoalpine: add missing libelf-dev dependency
Quentin Young [Thu, 15 Apr 2021 22:12:16 +0000 (18:12 -0400)]
alpine: add missing libelf-dev dependency

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #8465 from opensourcerouting/vtysh-scan-snafu
Mark Stapp [Fri, 16 Apr 2021 12:23:20 +0000 (08:23 -0400)]
Merge pull request #8465 from opensourcerouting/vtysh-scan-snafu

fix vtysh_scan SNAFUs

3 years agobgpd: fix uninit value when handling bgp read errs
Quentin Young [Thu, 15 Apr 2021 22:05:10 +0000 (18:05 -0400)]
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>
3 years agopython: add demo checker tool using frr.xref
David Lamparter [Tue, 13 Apr 2021 22:11:02 +0000 (00:11 +0200)]
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>
3 years agovtysh: add lib/thread.c to vtysh_scan
David Lamparter [Tue, 13 Apr 2021 22:04:12 +0000 (00:04 +0200)]
vtysh: add lib/thread.c to vtysh_scan

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agovtysh: add lib/resolver.c to vtysh_scan
David Lamparter [Tue, 13 Apr 2021 22:00:43 +0000 (00:00 +0200)]
vtysh: add lib/resolver.c to vtysh_scan

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agovtysh: add lib/spf_backoff.c to vtysh_scan
David Lamparter [Tue, 13 Apr 2021 21:55:58 +0000 (23:55 +0200)]
vtysh: add lib/spf_backoff.c to vtysh_scan

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agovtysh: add lib/log_vty.c to vtysh_scan
David Lamparter [Tue, 13 Apr 2021 21:24:44 +0000 (23:24 +0200)]
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>
3 years agoMerge pull request #8483 from opensourcerouting/asan-fix
Quentin Young [Thu, 15 Apr 2021 20:46:35 +0000 (20:46 +0000)]
Merge pull request #8483 from opensourcerouting/asan-fix

lib: disable ASAN redzone around xref_p/xref_array

3 years agobgpd: Address LL peer not NHT when receiving connection attempt
Donald Sharp [Mon, 12 Apr 2021 18:16:30 +0000 (14:16 -0400)]
bgpd: Address LL peer not NHT when receiving connection attempt

The new LL code in:
8761cd6ddb5437767625f58c8e9cc3ccda7887ab

Introduced the idea of the bgp unnumbered peers using interface up/down
events to track the bgp peers nexthop.  This code was not properly
working when a connection was received from a peer in some circumstances.

Effectively the connection from a peer was immediately skipping state transitions
and FRR was never properly tracking the peers nexthop.  When we receive the
connection attempt, let's track the nexthop now.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep
Martin Winter [Thu, 15 Apr 2021 12:03:37 +0000 (14:03 +0200)]
Merge pull request #8437 from donaldsharp/verify_bgp_community_no_sleep

tests: Do not sleep(5) when verifying bgp communities

3 years agotests: test_bgp_vrf_dynamic_route_leak_topo1.py was missing a variable
Donald Sharp [Fri, 9 Apr 2021 13:20:15 +0000 (09:20 -0400)]
tests: test_bgp_vrf_dynamic_route_leak_topo1.py was missing a variable

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Fix test_bgp_multi_vrf_topo2.py string formatting
Donald Sharp [Fri, 9 Apr 2021 13:06:35 +0000 (09:06 -0400)]
tests: Fix test_bgp_multi_vrf_topo2.py string formatting

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: test_bgp_multi_vrf_topo1.py fix formatting issues pointed out by pylint
Donald Sharp [Fri, 9 Apr 2021 13:01:17 +0000 (09:01 -0400)]
tests: test_bgp_multi_vrf_topo1.py fix formatting issues pointed out by pylint

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Remove unnecessary formating for strings
Donald Sharp [Fri, 9 Apr 2021 12:53:44 +0000 (08:53 -0400)]
tests: Remove unnecessary formating for strings

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agotests: Remove duplicate functions in python code
Donald Sharp [Fri, 9 Apr 2021 12:46:51 +0000 (08:46 -0400)]
tests: Remove duplicate functions in python code

We have basically two identical functions in test_bgp_gr_functionality_topo1.py
Fix.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8477 from opensourcerouting/lib-bfd-fix
Igor Ryzhov [Thu, 15 Apr 2021 06:32:23 +0000 (09:32 +0300)]
Merge pull request #8477 from opensourcerouting/lib-bfd-fix

3 years agolib: disable ASAN redzone around xref_p/xref_array
David Lamparter [Thu, 15 Apr 2021 04:26:45 +0000 (06:26 +0200)]
lib: disable ASAN redzone around xref_p/xref_array

The "xref_p" variables are placed in the "xref_array" section
specifically so they're next to each other and we get an array at the
end.  The ASAN redzone that is inserted around global variables is
breaks that since it'd be inserted before and after each of the array
items.  So disable the ASAN redzone for these variables (and only these
variables, nothing else should be affected.)

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agoMerge pull request #8467 from idryzhov/fix-acl-delete
Renato Westphal [Thu, 15 Apr 2021 02:58:39 +0000 (23:58 -0300)]
Merge pull request #8467 from idryzhov/fix-acl-delete

lib: fix access-list deletion

3 years agoMerge pull request #8469 from mjstapp/fix_bgp_nhg_mpath
Renato Westphal [Thu, 15 Apr 2021 02:54:08 +0000 (23:54 -0300)]
Merge pull request #8469 from mjstapp/fix_bgp_nhg_mpath

bgpd: don't overrun fixed zapi array of nexthops

3 years agoMerge pull request #8470 from mjstapp/fix_nhrp_cov_socket
Renato Westphal [Thu, 15 Apr 2021 02:52:39 +0000 (23:52 -0300)]
Merge pull request #8470 from mjstapp/fix_nhrp_cov_socket

nhrpd: fix coverity warning about os_socket()

3 years agolib: fix BFD crash on interface removal
Rafael Zalamena [Wed, 14 Apr 2021 18:28:09 +0000 (15:28 -0300)]
lib: fix BFD crash on interface removal

- Handle badly formatted messages (don't set `ifp` in that case)
- Handle unread messages (e.g. when family is not don't trigger `assert`)

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8003 from donaldsharp/timings
Patrick Ruddy [Wed, 14 Apr 2021 17:33:18 +0000 (18:33 +0100)]
Merge pull request #8003 from donaldsharp/timings

lib: Differentiate between real and cpu bound processes

3 years agoMerge pull request #8356 from LabNConsulting/working/lb/docker-ci-v2
Quentin Young [Wed, 14 Apr 2021 16:27:39 +0000 (16:27 +0000)]
Merge pull request #8356 from LabNConsulting/working/lb/docker-ci-v2

3 years agoMerge pull request #8450 from ton31337/feature/frr_history_turn_on_off
Donald Sharp [Wed, 14 Apr 2021 13:59:09 +0000 (09:59 -0400)]
Merge pull request #8450 from ton31337/feature/frr_history_turn_on_off

vtysh: Set history file on demand

3 years agonhrpd: fix coverity warning about os_socket()
Mark Stapp [Wed, 14 Apr 2021 13:57:41 +0000 (09:57 -0400)]
nhrpd: fix coverity warning about os_socket()

Ensure we don't try to use an invalid fd in nhrpd, reported
by coverity.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agobgpd: don't overrun fixed zapi array of nexthops
Mark Stapp [Wed, 14 Apr 2021 13:24:37 +0000 (09:24 -0400)]
bgpd: don't overrun fixed zapi array of nexthops

Avoid overrunning the fixed-size array of nexthops in a
zapi_nhg.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8320 from idryzhov/prefix-list-seqnum
Donald Sharp [Wed, 14 Apr 2021 13:21:28 +0000 (09:21 -0400)]
Merge pull request #8320 from idryzhov/prefix-list-seqnum

lib: remove "ip prefix-list sequence-number" command

3 years agolib: fix access-list deletion
Igor Ryzhov [Wed, 14 Apr 2021 10:08:18 +0000 (13:08 +0300)]
lib: fix access-list deletion

Problems with the current implementation:
* Delete hook is called before the deletion of the access-list from the
  master list, which means that daemons processing this hook successfully
  find this access-list, store a pointer to it in their structures, and
  right after that the access-list is freed. Daemons end up having stale
  pointer to the freed structure.
* Route-maps are not notified of the deletion.

This commit fixes both issues.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #8446 from ton31337/fix/json_output_for_specific_vs_global_should_...
Sri Mohana Singamsetty [Wed, 14 Apr 2021 00:33:17 +0000 (17:33 -0700)]
Merge pull request #8446 from ton31337/fix/json_output_for_specific_vs_global_should_be_the_same

bgpd: Add `show bgp json detail` command

3 years agoMerge pull request #8448 from ton31337/feature/show_rpki_state_in_global_show_bgp
Sri Mohana Singamsetty [Wed, 14 Apr 2021 00:32:37 +0000 (17:32 -0700)]
Merge pull request #8448 from ton31337/feature/show_rpki_state_in_global_show_bgp

bgpd: Show RPKI short state in `show bgp <afi> <safi>`

3 years agovtysh: fix extract.pl for commands with "_cmd"
David Lamparter [Tue, 13 Apr 2021 21:34:34 +0000 (23:34 +0200)]
vtysh: fix extract.pl for commands with "_cmd"

If the command includes `_cmd`, hilarity ensues ;)

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agobuild: don't use $(top_srcdir) in vtysh_scan
David Lamparter [Tue, 13 Apr 2021 21:56:24 +0000 (23:56 +0200)]
build: don't use $(top_srcdir) in vtysh_scan

It's not necessary and can confuse scripts.

Signed-off-by: David Lamparter <equinox@diac24.net>
3 years agodoc: Add `show bgp json detail` command to print more verbose JSON output
Donatas Abraitis [Sat, 10 Apr 2021 19:59:02 +0000 (22:59 +0300)]
doc: Add `show bgp json detail` command to print more verbose JSON output

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Add `show bgp json detail` command
Donatas Abraitis [Sat, 10 Apr 2021 07:27:06 +0000 (10:27 +0300)]
bgpd: Add `show bgp json detail` command

Print detailed version for JSON output when dumping ALL BGP table with
`show bgp <afi> <safi> json detail`.

This output should be at some sort of identical to show_ip_bgp_route_cmd.

To avoid breaking backward-compatibility for `show bgp json`, adding
'detail' keyword for that.

In long-term it's easier for operators to compare stuff just looking at global
view instead of per-prefix for details.

Before:

```
],"192.168.100.1/32": [
  {
    "valid":true,
    "bestpath":true,
    "selectionReason":"First path received",
    "pathFrom":"external",
    "prefix":"192.168.100.1",
    "prefixLen":32,
    "network":"192.168.100.1\/32",
    "metric":0,
    "weight":32768,
    "peerId":"(unspec)",
    "path":"",
    "origin":"incomplete",
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "used":true
      }
    ]
  }
] }  }
```

After:
```
],"192.168.100.1/32": [
  {
    "aspath":{
      "string":"Local",
      "segments":[
      ],
      "length":0
    },
    "origin":"incomplete",
    "metric":0,
    "weight":32768,
    "valid":true,
    "sourced":true,
    "bestpath":{
      "overall":true,
      "selectionReason":"First path received"
    },
    "lastUpdate":{
      "epoch":1618040124,
      "string":"Sat Apr 10 07:35:24 2021\n"
    },
    "nexthops":[
      {
        "ip":"0.0.0.0",
        "hostname":"exit1-debian-9",
        "afi":"ipv4",
        "metric":0,
        "accessible":true,
        "used":true
      }
    ],
    "peer":{
      "peerId":"0.0.0.0",
      "routerId":"192.168.100.1"
    }
  }
] }  }
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8153 from reubendowle/nhrp-multicast
Jafar Al-Gharaibeh [Tue, 13 Apr 2021 17:49:28 +0000 (12:49 -0500)]
Merge pull request #8153 from reubendowle/nhrp-multicast

nhrp, ospf: add nhrp multicast for OSPF DMVPN

3 years agoMerge pull request #8414 from idryzhov/fix-filter-cli
Russ White [Tue, 13 Apr 2021 15:38:51 +0000 (11:38 -0400)]
Merge pull request #8414 from idryzhov/fix-filter-cli

various acl/plist cli fixes

3 years agoMerge pull request #8431 from ton31337/feature/show_bgp_version_per_prefix
Russ White [Tue, 13 Apr 2021 15:33:22 +0000 (11:33 -0400)]
Merge pull request #8431 from ton31337/feature/show_bgp_version_per_prefix

bgpd: Add `show bgp version <version>` command

3 years agoMerge pull request #8426 from idryzhov/fix-interface-nb-stale-pointers
Quentin Young [Tue, 13 Apr 2021 15:26:51 +0000 (15:26 +0000)]
Merge pull request #8426 from idryzhov/fix-interface-nb-stale-pointers

lib: fix interface nb stale pointers

3 years agoospfd: show seconds in timeval_dump
Mark Stapp [Tue, 30 Mar 2021 16:44:36 +0000 (12:44 -0400)]
ospfd: show seconds in timeval_dump

If the number of seconds is < one minute, show seconds and
msecs.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoMerge pull request #8145 from pguibert6WIND/nhrp_use_zebra
Mark Stapp [Tue, 13 Apr 2021 12:02:56 +0000 (08:02 -0400)]
Merge pull request #8145 from pguibert6WIND/nhrp_use_zebra

nhrp: use zebra

3 years agozebra, lib: replace ZEBRA_ROUTE_NEIGH with simplified version
Philippe Guibert [Mon, 5 Apr 2021 19:40:37 +0000 (21:40 +0200)]
zebra, lib: replace ZEBRA_ROUTE_NEIGH with simplified version

do not add a new route type, and consider 0 as a value meaning
that zebra should be the owner.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: remove useless typedef
Philippe Guibert [Mon, 29 Mar 2021 19:25:43 +0000 (21:25 +0200)]
nhrpd: remove useless typedef

this typedef was useless. remote it.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrp, zebra, lib: enforce usage of zapi_neigh_ip structure
Philippe Guibert [Wed, 17 Mar 2021 17:12:26 +0000 (18:12 +0100)]
nhrp, zebra, lib: enforce usage of zapi_neigh_ip structure

zapi_nbr structure is renamed to zapi_neigh_ip.
Initially used to set a neighbor ip entry for gre interfaces, this
structure is used to get events from the zebra layer to nhrp layer.

The ndm state has been added, as it is needed on both sides.
The zebra dplane layer is slightly modified.

Also, to clarify what ZEBRA_NEIGH_ADD/DEL means, a rename is done:
it is called now ZEBRA_NEIGH_IP_ADD/DEL, and it signified that this
zapi interface permits to set link operations by associating ip
addresses to link addresses.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agoMerge pull request #8389 from idryzhov/route-map-optimization-nb
Renato Westphal [Tue, 13 Apr 2021 03:26:20 +0000 (00:26 -0300)]
Merge pull request #8389 from idryzhov/route-map-optimization-nb

lib: convert route-map optimization to NB

3 years agoMerge pull request #8396 from achernavin22/ospf_fast_hello_show_run
Renato Westphal [Tue, 13 Apr 2021 03:14:56 +0000 (00:14 -0300)]
Merge pull request #8396 from achernavin22/ospf_fast_hello_show_run

ospfd: fix output of dead-interval in show running

3 years agoMerge pull request #8288 from qlyoung/readd-space-support-to-find-command
David Lamparter [Tue, 13 Apr 2021 00:22:46 +0000 (02:22 +0200)]
Merge pull request #8288 from qlyoung/readd-space-support-to-find-command

3 years agoMerge pull request #8100 from qlyoung/remove-sample-conf-files
David Lamparter [Tue, 13 Apr 2021 00:20:53 +0000 (02:20 +0200)]
Merge pull request #8100 from qlyoung/remove-sample-conf-files

3 years agoMerge pull request #8451 from idryzhov/bfdd-fix-cli-show
Renato Westphal [Mon, 12 Apr 2021 23:26:21 +0000 (20:26 -0300)]
Merge pull request #8451 from idryzhov/bfdd-fix-cli-show

bfdd: fix nb cli show with defaults

3 years agoMerge pull request #8453 from idryzhov/bgpd-fix-transactional-cli
Renato Westphal [Mon, 12 Apr 2021 23:23:26 +0000 (20:23 -0300)]
Merge pull request #8453 from idryzhov/bgpd-fix-transactional-cli

bgpd: fix pending commit check

3 years agodoc: add Ubuntu18.04 and 20.04 container info to building-docker.rst
Lou Berger [Mon, 29 Mar 2021 11:45:49 +0000 (07:45 -0400)]
doc: add Ubuntu18.04 and 20.04 container info to building-docker.rst

Signed-off-by: Lou Berger <lberger@labn.net>
3 years ago*: add initial .travis.yml
Lou Berger [Sun, 28 Mar 2021 01:33:21 +0000 (21:33 -0400)]
*: add initial .travis.yml

   Supports centos7 and 8 docker builds
   and Ubuntu18.04 and 20.04 build and minimal CI

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agoubuntu20-ci: create a docker 20.04 container for dev / test / ci
Lou Berger [Sun, 28 Mar 2021 11:44:16 +0000 (07:44 -0400)]
ubuntu20-ci: create a docker 20.04 container for dev / test / ci

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agoubuntu18-ci: create a docker 18.04 container for dev / test / ci
Lou Berger [Sun, 28 Mar 2021 01:24:07 +0000 (21:24 -0400)]
ubuntu18-ci: create a docker 18.04 container for dev / test / ci

Signed-off-by: Lou Berger <lberger@labn.net>
3 years agonhrp: avoid crashing when terminating interface contexts
Philippe Guibert [Thu, 11 Mar 2021 15:02:46 +0000 (16:02 +0100)]
nhrp: avoid crashing when terminating interface contexts

avoid crashing when terminating interface contexts.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agonhrpd: add a zebra api to configure neighbor table per interface
Philippe Guibert [Mon, 16 Dec 2019 12:34:43 +0000 (13:34 +0100)]
nhrpd: add a zebra api to configure neighbor table per interface

neighbor table per interface is being configured per interface, via
zebra api.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: Add an option for vtysh to override history file path
Donatas Abraitis [Mon, 12 Apr 2021 08:57:11 +0000 (11:57 +0300)]
doc: Add an option for vtysh to override history file path

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agovtysh: Set history file on demand
Donatas Abraitis [Mon, 12 Apr 2021 08:28:51 +0000 (11:28 +0300)]
vtysh: Set history file on demand

It's sometimes needed to disable logging all FRR commands at all.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: fix pending commit check
Igor Ryzhov [Mon, 12 Apr 2021 13:42:51 +0000 (16:42 +0300)]
bgpd: fix pending commit check

Calling nb_cli_pending_commit_check only makes sense after nb_cli_apply_changes.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: install Type-7 when NSSA area is configured after redistribution
Alexander Chernavin [Mon, 12 Apr 2021 13:34:20 +0000 (09:34 -0400)]
ospfd: install Type-7 when NSSA area is configured after redistribution

Currently, if NSSA area is configured before redistribution is enabled,
Type-7 LSA's are installed and flooded. But if NSSA area is configured
after redistribution is enabled, Type-7 LSA's are not installed.

With this change, when NSSA area is configured, schedule a task that
scans for external LSA's. If they exist, install Type-7 and flood to
all NSSA Areas.

There already was an attempt to fix this problem in 0f321812f where
ospf_asbr_nssa_redist_task() was triggered in ospf_abr_task_timer().
This turns out to be incorrect place for this operation because it's
a one-off operation needed only after "area <ID> nssa" execution. And
ospf_abr_task_timer() is a periodic operation. Triggering
ospf_asbr_nssa_redist_task() in ospf_abr_task_timer() caused a problem
that was fixed in 945eec2b6 making the problem with NSSA area
configured after redistribution actual again.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
3 years agoMerge pull request #8421 from opensourcerouting/xrelfo-arm
Mark Stapp [Mon, 12 Apr 2021 12:07:05 +0000 (08:07 -0400)]
Merge pull request #8421 from opensourcerouting/xrelfo-arm

fix xrelfo on ARM(32) & cross-compile

3 years agobfdd: fix nb cli show with defaults
Igor Ryzhov [Mon, 12 Apr 2021 11:17:30 +0000 (14:17 +0300)]
bfdd: fix nb cli show with defaults

The idea of the "with-defaults" flag is to show the default values for
parameters that were not configured by the user. But bfdd incorrectly
shows the default values for all parameters, including the
user-configured ones.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agolib: fix interface nb stale pointers
Igor Ryzhov [Thu, 8 Apr 2021 12:43:07 +0000 (15:43 +0300)]
lib: fix interface nb stale pointers

The first change in this commit is the processing of the VRF termination.
When we terminate the VRF, we should not delete the underlying interfaces,
because there may be pointers to them in the northbound configuration. We
should move them to the default VRF instead.

Because of the first change, the VRF interface itself is also not deleted
when deleting the VRF. It should be handled in netlink_link_change. This
is done by the second change.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>