]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
3 years agoMerge pull request #9221 from FRRouting/mergify/bp/stable/8.0/pr-9209
Donatas Abraitis [Fri, 30 Jul 2021 14:34:18 +0000 (17:34 +0300)]
Merge pull request #9221 from FRRouting/mergify/bp/stable/8.0/pr-9209

bgpd: Mark the node as the correct type for bgp ipv6 unicast (backport #9209)

3 years agoMerge pull request #9233 from ton31337/fix/backport_cd58568b1889df753aa258ee61b6d949b...
Russ White [Fri, 30 Jul 2021 14:16:32 +0000 (10:16 -0400)]
Merge pull request #9233 from ton31337/fix/backport_cd58568b1889df753aa258ee61b6d949b1ce6fb9

bgpd: [8.0] fix missing list add in dampening

3 years agoMerge pull request #9230 from FRRouting/mergify/bp/stable/8.0/pr-9222
Russ White [Fri, 30 Jul 2021 14:16:09 +0000 (10:16 -0400)]
Merge pull request #9230 from FRRouting/mergify/bp/stable/8.0/pr-9222

bgpd: Drop double-pointer for bgp_damp_info_free() (backport #9222)

3 years agobgpd: fix missing list add in dampening
Igor Ryzhov [Thu, 29 Jul 2021 11:42:16 +0000 (14:42 +0300)]
bgpd: fix missing list add in dampening

One more crash in dampening code...

When bgp_damp_withdraw is called, if there's already a BDI structure,
bgp_damp_info_claim is called to re-assign the bdi->config in case it
was changed. The problem is that bgp_damp_info_claim actually removes
the BDI from the reuse list of the old config and never adds it to the
reuse list of the new config. We must do this to prevent the crash
because all the code assumes that BDI is always in some list.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9226 from idryzhov/8.0-backport-8860-8920
Russ White [Thu, 29 Jul 2021 19:03:58 +0000 (15:03 -0400)]
Merge pull request #9226 from idryzhov/8.0-backport-8860-8920

[8.0] backport 8860 + 8920

3 years agobgpd: Drop double-pointer for bgp_damp_info_free()
Donatas Abraitis [Thu, 29 Jul 2021 08:11:15 +0000 (11:11 +0300)]
bgpd: Drop double-pointer for bgp_damp_info_free()

This causes a crash using `clear ip bgp dampening <prefix>`.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit 19971c9a9218b31e6e1c3f7ebb23654f833bb4ef)

3 years agoMerge pull request #9223 from FRRouting/mergify/bp/stable/8.0/pr-9215
Donatas Abraitis [Thu, 29 Jul 2021 14:24:45 +0000 (17:24 +0300)]
Merge pull request #9223 from FRRouting/mergify/bp/stable/8.0/pr-9215

bgpd: fix double free in dampening code (backport #9215)

3 years agobgpd: Fix SA warning about freeing an aspath
Mark Stapp [Thu, 24 Jun 2021 11:50:23 +0000 (07:50 -0400)]
bgpd: Fix SA warning about freeing an aspath

Fix coverity warning CID 1505589

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agotests: Check if as-path prepends work with route-maps and default-originate
Donatas Abraitis [Tue, 15 Jun 2021 12:49:24 +0000 (15:49 +0300)]
tests: Check if as-path prepends work with route-maps and default-originate

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: Allow aspath prepending for default-originate with route-maps
Donatas Abraitis [Tue, 15 Jun 2021 11:55:17 +0000 (14:55 +0300)]
bgpd: Allow aspath prepending for default-originate with route-maps

The initial idea was to deny prepending and just use _self_.

This patch at least allows prepending aspath with route-maps, but drops
all non-self ASNs in the path.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agobgpd: fix double free in dampening code
Igor Ryzhov [Wed, 28 Jul 2021 21:14:31 +0000 (00:14 +0300)]
bgpd: fix double free in dampening code

bgp_damp_info_unclaim already calls bgp_reuselist_del. We must not call
it again here.

Fixes #9046.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 96d6b8cc29bf5124ae93433ecfc16b3fd69be5ea)

3 years agobgpd: Mark the node as the correct type for bgp ipv6 unicast
Donald Sharp [Wed, 28 Jul 2021 14:56:48 +0000 (10:56 -0400)]
bgpd: Mark the node as the correct type for bgp ipv6 unicast

The bgp ipv6 unicast node should be called `bgp ipv6 unicast`
to make it consistent with other nodes where we list the afi/safi

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit a17cfb3fdaacbdc1d7303aeb898939595dc931ad)

3 years agoMerge pull request #9208 from FRRouting/mergify/bp/stable/8.0/pr-9189
Donald Sharp [Wed, 28 Jul 2021 19:12:24 +0000 (15:12 -0400)]
Merge pull request #9208 from FRRouting/mergify/bp/stable/8.0/pr-9189

ospfd: don't exit when socket is not created (backport #9189)

3 years agoMerge pull request #9183 from FRRouting/mergify/bp/stable/8.0/pr-9166
Donald Sharp [Wed, 28 Jul 2021 14:37:32 +0000 (10:37 -0400)]
Merge pull request #9183 from FRRouting/mergify/bp/stable/8.0/pr-9166

vtysh: another take at "enable" in vtysh user mode (backport #9166)

3 years agoospfd: don't exit when socket is not created
Igor Ryzhov [Tue, 27 Jul 2021 13:10:35 +0000 (16:10 +0300)]
ospfd: don't exit when socket is not created

Let's be less radical. There's no reason to stop the whole daemon when
there's a socket creation error in a single VRF. The user can always
restart this single VRF to retry to create a socket.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 95d7a42a1adb441741723e956004a12033164c1d)

3 years agoMerge pull request #9184 from FRRouting/revert-9175-mergify/bp/stable/8.0/pr-8983
Igor Ryzhov [Tue, 27 Jul 2021 12:10:49 +0000 (15:10 +0300)]
Merge pull request #9184 from FRRouting/revert-9175-mergify/bp/stable/8.0/pr-8983

Revert "pimd: Minor fixes for BSM Show CLI and Hold Timer CLI (backport #8983)"

3 years agoMerge pull request #9182 from FRRouting/revert-9179-PR9001-for-8.0
Igor Ryzhov [Tue, 27 Jul 2021 12:10:39 +0000 (15:10 +0300)]
Merge pull request #9182 from FRRouting/revert-9179-PR9001-for-8.0

Revert "Backport of PR 9001 and PR 8174 for 8.0"

3 years agoRevert "pimd: Minor fixes for BSM Show CLI and Hold Timer CLI (backport #8983)"
Donald Sharp [Mon, 26 Jul 2021 11:51:45 +0000 (07:51 -0400)]
Revert "pimd: Minor fixes for BSM Show CLI and Hold Timer CLI (backport #8983)"

3 years agovtysh: don't install "enable" command in user mode
Igor Ryzhov [Fri, 23 Jul 2021 15:38:20 +0000 (18:38 +0300)]
vtysh: don't install "enable" command in user mode

Recent change in d1b287e only fixed the problem for 3-letter words.

We were still displaying error for longer words starting with "ena":
```
nfware> enac
% Command not allowed: enable
nfware> enad
% Command not allowed: enable
nfware> enaena
% Command not allowed: enable
```

If we don't allow "enable" command in user mode, why add it at all?

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit c54796288e8b55b3f5c241aa242ef81f1df76e44)

3 years agoRevert "Backport of PR 9001 and PR 8174 for 8.0" revert-9179-PR9001-for-8.0
Donald Sharp [Mon, 26 Jul 2021 11:32:35 +0000 (07:32 -0400)]
Revert "Backport of PR 9001 and PR 8174 for 8.0"

3 years agoMerge pull request #9179 from opensourcerouting/PR9001-for-8.0
Donatas Abraitis [Mon, 26 Jul 2021 11:01:49 +0000 (14:01 +0300)]
Merge pull request #9179 from opensourcerouting/PR9001-for-8.0

Backport of PR 9001 and PR 8174 for 8.0

3 years agoMerge pull request #9177 from FRRouting/mergify/bp/stable/8.0/pr-8905
Martin Winter [Sun, 25 Jul 2021 17:58:27 +0000 (19:58 +0200)]
Merge pull request #9177 from FRRouting/mergify/bp/stable/8.0/pr-8905

Isis argv (backport #8905)

3 years agoMerge pull request #9175 from FRRouting/mergify/bp/stable/8.0/pr-8983
Martin Winter [Sun, 25 Jul 2021 17:57:45 +0000 (19:57 +0200)]
Merge pull request #9175 from FRRouting/mergify/bp/stable/8.0/pr-8983

pimd: Minor fixes for BSM Show CLI and Hold Timer CLI (backport #8983)

3 years agozebra: When passing lookup information back pass the fully resolved
Donald Sharp [Wed, 7 Jul 2021 20:52:24 +0000 (16:52 -0400)]
zebra: When passing lookup information back pass the fully resolved

In the reachability code we auto pass back the fully resolved
nexthops.  Modify the ZEBRA_IPV4_NEXTHOP_LOOKUP_MRIB code
to do the exact same thing so that the zclient_lookup_nexthop
code does not need to recursively look for the data that
zebra already has.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agozebra: add config control to hide backup nh events in nht
Mark Stapp [Mon, 1 Mar 2021 15:48:05 +0000 (10:48 -0500)]
zebra: add config control to hide backup nh events in nht

Add a config that can control hiding of backup-nexthop activation
changes in nexthop-tracking.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agozebra: optionally hide backup-nexthop events in nht
Mark Stapp [Mon, 1 Mar 2021 15:49:32 +0000 (10:49 -0500)]
zebra: optionally hide backup-nexthop events in nht

Optionally hide route changes that only involve backup nexthop
activation/deactivation. The goal is to avoid route churn during
backup nexthop switchover events, before the resolving routes
re-converge. A UI config enables this 'hiding' behavior.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
3 years agoisisd: using argv as a string name is categorically wrong
Donald Sharp [Tue, 22 Jun 2021 16:44:24 +0000 (12:44 -0400)]
isisd: using argv as a string name is categorically wrong

We are passing around the system id using the variable name
of `argv`.  Let's name the variable correctly and pass it around
correctly named.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 1d88e63a4e3d29cec6f49602e3263f13a8de3d1e)

3 years agoisisd: already checked for NULL
Donald Sharp [Tue, 22 Jun 2021 16:36:16 +0000 (12:36 -0400)]
isisd: already checked for NULL

in lsp_for_arg we have already checked for NULL and returned
if argv is null.  We do not need to check for it again.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 730649da0eb8700ac9853c6b77e5f0300f3f0c14)

3 years agopimd: zlog_info changed to zlog_notice for neighbor up/down event
github login name [Mon, 5 Jul 2021 11:42:42 +0000 (04:42 -0700)]
pimd: zlog_info changed to zlog_notice for neighbor up/down event

Co-authored-by: Sarita Patra <saritap@vmware.com>
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
(cherry picked from commit 69b2df12bb54f5a776dc40bb4b360a152b2cc9c8)

3 years agopimd: make pim interface hold interval range 1-630
github login name [Mon, 5 Jul 2021 11:07:25 +0000 (04:07 -0700)]
pimd: make pim interface hold interval range 1-630

Making the interface holdtime range to 3.5 times the hello-time

As per 7761, Section 4.11:
The Holdtime in a Hello message should be set to
   (3.5 * Hello_Period), giving a default value of 105 seconds.

Therefore providing the user also to configure max upto 3.5 times
the hello timer interval.

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
(cherry picked from commit 142774530ade49f63997bd52c434457fe8979bdf)

3 years agopimd: Adding BSM status in the show commands
github login name [Mon, 5 Jul 2021 07:16:10 +0000 (00:16 -0700)]
pimd: Adding BSM status in the show commands

Adding BSM status in the CLI and json output for
"show ip pim interface"

Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
(cherry picked from commit 6eedc1a5b9d67e0c55b89125b5ddd584b4bd5e32)

3 years agoMerge pull request #9172 from FRRouting/mergify/bp/stable/8.0/pr-8864
Donatas Abraitis [Sun, 25 Jul 2021 08:24:54 +0000 (11:24 +0300)]
Merge pull request #9172 from FRRouting/mergify/bp/stable/8.0/pr-8864

lib: fix interface configuration after vrf change (backport #8864)

3 years agoMerge pull request #9174 from FRRouting/mergify/bp/stable/8.0/pr-8731
Martin Winter [Sat, 24 Jul 2021 22:22:00 +0000 (00:22 +0200)]
Merge pull request #9174 from FRRouting/mergify/bp/stable/8.0/pr-8731

zebra: Fix pseudowires with backup nexthops (backport #8731)

3 years agoMerge pull request #9173 from FRRouting/mergify/bp/stable/8.0/pr-8824
Martin Winter [Sat, 24 Jul 2021 22:20:28 +0000 (00:20 +0200)]
Merge pull request #9173 from FRRouting/mergify/bp/stable/8.0/pr-8824

isisd, ospfd: update interface_link_params callback to check for change (backport #8824)

3 years agoMerge pull request #9171 from FRRouting/mergify/bp/stable/8.0/pr-9039
Martin Winter [Sat, 24 Jul 2021 22:17:21 +0000 (00:17 +0200)]
Merge pull request #9171 from FRRouting/mergify/bp/stable/8.0/pr-9039

bgpd: Do not check for NULL values for vni_hash_cmp() (backport #9039)

3 years agoMerge pull request #9170 from FRRouting/mergify/bp/stable/8.0/pr-9036
Martin Winter [Sat, 24 Jul 2021 22:16:38 +0000 (00:16 +0200)]
Merge pull request #9170 from FRRouting/mergify/bp/stable/8.0/pr-9036

bgpd: hash compare functions never receive null values (backport #9036)

3 years agoMerge pull request #9169 from FRRouting/mergify/bp/stable/8.0/pr-8780
Martin Winter [Sat, 24 Jul 2021 22:15:48 +0000 (00:15 +0200)]
Merge pull request #9169 from FRRouting/mergify/bp/stable/8.0/pr-8780

zebra: fix a couple of coverity warnings (backport #8780)

3 years agoMerge pull request #9168 from FRRouting/mergify/bp/stable/8.0/pr-8836
Martin Winter [Sat, 24 Jul 2021 21:43:06 +0000 (23:43 +0200)]
Merge pull request #9168 from FRRouting/mergify/bp/stable/8.0/pr-8836

bgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove() (backport #8836)

3 years agozebra: update pw dataplane info
Mark Stapp [Fri, 4 Jun 2021 17:15:50 +0000 (13:15 -0400)]
zebra: update pw dataplane info

Include the complete set of primary and backup nexthops from
the resolving route for a pseudowire. Add accessors for that
info. Modify the logic that creates the fib set of pw nexthops
so that only installed, labelled nexthops are included.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
(cherry picked from commit 072b487b8f1b07829ccc547627ef7a0aa84ab289)

3 years agozebra: revise pw reachability logic
Mark Stapp [Wed, 10 Mar 2021 15:36:46 +0000 (10:36 -0500)]
zebra: revise pw reachability logic

Modify the pseudowire reachability logic so that it returns
success if there is at least one installed labelled nexthop for
the route resolving the pw destination. We also check for
valid backup nexthops if necessary, in case there's been a
switchover event.
Only OpenBSD requires that _all_ nexthops be labelled, so we
have a more strict version of the logic also.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
(cherry picked from commit 0d145d47c89263caeb2ae21fe09ac6d5e99de789)

3 years agozebra: add boolean to control pw reachability checking
Mark Stapp [Thu, 10 Jun 2021 20:49:56 +0000 (16:49 -0400)]
zebra: add boolean to control pw reachability checking

Add a boolean to control whether pseudowire reachability
checking needs to be strict.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
(cherry picked from commit 6fb3580882bef9cf94aa69a4b202eb9ea5307898)

3 years agozebra: use const in rib_match
Mark Stapp [Thu, 10 Jun 2021 20:48:22 +0000 (16:48 -0400)]
zebra: use const in rib_match

Use const in common rib_match api.

Signed-off-by: Mark Stapp <mjs@voltanet.io>
(cherry picked from commit bc77c3bb8abb15ff29c5e93a97e08fe3b7a3d1e9)

3 years agoisisd, ospfd: update interface_link_params callback to check for change
Karen Schoener [Thu, 17 Jun 2021 13:26:36 +0000 (09:26 -0400)]
isisd, ospfd: update interface_link_params callback to check for change

Adding defensive code to the interface_link_params zebra callback
to check if the link params changed before taking action.

Signed-off-by: Karen Schoener <karen@voltanet.io>
(cherry picked from commit 0b4124c18cb826849f18af58dbc712db7d14b993)

3 years agolib: fix interface configuration after vrf change
Igor Ryzhov [Wed, 16 Jun 2021 11:07:30 +0000 (14:07 +0300)]
lib: fix interface configuration after vrf change

This commit fixes the following problem:

- enter the interface node
- move the interface to another VRF
- try to continue configuring the interface

It is not possible to continue configuration because the XPath stored in
the vty doesn't correspond with the actual state of the system anymore.

For example:
```
nfware# conf
nfware(config)# interface enp2s0

<-- move the enp2s0 to a different VRF -->

nfware(config-if)# ip router isis 1
% Failed to get iface dnode in candidate DB
```

To fix the issue, go through all connected vty shells and update the
stored XPath.

Suggested-by: Renato Westphal <renato@opensourcerouting.org>
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 763725cd5e431cb4f4ec385e35b312cc7807163a)

3 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>
(cherry picked from commit 107df351c6f95ef15a045cde85697c0ee3b222b2)

3 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>
(cherry picked from commit ce40c6279a46dde35e25a6d31416e4e1ce519a18)

3 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>
(cherry picked from commit 63245a641a028dc991de3a5266052e41d876ab20)

3 years ago*: unify prefix copying
Igor Ryzhov [Wed, 2 Jun 2021 17:03:52 +0000 (20:03 +0300)]
*: unify prefix copying

There are a few places in the code where we use PREFIX_COPY(_IPV4/IPV6)
macro to copy a prefix. Let's always use prefix_copy function for this.

This should fix CID 1482142 and 1504610.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit b08dcc3f3f0b128b4662f3be86eb53075e93ac9f)

3 years agobgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()
Donatas Abraitis [Fri, 11 Jun 2021 06:17:05 +0000 (09:17 +0300)]
bgpd: Call bgp_dest_unlock_node() inside bgp_adj_in_remove()

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit 6a840fd93f147e69e5546618ad7e1001cb819c4a)

3 years agoMerge pull request #9161 from idryzhov/backport-8976
Martin Winter [Sat, 24 Jul 2021 10:38:40 +0000 (12:38 +0200)]
Merge pull request #9161 from idryzhov/backport-8976

[8.0] bgpd: Unlock bgp_dest for bgp_distance_unset if distance does not match (backport #8976)

3 years agoMerge pull request #9160 from ton31337/fix/missing_unlock_for_bgp_dest_8.0
Martin Winter [Sat, 24 Jul 2021 10:38:21 +0000 (12:38 +0200)]
Merge pull request #9160 from ton31337/fix/missing_unlock_for_bgp_dest_8.0

bgpd: [8.0] Don't forget bgp_dest_unlock_node for bgp_static_set()

3 years agoMerge pull request #9159 from FRRouting/mergify/bp/stable/8.0/pr-9091
Martin Winter [Sat, 24 Jul 2021 10:37:25 +0000 (12:37 +0200)]
Merge pull request #9159 from FRRouting/mergify/bp/stable/8.0/pr-9091

zebra: trigger remove all access vlans info for access port (backport #9091)

3 years agoMerge pull request #9157 from FRRouting/mergify/bp/stable/8.0/pr-9105
Martin Winter [Sat, 24 Jul 2021 10:36:58 +0000 (12:36 +0200)]
Merge pull request #9157 from FRRouting/mergify/bp/stable/8.0/pr-9105

vtysh, lib, zebra: fix exit from link-params and pseudowire nodes (backport #9105)

3 years agoMerge pull request #9156 from FRRouting/mergify/bp/stable/8.0/pr-9094
Martin Winter [Sat, 24 Jul 2021 10:36:24 +0000 (12:36 +0200)]
Merge pull request #9156 from FRRouting/mergify/bp/stable/8.0/pr-9094

pathd: don't use localtime (backport #9094)

3 years agoMerge pull request #9158 from FRRouting/mergify/bp/stable/8.0/pr-9102
Martin Winter [Sat, 24 Jul 2021 10:35:58 +0000 (12:35 +0200)]
Merge pull request #9158 from FRRouting/mergify/bp/stable/8.0/pr-9102

build: fix LDFLAGS confusion & gcov (backport #9102)

3 years agoMerge pull request #9154 from FRRouting/mergify/bp/stable/8.0/pr-9095
Martin Winter [Sat, 24 Jul 2021 10:35:17 +0000 (12:35 +0200)]
Merge pull request #9154 from FRRouting/mergify/bp/stable/8.0/pr-9095

ospf6d: always generate default route for stubs (backport #9095)

3 years agoMerge pull request #9152 from FRRouting/mergify/bp/stable/8.0/pr-9080
Martin Winter [Sat, 24 Jul 2021 10:34:49 +0000 (12:34 +0200)]
Merge pull request #9152 from FRRouting/mergify/bp/stable/8.0/pr-9080

bgpd: Drop unnecessary chars for filtered reason (backport #9080)

3 years agoMerge pull request #9150 from FRRouting/mergify/bp/stable/8.0/pr-9063
Martin Winter [Sat, 24 Jul 2021 10:34:26 +0000 (12:34 +0200)]
Merge pull request #9150 from FRRouting/mergify/bp/stable/8.0/pr-9063

zebra: fix ifp pointer for groups/recursives (backport #9063)

3 years agoMerge pull request #9133 from FRRouting/mergify/bp/stable/8.0/pr-8867
Martin Winter [Sat, 24 Jul 2021 10:34:09 +0000 (12:34 +0200)]
Merge pull request #9133 from FRRouting/mergify/bp/stable/8.0/pr-8867

tools: make frr-reload recognize `pbr table range` lines as single-line contexts (backport #8867)

3 years agoMerge pull request #9138 from FRRouting/mergify/bp/stable/8.0/pr-8337
Martin Winter [Fri, 23 Jul 2021 18:09:44 +0000 (20:09 +0200)]
Merge pull request #9138 from FRRouting/mergify/bp/stable/8.0/pr-8337

Reload with routemaps (backport #8337)

3 years agoMerge pull request #9128 from FRRouting/mergify/bp/stable/8.0/pr-9116
Igor Ryzhov [Fri, 23 Jul 2021 15:43:56 +0000 (18:43 +0300)]
Merge pull request #9128 from FRRouting/mergify/bp/stable/8.0/pr-9116

vtysh: Handle `en` better when in -u for vtysh (backport #9116)

3 years agoMerge pull request #9141 from FRRouting/mergify/bp/stable/8.0/pr-8962
Igor Ryzhov [Fri, 23 Jul 2021 15:43:43 +0000 (18:43 +0300)]
Merge pull request #9141 from FRRouting/mergify/bp/stable/8.0/pr-8962

bgpd: Ensure v6 LL address is available before establishing peering (backport #8962)

3 years agoMerge pull request #9129 from FRRouting/mergify/bp/stable/8.0/pr-9120
Martin Winter [Fri, 23 Jul 2021 13:36:17 +0000 (15:36 +0200)]
Merge pull request #9129 from FRRouting/mergify/bp/stable/8.0/pr-9120

zebra: Remove MM seq from evpn rmac json output (backport #9120)

3 years agoMerge pull request #9127 from FRRouting/mergify/bp/stable/8.0/pr-9126
Martin Winter [Fri, 23 Jul 2021 13:35:32 +0000 (15:35 +0200)]
Merge pull request #9127 from FRRouting/mergify/bp/stable/8.0/pr-9126

bgpd: Fix rpki spacing to be 1 for indentation (backport #9126)

3 years agoMerge pull request #9153 from FRRouting/mergify/bp/stable/8.0/pr-9093
Donald Sharp [Fri, 23 Jul 2021 12:35:08 +0000 (08:35 -0400)]
Merge pull request #9153 from FRRouting/mergify/bp/stable/8.0/pr-9093

ospfd: ospfd crash while giving 'clear ip ospf neighbor' (backport #9093)

3 years agoMerge pull request #9151 from FRRouting/mergify/bp/stable/8.0/pr-9062
Donald Sharp [Fri, 23 Jul 2021 12:34:05 +0000 (08:34 -0400)]
Merge pull request #9151 from FRRouting/mergify/bp/stable/8.0/pr-9062

bgpd: BGP dampening JSON fixes (backport #9062)

3 years agoMerge pull request #9149 from FRRouting/mergify/bp/stable/8.0/pr-9055
Donald Sharp [Fri, 23 Jul 2021 12:33:21 +0000 (08:33 -0400)]
Merge pull request #9149 from FRRouting/mergify/bp/stable/8.0/pr-9055

bgpd: Reflect changes to pfxSnt when using default-originate (backport #9055)

3 years agoMerge pull request #9147 from FRRouting/mergify/bp/stable/8.0/pr-9024
Donald Sharp [Fri, 23 Jul 2021 12:32:41 +0000 (08:32 -0400)]
Merge pull request #9147 from FRRouting/mergify/bp/stable/8.0/pr-9024

isisd: fix setting of the attached bit (backport #9024)

3 years agoMerge pull request #9146 from FRRouting/mergify/bp/stable/8.0/pr-8961
Donald Sharp [Fri, 23 Jul 2021 12:32:22 +0000 (08:32 -0400)]
Merge pull request #9146 from FRRouting/mergify/bp/stable/8.0/pr-8961

bgpd: associate correct nexthop when using peer link-local (backport #8961)

3 years agoMerge pull request #9145 from FRRouting/mergify/bp/stable/8.0/pr-8734
Donald Sharp [Fri, 23 Jul 2021 12:31:54 +0000 (08:31 -0400)]
Merge pull request #9145 from FRRouting/mergify/bp/stable/8.0/pr-8734

bgpd: Do not delete peer_af structure when deactivating peer-group from an address-family. (backport #8734)

3 years agoMerge pull request #9144 from FRRouting/mergify/bp/stable/8.0/pr-9004
Donald Sharp [Fri, 23 Jul 2021 12:31:28 +0000 (08:31 -0400)]
Merge pull request #9144 from FRRouting/mergify/bp/stable/8.0/pr-9004

staticd: fix bug of Null0 wrongly converted into blackhole in running config (backport #9004)

3 years agoMerge pull request #9142 from FRRouting/mergify/bp/stable/8.0/pr-8958
Donald Sharp [Fri, 23 Jul 2021 12:31:05 +0000 (08:31 -0400)]
Merge pull request #9142 from FRRouting/mergify/bp/stable/8.0/pr-8958

bgpd: nht unresolved with global address next-hop (backport #8958)

3 years agoMerge pull request #9140 from FRRouting/mergify/bp/stable/8.0/pr-8950
Donald Sharp [Fri, 23 Jul 2021 12:30:33 +0000 (08:30 -0400)]
Merge pull request #9140 from FRRouting/mergify/bp/stable/8.0/pr-8950

ospf6d: use per-vrf router id instead of one global (backport #8950)

3 years agoMerge pull request #9139 from FRRouting/mergify/bp/stable/8.0/pr-8909
Donald Sharp [Fri, 23 Jul 2021 12:29:20 +0000 (08:29 -0400)]
Merge pull request #9139 from FRRouting/mergify/bp/stable/8.0/pr-8909

isisd: fix extra space in the mpls-te config output (backport #8909)

3 years agoMerge pull request #9137 from FRRouting/mergify/bp/stable/8.0/pr-8902
Donald Sharp [Fri, 23 Jul 2021 12:28:42 +0000 (08:28 -0400)]
Merge pull request #9137 from FRRouting/mergify/bp/stable/8.0/pr-8902

isisd: fix uninitialized variable when searching for LSP (backport #8902)

3 years agoMerge pull request #9136 from FRRouting/mergify/bp/stable/8.0/pr-8869
Donald Sharp [Fri, 23 Jul 2021 12:27:33 +0000 (08:27 -0400)]
Merge pull request #9136 from FRRouting/mergify/bp/stable/8.0/pr-8869

bgpd: Force process networks on VRF creation (backport #8869)

3 years agoMerge pull request #9135 from FRRouting/mergify/bp/stable/8.0/pr-8557
Donald Sharp [Fri, 23 Jul 2021 12:26:53 +0000 (08:26 -0400)]
Merge pull request #9135 from FRRouting/mergify/bp/stable/8.0/pr-8557

ospfd: External lsa handling in opaque capabilities enable/disable (backport #8557)

3 years agoMerge pull request #9134 from FRRouting/mergify/bp/stable/8.0/pr-8334
Donald Sharp [Fri, 23 Jul 2021 12:26:31 +0000 (08:26 -0400)]
Merge pull request #9134 from FRRouting/mergify/bp/stable/8.0/pr-8334

ospf6d: Release last dbdesc packet after router dead interval (backport #8334)

3 years agoMerge pull request #9132 from FRRouting/mergify/bp/stable/8.0/pr-8892
Donald Sharp [Fri, 23 Jul 2021 12:26:01 +0000 (08:26 -0400)]
Merge pull request #9132 from FRRouting/mergify/bp/stable/8.0/pr-8892

fabricd: fix running config (backport #8892)

3 years agoMerge pull request #9131 from FRRouting/mergify/bp/stable/8.0/pr-8822
Donald Sharp [Fri, 23 Jul 2021 12:24:52 +0000 (08:24 -0400)]
Merge pull request #9131 from FRRouting/mergify/bp/stable/8.0/pr-8822

tools: add mac access-list context to frr-reload.py (backport #8822)

3 years agoMerge pull request #9130 from FRRouting/mergify/bp/stable/8.0/pr-8955
Donald Sharp [Fri, 23 Jul 2021 12:24:31 +0000 (08:24 -0400)]
Merge pull request #9130 from FRRouting/mergify/bp/stable/8.0/pr-8955

ospfd: show ip ospf route json does not shown metric and tag (backport #8955)

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 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 agozebra: trigger remove all access vlans for access port
gord_chen [Tue, 20 Jul 2021 09:28:37 +0000 (09:28 +0000)]
zebra: trigger remove all access vlans for access port

When port was removed from last access vlan, the linux kernel
won't send any vlan info in the netlink message, it might affact
the evpn mh not withdraw EAD-EVI routes.

Signed-off-by: Gord Chen <gord_chen@edge-core.com>
(cherry picked from commit ec8977510e9ddb9b8a2ea610d0acbbc5355c1fac)

3 years agobuild: use `--coverage` for gcov
David Lamparter [Wed, 21 Jul 2021 09:23:23 +0000 (11:23 +0200)]
build: use `--coverage` for gcov

libtool does not understand `-coverage` with a single dash.  Official
gcc docs also say `--coverage` rather than `-coverage`.  (clang lists
both.)

Also, for correct linking, libtool needs `--coverage` in LDFLAGS as
opposed to `-lgcov` (with the latter you get library ordering/deps
issues)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 81aff2127f35da2ec667bc60989cac7df7a8ef48)

3 years agobuild: fix `AM_LDFLAGS` usage (and gcov)
David Lamparter [Wed, 21 Jul 2021 09:04:23 +0000 (11:04 +0200)]
build: fix `AM_LDFLAGS` usage (and gcov)

like the other automake variables, setting `xyz_LDFLAGS` causes
`AM_LDFLAGS` to be ignored for `xyz`.  For some reason I had in my mind
that automake doesn't do this for LDFLAGS, but... it does.  (Which is
consistent with `_CFLAGS` and co.)

So, all the libraries and modules have been ignoring `AM_LDFLAGS` (which
includes `SAN_FLAGS` too).  Set up new `LIB_LDFLAGS` and
`MODULE_LDFLAGS` to handle all of this correctly (and move these bits to
a central location.)

Fixes: #9034
Fixes: 0c4285d77eb ("build: properly split CFLAGS from AC_CFLAGS")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 63116a7008706988136785ffa011cefee0355193)

3 years agolib, zebra: fix exit from link-params node
Igor Ryzhov [Wed, 21 Jul 2021 14:23:45 +0000 (17:23 +0300)]
lib, zebra: fix exit from link-params node

When exiting from link-params node, we must not decrement xpath_index
because it is not incremented when entering the node.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit d9331fc67c3c68302930f64fada992512e18f7d2)

3 years agovtysh: fix exit from zebra-only nodes
Igor Ryzhov [Wed, 21 Jul 2021 14:22:14 +0000 (17:22 +0300)]
vtysh: fix exit from zebra-only nodes

When exiting from link-params and pseudowire nodes, we were sending exit
command to all VTYSH_INTERFACE daemons. This led to a desynchronized
state in vtysh and daemons other then zebra. We must send exit command
only to zebra.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 92de4c7fb6ff4fcff6542346381f89ecdc09bbd7)

3 years agopathd: don't use localtime
Mark Stapp [Tue, 20 Jul 2021 12:52:33 +0000 (08:52 -0400)]
pathd: don't use localtime

Use localtime_r() instead of localtime() in pathd.

Signed-off-by: Mark Stapp <mjs.ietf@gmail.com>
(cherry picked from commit abfafdece24a0e12e21ee65903dde1cebc0c810e)

3 years agoospf6d: always generate default route for stubs
Rafael Zalamena [Tue, 20 Jul 2021 12:43:03 +0000 (09:43 -0300)]
ospf6d: always generate default route for stubs

In RFC 2328 OSPF Version 2, Section 12.4.3.1 "Originating summary-LSAs
into stub areas" mentions that the stub areas should not import external
routes and instead should generate a 'default summary-LSA' set to
default destination.

> In a stub area, instead of importing external routes
> each area border router originates a "default summary-
> LSA" into the area. The Link State ID for the default
> summary-LSA is set to DefaultDestination, and the metric
> set to the (per-area) configurable parameter
> StubDefaultCost.  Note that StubDefaultCost need not be
> configured identically in all of the stub area's area
> border routers.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 80d1eb49b1b3986c86956b5ce473731b793bbf8b)

3 years agoospfd: ospfd crash while giving 'clear ip ospf neighbor'
rgirada [Tue, 20 Jul 2021 11:39:05 +0000 (04:39 -0700)]
ospfd: ospfd crash while giving 'clear ip ospf neighbor'

Description:
Ospf process crashes upon giving 'clear ip ospf neighbor' with
        self routerId. It is asserting if it is a self neighbor in ospf
        neighbour kill event processing.
Added a check to validate the provided router-id is self
        router-id.

Signed-off-by: Rajesh Girada <rgirada@vmware.com>
(cherry picked from commit c88ad8ec5b309132b6319fd5677e427d5d8ac12c)

3 years agobgpd: Drop unnecessary chars for filtered reason
Donatas Abraitis [Sun, 18 Jul 2021 15:03:25 +0000 (18:03 +0300)]
bgpd: Drop unnecessary chars for filtered reason

Seems missed grammarly review for the reason "as-path contains our own AS;"

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit 692174a1c5963b087ef1450c01dbde29e9cb26e0)

3 years agobgpd: Fix `dampening flap-statistics json` crash
Donatas Abraitis [Thu, 15 Jul 2021 13:11:45 +0000 (16:11 +0300)]
bgpd: Fix `dampening flap-statistics json` crash

With fix:
```
exit1-debian-9# sh ip bgp dampening flap-statistics
BGP table version is 22, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          From            Flaps Duration Reuse    Path
*d 10.0.0.0/24      192.168.0.2     4    00:00:50 00:35:56 65000 ?
*d 10.10.10.100/32  192.168.0.2     4    00:00:50 00:35:56 65000 ?
*d 192.168.1.0/24   192.168.0.2     4    00:00:50 00:35:56 65000 ?

Displayed  3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening flap-statistics json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 22,
 "routerId": "10.10.10.200",
 "defaultLocPrf": 100,
 "localAS": 65001,
 "routes": { "10.0.0.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
],"10.10.10.100/32": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
],"192.168.1.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "peerHost":"192.168.0.2",
    "bdiFlap":4,
    "peerUptime":"00:00:54",
    "peerUptimeMsec":54000,
    "peerUptimeEstablishedEpoch":1626355135,
    "reuseTimerMsecs":2151000,
    "asPath":"65000",
    "origin":"?"
  }
] }  }
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit 3125804678d3c0fc5b0b923e101ef58d4f454a4c)

3 years agobgpd: Fix `dampening dampened-paths json` crash
Donatas Abraitis [Thu, 15 Jul 2021 12:55:46 +0000 (15:55 +0300)]
bgpd: Fix `dampening dampened-paths json` crash

```
5  0x00007fccab6fac39 in json_object_boolean_true_add (obj=<optimized out>, key=<optimized out>) at lib/json.c:70
No locals.
6  0x000055c7b8c08ae5 in route_vty_short_status_out (vty=<optimized out>, path=0x55c7bb37dcf0, p=<optimized out>, json_path=0x55c7bb3735a0)
    at bgpd/bgp_route.c:8566
        rpki_state = RPKI_NOT_BEING_USED
7  0x000055c7b8c22d1b in flap_route_vty_out (afi=AFI_IP, json=0x55c7bb3735a0, use_json=true, safi=SAFI_UNICAST, display=0, path=0x55c7bb37dcf0,
    p=0x55c7bb37dea0, vty=0x55c7bb39e4c0) at bgpd/bgp_route.c:9600
        attr = <optimized out>
        bdi = 0x55c7bb377950
        timebuf = '\000' <repeats 24 times>
        len = <optimized out>
8  bgp_show_table (vty=0x55c7bb39e4c0, bgp=0x55c7bb316300, safi=safi@entry=SAFI_UNICAST, table=0x55c7bb314d90, type=bgp_show_type_flap_statistics,
    output_arg=0x0, rd=0x0, is_last=1, output_cum=0x0, total_cum=0x0, json_header_depth=0x7ffeefd649f8, show_flags=1, rpki_target_state=RPKI_NOT_BEING_USED)
    at bgpd/bgp_route.c:11110
```

With fix:

```
exit1-debian-9# sh ip bgp dampening dampened-paths
BGP table version is 16, local router ID is 10.10.10.200, vrf id 0
Default local pref 100, local AS 65001
Status codes:  s suppressed, d damped, h history, * valid, > best, = multipath,
               i internal, r RIB-failure, S Stale, R Removed
Nexthop codes: @NNN nexthop's vrf id, < announce-nh-self
Origin codes:  i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

   Network          From             Reuse    Path
*d 10.0.0.0/24      192.168.0.2      00:21:08 65000 ?
*d 10.10.10.100/32  192.168.0.2      00:21:08 65000 ?
*d 192.168.1.0/24   192.168.0.2      00:21:08 65000 ?

Displayed  3 routes and 10 total paths
exit1-debian-9# sh ip bgp dampening dampened-paths json
{
 "vrfId": 0,
 "vrfName": "default",
 "tableVersion": 16,
 "routerId": "10.10.10.200",
 "defaultLocPrf": 100,
 "localAS": 65001,
 "routes": { "10.0.0.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
],"10.10.10.100/32": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
],"192.168.1.0/24": [
  {
    "valid":true,
    "damped":true,
    "pathFrom":"external",
    "reuseTimerMsecs":1263000,
    "asPath":"65000",
    "origin":"?",
    "peerHost":"192.168.0.2"
  }
] }  }
```

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit e5be8c1dac44958550dee57350b732920aa27d4e)

3 years agozebra: fix ifp pointer for groups/recursives
Stephen Worley [Mon, 21 Jun 2021 16:53:25 +0000 (12:53 -0400)]
zebra: fix ifp pointer for groups/recursives

At some point we broke the ifp pointer for nhe->ifp such
that it was pointing to an interface even in groups/recurisve
instances.

Add checks here to make it again so that we only set the ifp
pointer if it is a fully resolved singleton NHE.

Signed-off-by: Stephen Worley <sworley@nvidia.com>
(cherry picked from commit bf157b9263050b25228e66164c1540bf823b960a)

3 years agotests: Check if pfxSnt is adjusted when default-originate is used for BGP
Donatas Abraitis [Wed, 14 Jul 2021 21:10:38 +0000 (00:10 +0300)]
tests: Check if pfxSnt is adjusted when default-originate is used for BGP

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit 5fa869fcc7263cedb353341b83e00dd0e4221f46)

3 years agobgpd: Increase sent prefix count per subgrp when originating default route
Donatas Abraitis [Wed, 14 Jul 2021 20:55:20 +0000 (23:55 +0300)]
bgpd: Increase sent prefix count per subgrp when originating default route

Before we didn't count default-originate to pfxSnt.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
(cherry picked from commit fea96c555b64fd8fc7af87e94632114ae06d5cb3)

3 years agoisisd: fix setting IS type in LSPs
Igor Ryzhov [Mon, 12 Jul 2021 20:56:50 +0000 (23:56 +0300)]
isisd: fix setting IS type in LSPs

IS type in an LSP is a type of the router, not a type of the circuit.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit d0f1492145b68643fb8a2b31307d91e1139e3cfa)

3 years agoisisd: fix processing of the attached bit
Igor Ryzhov [Mon, 12 Jul 2021 20:56:04 +0000 (23:56 +0300)]
isisd: fix processing of the attached bit

There are two problems with the current code for processing the attached
bit:
- we should process it when acting both a level-1-only and level-1-2
- we should add the default route when we don't have L2 adjacensies, not
  when we don't have other routers configured on the device

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit a4777e465ab5515bf36ad5f3dc4c413adf9d15b6)

3 years agoisisd: fix setting of the attached bit
Igor Ryzhov [Mon, 12 Jul 2021 20:51:27 +0000 (23:51 +0300)]
isisd: fix setting of the attached bit

Current code related to setting of the attached bit checks for existence
of L2 adjacencies in other routers configured on the device. This makes
no sense. We should check for L2 adjacencies in the same router where we
have L1 adjacencies.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
(cherry picked from commit 74ef8dd96158b3e0898a323d893f74449e0a412a)