]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
2 years agoMerge pull request #8992 from opensourcerouting/workflow-knobs
Russ White [Tue, 13 Jul 2021 22:41:52 +0000 (18:41 -0400)]
Merge pull request #8992 from opensourcerouting/workflow-knobs

workflow: add guidelines for config knobs

2 years agoMerge pull request #9039 from ton31337/fix/no_need_to_check_for_null_in_cmp_functions
Donald Sharp [Tue, 13 Jul 2021 20:42:23 +0000 (16:42 -0400)]
Merge pull request #9039 from ton31337/fix/no_need_to_check_for_null_in_cmp_functions

bgpd: Do not check for NULL values for vni_hash_cmp()

2 years agoMerge pull request #8961 from pguibert6WIND/bgp_unnumbered_config_find_nexthop
Donald Sharp [Tue, 13 Jul 2021 15:55:14 +0000 (11:55 -0400)]
Merge pull request #8961 from pguibert6WIND/bgp_unnumbered_config_find_nexthop

bgpd: associate correct nexthop when using peer link-local

2 years agoMerge pull request #9015 from Prerana-GB/GR
Russ White [Tue, 13 Jul 2021 15:39:31 +0000 (11:39 -0400)]
Merge pull request #9015 from Prerana-GB/GR

bgpd: Inconsistency in Local BGP GR state.

2 years agoMerge pull request #9037 from idryzhov/ospf6-freebsd
Donald Sharp [Tue, 13 Jul 2021 13:40:13 +0000 (09:40 -0400)]
Merge pull request #9037 from idryzhov/ospf6-freebsd

ospf6d: fix freebsd mcast group issues

2 years agoMerge pull request #9036 from donaldsharp/hash_cmp_stuff
Donatas Abraitis [Tue, 13 Jul 2021 13:27:27 +0000 (16:27 +0300)]
Merge pull request #9036 from donaldsharp/hash_cmp_stuff

bgpd: hash compare functions never receive null values

2 years agoMerge pull request #8767 from opensourcerouting/ospfd-gr
Russ White [Tue, 13 Jul 2021 10:39:53 +0000 (06:39 -0400)]
Merge pull request #8767 from opensourcerouting/ospfd-gr

ospfd: introduce support for Graceful Restart (restarting mode)

2 years agoMerge pull request #8734 from imzyxwvu/paf-deactivate
Russ White [Tue, 13 Jul 2021 10:35:30 +0000 (06:35 -0400)]
Merge pull request #8734 from imzyxwvu/paf-deactivate

bgpd: Do not delete peer_af structure when deactivating peer-group from an address-family.

2 years agoMerge pull request #9029 from donaldsharp/ospfv3_stuff
Igor Ryzhov [Tue, 13 Jul 2021 08:51:15 +0000 (11:51 +0300)]
Merge pull request #9029 from donaldsharp/ospfv3_stuff

ospf6d: Correct spelling in debug

2 years agotools: Add coccinelle script for hash compare functions NULL values
Donatas Abraitis [Tue, 13 Jul 2021 05:48:11 +0000 (08:48 +0300)]
tools: Add coccinelle script for hash compare functions NULL values

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agobgpd: Do not check for NULL values for vni_hash_cmp()
Donatas Abraitis [Tue, 13 Jul 2021 05:46:10 +0000 (08:46 +0300)]
bgpd: Do not check for NULL values for vni_hash_cmp()

There is no need to test for null values in the hash compare
function as that we are guaranteed to send in data in
the hash compare functions.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
2 years agoospf6d: fix freebsd mcast group issues
Igor Ryzhov [Mon, 12 Jul 2021 19:51:49 +0000 (22:51 +0300)]
ospf6d: fix freebsd mcast group issues

There's a delay in FreeBSD between issuing a command to leave a
multicast group and an actual leave. If we execute "no router ospf6" and
"router ospf6" fast enough, we can end up in a situation when OS
performs the leave later than it performs the join and the interface
remains without a multicast group.

Instead of counting on a one second delay, we must wait until the
interface actually leaves the group.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
2 years agobgpd: hash compare functions never receive null values
Donald Sharp [Mon, 12 Jul 2021 18:23:51 +0000 (14:23 -0400)]
bgpd: hash compare functions never receive null values

There is no need to test for null values in the hash compare
function as that we are guaranteed to send in data in
the hash compare functions.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9027 from ton31337/fix/missing_unlock_bgp_dest
Donald Sharp [Mon, 12 Jul 2021 11:27:12 +0000 (07:27 -0400)]
Merge pull request #9027 from ton31337/fix/missing_unlock_bgp_dest

bgpd: Don't forget bgp_dest_unlock_node for bgp_static_set()

3 years agoospf6d: Correct spelling in debug
Donald Sharp [Thu, 8 Jul 2021 18:52:19 +0000 (14:52 -0400)]
ospf6d: Correct spelling in debug

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agobgpd: associate correct nexthop when using peer link-local
Philippe Guibert [Mon, 12 Jul 2021 07:22:41 +0000 (09:22 +0200)]
bgpd: associate correct nexthop when using peer link-local

When setting bgp configuration using peers referencing link local
ipv6 addresses, the bgp should be able to handle incoming bgp
connections, and find out the appropriate interface where the
connection comes from.

ipv6 link local sessions work by using bgp unnumbered interfaces
config, but it does not work if we have a shared media with
multiple potential link local ipv6 addresses on the network.

The fix consists in finding out the appropriate interface, when
the local configuration references a link local ipv6 addresses,
and the source address used references an interface. below
configuration illustrates what can be done then:

neighbor fe80::4113:5bba:2b61:b20c remote-as 55
neighbor fe80::4113:5bba:2b61:b20c update-source eth0

note: this change does not solve the ability for such config to
create an outgoing connection to remote peer (as the link local
ipv6 address config does not indicate which interface to use).

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agobgpd: Don't forget bgp_dest_unlock_node for bgp_static_set()
Donatas Abraitis [Sun, 11 Jul 2021 20:39:53 +0000 (23:39 +0300)]
bgpd: Don't forget bgp_dest_unlock_node for bgp_static_set()

Before returning an error, unlock bgp dest which is locked by
bgp_node_lookup().

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #9004 from anlancs/fix-staticd-blackhole
Igor Ryzhov [Sat, 10 Jul 2021 06:26:58 +0000 (09:26 +0300)]
Merge pull request #9004 from anlancs/fix-staticd-blackhole

3 years agostaticd: fix late initialization of blackhole type
anlan_cs [Thu, 8 Jul 2021 09:57:37 +0000 (05:57 -0400)]
staticd: fix late initialization of blackhole type

If a static route is added to a not-yet-existing VRF, the blackhole type
is not initialized. Initialization must be done before the VRF existence
check.

Signed-off-by: anlan_cs <anlan_cs@tom.com>
3 years agoMerge pull request #9010 from opensourcerouting/ospf-misc
Igor Ryzhov [Fri, 9 Jul 2021 16:19:13 +0000 (19:19 +0300)]
Merge pull request #9010 from opensourcerouting/ospf-misc

doc,lib,ospfd,ospf6d: trivial improvements

3 years agoMerge pull request #9016 from LabNConsulting/chopps/ospf6d-fix-backlink-chk
Igor Ryzhov [Fri, 9 Jul 2021 12:46:43 +0000 (15:46 +0300)]
Merge pull request #9016 from LabNConsulting/chopps/ospf6d-fix-backlink-chk

ospf6d: fix backlink check

3 years agoospf6d: rework default-information configuration
Rafael Zalamena [Wed, 7 Jul 2021 13:20:01 +0000 (10:20 -0300)]
ospf6d: rework default-information configuration

Move code to its own function and remove most of the code indentation
(e.g. test for failure and quit as soon as possible).

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: document OSPFv3 debug commands
Rafael Zalamena [Thu, 8 Jul 2021 17:35:23 +0000 (14:35 -0300)]
doc: document OSPFv3 debug commands

Let users know all the available debug commands we have.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agolib,ospfd,ospf6d: remove duplicated function
Rafael Zalamena [Thu, 8 Jul 2021 17:09:20 +0000 (14:09 -0300)]
lib,ospfd,ospf6d: remove duplicated function

Move `is_default_prefix` variations to `lib/prefix.h` and make the code
use the library version instead of implementing it again.

NOTE
----

The function was split into per family versions to cover all types.
Using `union prefixconstptr` is not possible due to static analyzer
warnings which cause CI to fail.

The specific cases that would cause this failure were:
 - Caller used `struct prefix_ipv4` and called the generic function.
 - `is_default_prefix` with signature using `const struct prefix *` or
   `union prefixconstptr`.

The compiler would complain about reading bytes outside of the memory
bounds even though it did not take into account the `prefix->family`
part.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8978 from kssoman/ospf_new
Rafael Zalamena [Fri, 9 Jul 2021 10:46:11 +0000 (07:46 -0300)]
Merge pull request #8978 from kssoman/ospf_new

ospf6d : Send LSA update immediately when ospf instance is deleted

3 years agoospf6d: fix backlink check
Christian Hopps [Fri, 9 Jul 2021 07:58:02 +0000 (03:58 -0400)]
ospf6d: fix backlink check

This code has been wrong ~ever (according to git history). There are 3
conditional blocks with the added assertion that both the LSA and the
vertex being checked can't both be network LSAs.

The third block is clearly assuming both LSA and vertex are router
LSAs b/c it is accessing the backlink and lsdesc as router lsdesc's also
making sure both are p2p links (which they would have to be to point at
each other).

The programming error here is that (A && B) == False does NOT imply !A,
but the code is written that way.

So we end up in the third block one of LSA or vertex being network LSAs
rather easily (whenever that is the case and the desc isn't the backlink
being sought).

This was caught by ASAN b/c the lsdesc and backlinks are being accessed
(> 4 byte field offsets) as if they were router lsdesc's in the third
block, when in fact one of them is a network lsdesc which is only 4
bytes long -- so ASAN flags the access beyond bounds.

Signed-off-by: Christian Hopps <chopps@labn.net>
3 years agobgpd: Inconsistency in Local BGP GR state.
prerana [Fri, 9 Jul 2021 07:20:15 +0000 (00:20 -0700)]
bgpd: Inconsistency in Local BGP GR state.

Problem: Sometimes the configured Local GR state is not reflected in
show command and peer node. This is causing failures in few of the
BGP-GR topotests.

RCA: This problem is seen when the configuration of local GR state
happens when the BGP session is in OpenSent state and  moves to
Established after the configuration is complete.
When the session gets established, we move the GR state value from stub peer
to the config peer. This will result in overriding the GR state to
previous value.

Fix: The local GR state is modified only through CLI configuration and
does not change during BGP FSM transition. In this case it is not necessary
to transfer the GR state value from stub peer to config peer. This way we
can ensure that always the most recent config value is present in peer
datastructure.

Signed-off-by: Prerana-GB <prerana@vmware.com>
3 years agoospf6d : Send LSA update immediately when ospf instance is deleted
Soman K.S [Sun, 4 Jul 2021 12:10:19 +0000 (17:40 +0530)]
ospf6d : Send LSA update immediately when ospf instance is deleted

Fix: The fix is to call ospf6_write to send the packet immediately to all neighbors

Signed-off-by: kssoman <somanks@gmail.com>
3 years agoMerge pull request #8997 from donaldsharp/opaque_length
Martin Winter [Thu, 8 Jul 2021 01:35:42 +0000 (03:35 +0200)]
Merge pull request #8997 from donaldsharp/opaque_length

lib: Allow ZAPI_MESSAGE_OPAQUE_LENGTH length of data

3 years agoMerge pull request #8991 from opensourcerouting/sd-coverity-fix
Donald Sharp [Thu, 8 Jul 2021 01:18:27 +0000 (21:18 -0400)]
Merge pull request #8991 from opensourcerouting/sd-coverity-fix

lib: fix coverity unused result warning

3 years agolib: Allow ZAPI_MESSAGE_OPAQUE_LENGTH length of data
Donald Sharp [Wed, 7 Jul 2021 20:00:12 +0000 (16:00 -0400)]
lib: Allow ZAPI_MESSAGE_OPAQUE_LENGTH length of data

We are sending up to ZAPI_MESSAGE_OPAQUE_LENGTH but checking
for one less.  We know the data will fit in it to that size.
Also we have asserts on the write to ensure we don't go over
it

Fixes: #8995
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #8987 from mobash-rasool/ospfv3-bug-fixes
Igor Ryzhov [Wed, 7 Jul 2021 14:28:14 +0000 (17:28 +0300)]
Merge pull request #8987 from mobash-rasool/ospfv3-bug-fixes

ospf6d: Fix crash in ospf6_asbr_lsa_remove at ospf6d/ospf6_asbr.c:696

3 years agodoc/workflow: YANG is a hard requirement
David Lamparter [Wed, 7 Jul 2021 13:48:39 +0000 (15:48 +0200)]
doc/workflow: YANG is a hard requirement

The text didn't reflect the YANG requirement decision yet.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agolib: fix coverity unused result warning
David Lamparter [Wed, 7 Jul 2021 12:57:36 +0000 (14:57 +0200)]
lib: fix coverity unused result warning

There's nothing that can be done here with an error.  Try to make
Coverity understand that this is intentional.

(I don't know if the `(void)` will actually fix the coverity warning,
but I don't really have a better way to figure it out beyond just
getting this merged and waiting for a result...)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agodoc/workflow: add guidelines for config knobs
David Lamparter [Wed, 7 Jul 2021 12:32:26 +0000 (14:32 +0200)]
doc/workflow: add guidelines for config knobs

This is pretty much common sense ("runtime knobs are easier to adjust
than a compile-time setting"), but maybe it should be said just for
reference.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoMerge pull request #8919 from mobash-rasool/ospfv3-fixes
Donald Sharp [Tue, 6 Jul 2021 20:13:05 +0000 (16:13 -0400)]
Merge pull request #8919 from mobash-rasool/ospfv3-fixes

ospf6d: Max aged LSAs are not getting deleted from DB

3 years agoMerge pull request #8930 from pjdruddy/ospf6_packet_debug
Donald Sharp [Tue, 6 Jul 2021 20:09:07 +0000 (16:09 -0400)]
Merge pull request #8930 from pjdruddy/ospf6_packet_debug

Ospf6 packet debug

3 years agoMerge pull request #8945 from ton31337/fix/check_only_ebgp_peer
Donald Sharp [Tue, 6 Jul 2021 20:06:54 +0000 (16:06 -0400)]
Merge pull request #8945 from ton31337/fix/check_only_ebgp_peer

bgpd: Parse as withdrawal if AS-PATH contains 0 within the path

3 years agoMerge pull request #8938 from volta-networks/fix_no_path_retries
Donald Sharp [Tue, 6 Jul 2021 19:36:46 +0000 (15:36 -0400)]
Merge pull request #8938 from volta-networks/fix_no_path_retries

pathd : Better RFC complain for two cases, no_path answer and srp_id handle

3 years agoospf6d: Fix crash in ospf6_asbr_lsa_remove at ospf6d/ospf6_asbr.c:696
github login name [Tue, 6 Jul 2021 11:31:21 +0000 (04:31 -0700)]
ospf6d: Fix crash in ospf6_asbr_lsa_remove at ospf6d/ospf6_asbr.c:696

Issue: Crash observed when LSAs are removed from LSDB after max age
when there is no area configured.
(gdb) bt
0  raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
1  0x00007fdb190548bc in core_handler (signo=6, siginfo=0x7ffdd2f5a470, context=<optimized out>) at lib/sigevent.c:262
2  <signal handler called>
3  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
4  0x00007fdb185ad921 in __GI_abort () at abort.c:79
5  0x00007fdb1907f199 in _zlog_assert_failed (xref=xref@entry=0x55f30902aa20 <_xref.21999>, extra=extra@entry=0x0) at lib/zlog.c:581
6  0x000055f308dc4f78 in ospf6_asbr_lsa_remove (lsa=0x55f30a7546d0, asbr_entry=0x0) at ospf6d/ospf6_asbr.c:696
7  0x000055f308dd8f0d in ospf6_lsdb_remove (lsa=0x55f30a7546d0, lsdb=lsdb@entry=0x55f30a73d300) at ospf6d/ospf6_lsdb.c:166
8  0x000055f308dd9701 in ospf6_lsdb_maxage_remover (lsdb=0x55f30a73d300) at ospf6d/ospf6_lsdb.c:376
9  0x000055f308dee724 in ospf6_maxage_remover (thread=<optimized out>) at ospf6d/ospf6_top.c:603
10 0x00007fdb1906520d in thread_call (thread=thread@entry=0x7ffdd2f5ae90) at lib/thread.c:1919
11 0x00007fdb19023e48 in frr_run (master=0x55f30a569b70) at lib/libfrr.c:1155
12 0x000055f308dc09b6 in main (argc=6, argv=0x7ffdd2f5b198, envp=<optimized out>) at ospf6d/ospf6_main.c:235
(gdb)

Steps to reproduce the issue:
1. router ospf6
2. redistribute static
3. ipv6 route 1::1/128 Null0
4. no redistribute static
5. wait for Max aged LSA to flush
6. Check DB, crash occurs.

RCA:
Crash occurred while accessing listgetdata(listhead(ospf6->area_list))
When there is no area attached to any of the interface listhead(ospf6->area_list)
is NULL. Therefore it crashed due to NULL access.

Fix:
Check before accessing null pointer.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
3 years agoMerge pull request #8508 from opensourcerouting/systemd-no-lib
Quentin Young [Tue, 6 Jul 2021 14:54:25 +0000 (14:54 +0000)]
Merge pull request #8508 from opensourcerouting/systemd-no-lib

3 years agoMerge pull request #8942 from ton31337/fix/cleanups_2
Donald Sharp [Tue, 6 Jul 2021 13:47:41 +0000 (09:47 -0400)]
Merge pull request #8942 from ton31337/fix/cleanups_2

Another round of cleanup

3 years agoMerge pull request #8972 from ton31337/fix/bgp_extended_msg_support
Donald Sharp [Tue, 6 Jul 2021 13:41:45 +0000 (09:41 -0400)]
Merge pull request #8972 from ton31337/fix/bgp_extended_msg_support

bgpd: Extended message support potential fixes

3 years agoMerge pull request #8975 from ton31337/fix/show_ip_route_json_prefix_formatting
Donald Sharp [Tue, 6 Jul 2021 13:40:19 +0000 (09:40 -0400)]
Merge pull request #8975 from ton31337/fix/show_ip_route_json_prefix_formatting

zebra: Do not escape forward slashes for `show ip route json`

3 years agoMerge pull request #8939 from LabNConsulting/chopps/sup-bund-fixes
Donald Sharp [Tue, 6 Jul 2021 11:58:19 +0000 (07:58 -0400)]
Merge pull request #8939 from LabNConsulting/chopps/sup-bund-fixes

Speedup support bundles, fix bugs, add CLI timestamp

3 years agobgpd: Do not delete peer_af when deactivating peer-group.
zyxwvu Shi [Wed, 26 May 2021 02:33:55 +0000 (10:33 +0800)]
bgpd: Do not delete peer_af when deactivating peer-group.

There is no peer_af allocated in `peer_activate`. Trying to delete
the structure just results in an no-op and a error return value.
The error message "couldn't delete af structure for peer" is
unexpected.

Signed-off-by: zyxwvu Shi <shiyuchen.syc@bytedance.com>
3 years agoMerge pull request #8958 from pguibert6WIND/choose_ipv6_linklocal_nht
Donatas Abraitis [Tue, 6 Jul 2021 11:27:15 +0000 (14:27 +0300)]
Merge pull request #8958 from pguibert6WIND/choose_ipv6_linklocal_nht

bgpd: nht unresolved with global address next-hop

3 years agoMerge pull request #8976 from ton31337/fix/bgp_dest_unlock_node
Patrick Ruddy [Tue, 6 Jul 2021 08:03:40 +0000 (09:03 +0100)]
Merge pull request #8976 from ton31337/fix/bgp_dest_unlock_node

bgpd: Unlock bgp_dest for bgp_distance_unset if distance does not match

3 years agotests: add OSPF graceful restart topotest
Renato Westphal [Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)]
tests: add OSPF graceful restart topotest

Add a new topotest that features a topology with seven routers spread
across four OSPF areas:
* 1 backbone area;
* 1 regular non-backbone area (0.0.0.1);
* 1 stub area (0.0.0.2);
* 1 NSSA area (0.0.0.3).

All routers have both GR and GR helper functionality enabled in
the configuration. The test consists of restarting each router,
one at time, and checking that all forwarding planes (and LSDBs)
are kept intact during those restarts.

A successful run takes about three minutes to finish.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agotests: add "save_config" parameter to kill_router_daemons()
Renato Westphal [Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)]
tests: add "save_config" parameter to kill_router_daemons()

Using "write memory" to save the daemons' configurations before
restarting them can cause log files to stop working correctly. Add
a new "save_config" to the kill_router_daemons() function to prevent
that from happening when saving the configurations isn't necessary.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospfd: introduce support for Graceful Restart (restarting mode)
Renato Westphal [Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)]
ospfd: introduce support for Graceful Restart (restarting mode)

RFC 3623 specifies the Graceful Restart enhancement to the OSPF
routing protocol. This PR implements support for the restarting mode,
whereas the helper mode was implemented by #6811.

This work is based on #6782, which implemented the pre-restart part
and settled the foundations for the post-restart part (behavioral
changes, GR exit conditions, and on-exit actions).

Here's a quick summary of how the GR restarting mode works:
* GR can be enabled on a per-instance basis using the `graceful-restart
  [grace-period (1-1800)]` command;
* To perform a graceful shutdown, the `graceful-restart prepare ospf`
  EXEC-level command needs to be issued before restarting the ospfd
  daemon (there's no specific requirement on how the daemon should
  be restarted);
* `graceful-restart prepare ospf` will initiate the graceful restart
  for all GR-enabled instances by taking the following actions:
  o Flooding Grace-LSAs over all interfaces
  o Freezing the OSPF routes in the RIB
  o Saving the end of the grace period in non-volatile memory (a JSON
    file stored in `$frr_statedir`)
* Once ospfd is started again, it will follow the procedures
  described in RFC 3623 until it detects it's time to exit the graceful
  restart (either successfully or unsuccessfully).

Testing done:
* New topotest featuring a multi-area OSPF topology (including stub
  and NSSA areas);
* Successful interop tests against IOS-XR routers acting as helpers.

Co-authored-by: GalaxyGorilla <sascha@netdef.org>
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospfd: rename the graceful restart header
Renato Westphal [Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)]
ospfd: rename the graceful restart header

Both the GR helper code and the upcoming GR restarting code are going
to share a lot of definitions. As such, rename ospf_gr_helper.h to
ospf_gr.h, which will be the central point of all GR definitions
and prototypes.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoospfd: adjust log config for GR
GalaxyGorilla [Mon, 7 Dec 2020 12:13:26 +0000 (12:13 +0000)]
ospfd: adjust log config for GR

Remove previous log config

debug ospf graceful-restart helper

and just use

debug ospf graceful-restart

for everything related to OSPF GR.

Signed-off-by: GalaxyGorilla <sascha@netdef.org>
3 years agoospfd: print extra LSA information in some log messages
Renato Westphal [Mon, 31 May 2021 13:27:51 +0000 (10:27 -0300)]
ospfd: print extra LSA information in some log messages

Log the LSA advertising router in addition to the LSA type and
ID in the places where that information is necessary to uniquely
identify the LSA in the LSDB.

This is useful, for example, to know exactly which LSA has changed
when the router is exiting from the GR helper mode when a topology
change was detected.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
3 years agoMerge pull request #8979 from opensourcerouting/msdp-topotest-speedup
Donatas Abraitis [Mon, 5 Jul 2021 06:16:27 +0000 (09:16 +0300)]
Merge pull request #8979 from opensourcerouting/msdp-topotest-speedup

topotests: speed up MSDP convergence speed

3 years agoMerge pull request #8888 from dlqs/lua-call
Quentin Young [Mon, 5 Jul 2021 04:13:20 +0000 (04:13 +0000)]
Merge pull request #8888 from dlqs/lua-call

3 years agoMerge pull request #7674 from oerdnj/embedded-deb-packages
Martin Winter [Sun, 4 Jul 2021 14:59:19 +0000 (16:59 +0200)]
Merge pull request #7674 from oerdnj/embedded-deb-packages

Convert the packaging to use git-buildpackage

3 years agotopotests: speed up MSDP convergence speed
Rafael Zalamena [Sun, 4 Jul 2021 14:17:10 +0000 (11:17 -0300)]
topotests: speed up MSDP convergence speed

Decrease the connection retry time to reduce test duration on connection
failures.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoMerge pull request #8974 from FRRouting/revert-8795-fix-ospf6-router-id
Christian Hopps [Sat, 3 Jul 2021 23:40:03 +0000 (19:40 -0400)]
Merge pull request #8974 from FRRouting/revert-8795-fix-ospf6-router-id

Revert "ospf6d: fix LSAs remain in LSDB with an old router-id value"

3 years agobgpd: Unlock bgp_dest for bgp_distance_unset if distance does not match
Donatas Abraitis [Sat, 3 Jul 2021 19:16:31 +0000 (22:16 +0300)]
bgpd: Unlock bgp_dest for bgp_distance_unset if distance does not match

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agodebian: Merge the official Debian changelog into d/changelog
Ondřej Surý [Mon, 17 May 2021 18:20:33 +0000 (20:20 +0200)]
debian: Merge the official Debian changelog into d/changelog

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agotools: Simplify the script to build Debian binary package
Igor Ryzhov [Mon, 17 May 2021 18:18:01 +0000 (20:18 +0200)]
tools: Simplify the script to build Debian binary package

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Update the upstream version to 7.7~dev-1
Ondřej Surý [Tue, 4 May 2021 20:53:33 +0000 (22:53 +0200)]
debian: Update the upstream version to 7.7~dev-1

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodoc: Use dpkg-buildpackage to build packages (add note about debuild)
Ondřej Surý [Mon, 15 Feb 2021 07:43:26 +0000 (08:43 +0100)]
doc: Use dpkg-buildpackage to build packages (add note about debuild)

The debuild command fails when we are doing source package only build
because it expects the arch-dependent .changes file to be present.  Thus
in the instructions we switch to using dpkg-buildpackage directly and
add a note about using debuild in more complicated scenarios.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodoc: Add instructions on how to build only source packages
Ondřej Surý [Mon, 15 Feb 2021 07:40:08 +0000 (08:40 +0100)]
doc: Add instructions on how to build only source packages

In the CI, it's better to build the source package only once and then
instead of checking out the whole repository, only distribute the source
packages to the individual jobs.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodoc: Update debian packaging instructions
Ondřej Surý [Thu, 11 Feb 2021 20:27:49 +0000 (21:27 +0100)]
doc: Update debian packaging instructions

The debian packaging instructions have been updated, so they actually
work.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Add support for Debian bullseye to the packaging script
Ondřej Surý [Thu, 11 Feb 2021 19:53:43 +0000 (20:53 +0100)]
debian: Add support for Debian bullseye to the packaging script

The Debian bullseye is frozen now, so this adds support to this
Debian release to the packaging script.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Fix the debian packaging script to build on non-default branch
Ondřej Surý [Thu, 11 Feb 2021 19:44:09 +0000 (20:44 +0100)]
debian: Fix the debian packaging script to build on non-default branch

The packaging script would fail to run on non-master branch, fix that
by pulling original branch name.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Make the autopkgtest more resilient (Closes: #980111)
Ondřej Surý [Sun, 7 Feb 2021 11:52:35 +0000 (12:52 +0100)]
debian: Make the autopkgtest more resilient (Closes: #980111)

The Debian autopkgtest would fail with new PAM introduced in Debian bullseye.
Add a little loop to wait a little longer for the changes to propagate.

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Update the tools/build-debian-package.sh to be example build script
Ondřej Surý [Sun, 27 Sep 2020 11:17:57 +0000 (13:17 +0200)]
debian: Update the tools/build-debian-package.sh to be example build script

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Remove now obsolete tarsource.sh script
Ondřej Surý [Sun, 27 Sep 2020 10:18:21 +0000 (12:18 +0200)]
debian: Remove now obsolete tarsource.sh script

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Remove the changelog-auto automation in favor of dch
Ondřej Surý [Sun, 27 Sep 2020 09:46:31 +0000 (11:46 +0200)]
debian: Remove the changelog-auto automation in favor of dch

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Update tools/build-debian-package.sh to use git-buildpackage
Ondřej Surý [Sun, 27 Sep 2020 09:08:13 +0000 (11:08 +0200)]
debian: Update tools/build-debian-package.sh to use git-buildpackage

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Adjust tarsource.sh to use native debian/changelog
Ondřej Surý [Sat, 26 Sep 2020 16:53:34 +0000 (18:53 +0200)]
debian: Adjust tarsource.sh to use native debian/changelog

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agodebian: Merge various debian changelogs in debian/changelog
Ondřej Surý [Sat, 26 Sep 2020 16:33:06 +0000 (18:33 +0200)]
debian: Merge various debian changelogs in debian/changelog

Signed-off-by: Ondřej Surý <ondrej@sury.org>
3 years agozebra: Show prefixLen in `show ip route json` output additionally
Donatas Abraitis [Sat, 3 Jul 2021 11:17:28 +0000 (14:17 +0300)]
zebra: Show prefixLen in `show ip route json` output additionally

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agozebra: Do not escape forward slashes for `show ip route json`
Donatas Abraitis [Sat, 3 Jul 2021 11:09:28 +0000 (14:09 +0300)]
zebra: Do not escape forward slashes for `show ip route json`

Basically, this is handled by JSON-C library. I've compiled with the
latest release of json-c and it works well.

Didn't test with various distribution versions, but this change is kinda
dependend from the json-c lib version the distra has.

Before:
```
  "192.168.100.1\/32":[
    {
      "prefix":"192.168.100.1\/32",
```

After:
```
  "192.168.100.1/32":[
    {
      "prefix":"192.168.100.1/32",
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Show max packet size per update-group
Donatas Abraitis [Fri, 2 Jul 2021 20:48:16 +0000 (23:48 +0300)]
bgpd: Show max packet size per update-group

```
exit1-debian-9# sh ip bgp update-groups
Update-group 2:
  Created: Fri Jul  2 20:47:23 2021
  MRAI value (seconds): 0

  Update-subgroup 2:
    Created: Fri Jul  2 20:47:23 2021
    Join events: 1
    Prune events: 0
    Merge events: 0
    Split events: 0
    Update group switch events: 0
    Peer refreshes combined: 0
    Merge checks triggered: 0
    Coalesce Time: 1200
    Version: 14
    Packet queue length: 0
    Total packets enqueued: 8
    Packet queue high watermark: 1
    Adj-out list count: 11
    Advertise list: empty
    Flags:
    Max packet size: 65535
    Peers:
      - eth1
Update-group 3:
  Created: Fri Jul  2 20:47:43 2021
  MRAI value (seconds): 0

  Update-subgroup 3:
    Created: Fri Jul  2 20:47:43 2021
    Join events: 1
    Prune events: 0
    Merge events: 0
    Split events: 0
    Update group switch events: 0
    Peer refreshes combined: 0
    Merge checks triggered: 0
    Coalesce Time: 1200
    Version: 14
    Packet queue length: 0
    Total packets enqueued: 8
    Packet queue high watermark: 1
    Adj-out list count: 11
    Advertise list: empty
    Flags:
    Max packet size: 4096
    Peers:
      - 192.168.10.17
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Set 4096 instead of 65535 as new max packet size for a new peer
Donatas Abraitis [Fri, 2 Jul 2021 13:50:39 +0000 (16:50 +0300)]
bgpd: Set 4096 instead of 65535 as new max packet size for a new peer

New peers should be initialized with a usual max packet size and later
determined on OPEN messages.

Testing with different peers supporting/not supporting extended support.

2021/07/02 13:48:00 BGP: [WEV7K-2GAQ5] u2:s2 send UPDATE len 8991 (max message len: 65535) numpfx 1788
2021/07/02 13:48:03 BGP: [WEV7K-2GAQ5] u3:s3 send UPDATE len 4096 (max message len: 4096) numpfx 809
2021/07/02 13:48:03 BGP: [WEV7K-2GAQ5] u3:s3 send UPDATE len 4096 (max message len: 4096) numpfx 809

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Create another update-group depending on max bgp packet size
Donatas Abraitis [Fri, 2 Jul 2021 13:48:11 +0000 (16:48 +0300)]
bgpd: Create another update-group depending on max bgp packet size

This should be garuanteed that we create a separate update-group if
bgp max packet size differs.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agodoc: space code block
Donald Lee [Fri, 2 Jul 2021 20:34:50 +0000 (04:34 +0800)]
doc: space code block

Signed-off-by: Donald Lee <dlqs@gmx.com>
3 years agoRevert "ospf6d: fix LSAs remain in LSDB with an old router-id value"
Donald Sharp [Fri, 2 Jul 2021 16:38:11 +0000 (12:38 -0400)]
Revert "ospf6d: fix LSAs remain in LSDB with an old router-id value"

3 years agoMerge pull request #8969 from opensourcerouting/msdp-timers
Donald Sharp [Fri, 2 Jul 2021 15:39:58 +0000 (11:39 -0400)]
Merge pull request #8969 from opensourcerouting/msdp-timers

pimd: allow MSDP timers to be configured

3 years agoMerge pull request #8955 from mobash-rasool/ospfv2-fixes
Mark Stapp [Fri, 2 Jul 2021 13:03:53 +0000 (09:03 -0400)]
Merge pull request #8955 from mobash-rasool/ospfv2-fixes

ospfd: show ip ospf route json does not shown metric and tag

3 years agoMerge pull request #8970 from ton31337/fix/use_IPV6_MAX_BITLEN
Mark Stapp [Fri, 2 Jul 2021 11:52:22 +0000 (07:52 -0400)]
Merge pull request #8970 from ton31337/fix/use_IPV6_MAX_BITLEN

*: Do not use 32/128 numbers for prefixlen

3 years agoMerge pull request #8795 from louis-oui/fix-ospf6-router-id
Philippe Guibert [Fri, 2 Jul 2021 09:11:47 +0000 (11:11 +0200)]
Merge pull request #8795 from louis-oui/fix-ospf6-router-id

ospf6d: fix LSAs remain in LSDB with an old router-id value

3 years ago*: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN
Donatas Abraitis [Thu, 1 Jul 2021 20:29:26 +0000 (23:29 +0300)]
*: Replace 4/16 integers to IPV4_MAX_BYTELEN/IPV6_MAX_BYTELEN

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years ago*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen
Donatas Abraitis [Thu, 1 Jul 2021 15:05:11 +0000 (18:05 +0300)]
*: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoMerge pull request #8962 from donaldsharp/bgp_ll_must_be_there
Igor Ryzhov [Thu, 1 Jul 2021 17:20:23 +0000 (20:20 +0300)]
Merge pull request #8962 from donaldsharp/bgp_ll_must_be_there

bgpd: Ensure v6 LL address is available before establishing peering

3 years agobabeld: Drop in_prefix() function
Donatas Abraitis [Thu, 1 Jul 2021 14:54:10 +0000 (17:54 +0300)]
babeld: Drop in_prefix() function

Not used.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years ago*: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen
Donatas Abraitis [Thu, 1 Jul 2021 14:53:21 +0000 (17:53 +0300)]
*: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years ago*: Replace IPV4_MAX_PREFIXLEN to IPV4_MAX_BITLEN
Donatas Abraitis [Thu, 1 Jul 2021 14:42:03 +0000 (17:42 +0300)]
*: Replace IPV4_MAX_PREFIXLEN to IPV4_MAX_BITLEN

Just drop IPV4_MAX_PREFIXLEN at all, no need keeping both.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years ago*: Replace IPV6_MAX_PREFIXLEN to IPV6_MAX_BITLEN
Donatas Abraitis [Thu, 1 Jul 2021 14:39:04 +0000 (17:39 +0300)]
*: Replace IPV6_MAX_PREFIXLEN to IPV6_MAX_BITLEN

Just drop IPV6_MAX_PREFIXLEN at all, no need keeping both.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen
Donatas Abraitis [Thu, 1 Jul 2021 14:37:04 +0000 (17:37 +0300)]
bgpd: Convert numeric 32 into IPV4_MAX_BITLEN for prefixlen

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen
Donatas Abraitis [Thu, 1 Jul 2021 14:35:02 +0000 (17:35 +0300)]
bgpd: Convert numeric 128 into IPV6_MAX_BITLEN for prefixlen

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: nht unresolved with global address next-hop
Philippe Guibert [Wed, 30 Jun 2021 12:07:52 +0000 (14:07 +0200)]
bgpd: nht unresolved with global address next-hop

When bgp peers with ipv6 link local addresses, it may receive a
BGP update with next-hop containing both LL and GA information.
By default, nexthop tracking applies to GA, and ignores presence
of LL, when both addresses are present. This is a problem for
resolving GA as next-hop as the next-hop information can be solved
by using the LL address only.

The solution consists in defaulting the nexthop ipv6 choice to LL
when available, and moving back to GA if a route-map is locally
configured at inbound.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
3 years agodoc: document new PIM MSDP timers command
Rafael Zalamena [Thu, 1 Jul 2021 12:58:00 +0000 (09:58 -0300)]
doc: document new PIM MSDP timers command

Let the user know how to use it and what are the default values.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agodoc: simplify PIM RIB title
Rafael Zalamena [Thu, 1 Jul 2021 11:43:35 +0000 (08:43 -0300)]
doc: simplify PIM RIB title

Don't use colon and make it more generic.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agopimd: support MSDP global timers configuration
Rafael Zalamena [Tue, 20 Apr 2021 19:17:48 +0000 (16:17 -0300)]
pimd: support MSDP global timers configuration

Users can now configure:

 * Hold time
 * Keep alive
 * Connection retry

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
3 years agoospf6d: harmonize ospf6_asbr_redistribute_disable and _reset
Louis Scalbert [Tue, 22 Jun 2021 08:45:53 +0000 (10:45 +0200)]
ospf6d: harmonize ospf6_asbr_redistribute_disable and _reset

Harmonize the code of functions ospf6_asbr_redistribute_disable and
ospf6_asbr_redistribute_reset.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>