]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
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 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)

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

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>
(cherry picked from commit 3057d1e45af0c7789a3b7adfcae882b0234fbf4c)

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

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>
(cherry picked from commit 17ef5a934355a718caf64f2fd5cac5e252977890)

3 years agobgpd: Ensure v6 LL address is available before establishing peering
Donald Sharp [Wed, 30 Jun 2021 14:25:43 +0000 (10:25 -0400)]
bgpd: Ensure v6 LL address is available before establishing peering

There are startup situations where we will attempt to connect to a remote
peer before bgp has received the v6 LL address.  If we do not have this address
we must not allow the connection to come up until we have one available to use
in those situations where we must have a v6 LL address.

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

3 years agoospf6d: use per-vrf router id instead of one global
Igor Ryzhov [Tue, 29 Jun 2021 15:10:41 +0000 (18:10 +0300)]
ospf6d: use per-vrf router id instead of one global

This code was not fully completed when adding support for VRFs.

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

3 years agoisisd: fix extra space in the mpls-te config output
Igor Ryzhov [Wed, 23 Jun 2021 12:39:56 +0000 (15:39 +0300)]
isisd: fix extra space in the mpls-te config output

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

3 years agotools: limit bgp route-maps to direct changes only
Donald Sharp [Tue, 23 Mar 2021 12:48:54 +0000 (08:48 -0400)]
tools: limit bgp route-maps to direct changes only

When using frr-reload.py to modify a bgp neighbors route-map
the code was doing this:

a) deleting the previous route-map: `no neighbor XX route-map YY (in|out)`
b) Adding the new route-map back in `neighbor XX route-may ZZ (in|out)`

Now imagine that we have an outgoing route-map that we are changing
and the reload is large because of a large number of lines in frr.conf

Item (a) will happen.  BGP will immediately start sending all local
routes.  At some point in time in the future (b) will be applied.
This of course causes a withdraw but for a short amount of time we
are leaking unintended routes.  This is bad for several reasons
not 1) route churn upstream, 2) we might influence traffic to go the
wrong way. 3) if upstream has a maximum-prefix command the routes
being sent might trip its circuitry and shutdown the peer entirely
not even allowing you to get to (b).

Ticket: #2589685
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 6293c2181a3c58046f94496391d14a921a7fd892)

3 years agoisisd: fix uninitialized variable when searching for LSP
Igor Ryzhov [Tue, 22 Jun 2021 14:53:26 +0000 (17:53 +0300)]
isisd: fix uninitialized variable when searching for LSP

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

3 years agobgpd: Force process networks on VRF creation
Xiao Liang [Thu, 17 Jun 2021 04:33:59 +0000 (12:33 +0800)]
bgpd: Force process networks on VRF creation

Force the processing of existing network configurations when VRF is
created, otherwise will be skipped in bgp_static_update().

Signed-off-by: Xiao Liang <shaw.leon@gmail.com>
(cherry picked from commit 47fc62610cc6c4228e7775b531e1a3281b98107a)

3 years agoospfd: External lsa handling in opaque capabilities enable/disable
rgirada [Sun, 25 Apr 2021 05:40:33 +0000 (22:40 -0700)]
ospfd: External lsa handling in opaque capabilities enable/disable

Description:
When opaque capability disabled/enabled , all the self-originated lsa will be
flushed and it will make the neighbours to renegotiate.
But here, external lsas are not being re-originated after negotiation
Fix:
Refresh/re-originate external lsas(Type-5 and Type-7) explicitly after
re-negotiation.

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

3 years agoospf6d: Release last dbdesc packet after router dead interval
Yash Ranjan [Tue, 16 Mar 2021 07:45:23 +0000 (00:45 -0700)]
ospf6d: Release last dbdesc packet after router dead interval

During the database description exchange process, the slave
releases the last dbdesc packet after router_dead_interval.
This was not implemented in the code.
I have written the function ospf6_neighbor_last_dbdesc_release,
which releases the last dbdesc packet after router_dead_interval.
This change was required as per the conformance test 13.11:

In state Full reception of a Database Description packet from
the master after this interval (RouterDeadInterval) will
generate a SeqNumberMismatch neighbor event.

Associated Parameters
  ICMPv6 Packet Listen Time
  ICMPv6 Packet Tolerance Factor
  ICMPv6 Packet Tolerance Time
  OSPFV3 DUT Interface Transmit Delay
  OSPF Reset Adjacencies Timeout
Test Actions
1.
2. 3.
ANVL: Establish full adjacency with DUT for neighbor Rtr-0-A on DIface-0, with DUT as slave.
ANVL: Wait (for <RouterDeadInterval> seconds).
ANVL: Send <OSPF-DD> packet from neighbor Rtr-0-A to DIface-0 con- taining:
• •
I-bit field not set M-bit field not set
MS-bit field set
DD sequence number same as the one last sent by ANVL.

. ANVL: Listen (for upto 2 * <RxmtInterval> seconds) on DIface-0.
5. DUT: Trigger the event SeqNumberMismatch and set the neighbor state for neighbor Rtr-0-A to ExStart.
6. DUT: Send <OSPF-DD> packet.
7. ANVL: Verify that the received <OSPF-DD> packet contains:
• I-bit field set
• M-bit field set
• MS-bit field set.

Test Reference
• RFC 5340, s4.2.1.2 p19 Sending Database Description Packets
  RFC 2328, s10.8 p104 Sending Database Description Packets.

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
(cherry picked from commit bc09f3e6bbd9df931e259b16da4e7b7593d141c6)

3 years agotools: reload recognizes `pbr table range` as single-line ctx
Wesley Coakley [Thu, 17 Jun 2021 00:34:30 +0000 (20:34 -0400)]
tools: reload recognizes `pbr table range` as single-line ctx

The line `pbr table range ...` does not start a new context so treat it
like a single-line context

Signed-off-by: Wesley Coakley <w@wesleycoakley.com>
(cherry picked from commit cbfb52986ffdcda2f255f7886dcbd3db95a1da54)

3 years agofabricd: fix running config
Igor Ryzhov [Mon, 21 Jun 2021 15:12:45 +0000 (18:12 +0300)]
fabricd: fix running config

Daemons should not output warnings into the running config.

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

3 years agotools: add mac access-list context to frr-reload.py
Don Slice [Wed, 9 Jun 2021 21:17:21 +0000 (14:17 -0700)]
tools: add mac access-list context to frr-reload.py

Problem reported that frr-reload.py didn't handle the mac access-list
command correctly, causing reloads to fail.  This fix adds the
support for the command as a single line context.

Signed-off-by: Don Slice <dslice@nvidia.com>
(cherry picked from commit 1443e2314837a659adafdf04e41a768b40ec6850)

3 years agoospfd: show ip ospf route json does not shown metric and tag
Mobashshera Rasool [Wed, 30 Jun 2021 07:17:58 +0000 (07:17 +0000)]
ospfd: show ip ospf route json does not shown metric and tag

Problem Statement:
==================
[FRR OSPF] show ip ospf route json does not shown metric and tag.

Root Cause Analysis:
===================
In function show_ip_ospf_route_external, type 2 cost is not added in json.
Hence it is not displayed.

Fix:
=================
1. Add type2cost in the json display
2. Tag was also missing, added that as well

Issue: #8729

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

3 years agoMerge pull request #9125 from FRRouting/mergify/bp/stable/8.0/pr-9016
Martin Winter [Fri, 23 Jul 2021 07:38:54 +0000 (09:38 +0200)]
Merge pull request #9125 from FRRouting/mergify/bp/stable/8.0/pr-9016

ospf6d: fix backlink check (backport #9016)

3 years agoMerge pull request #9124 from FRRouting/mergify/bp/stable/8.0/pr-8868
Martin Winter [Fri, 23 Jul 2021 07:33:33 +0000 (09:33 +0200)]
Merge pull request #9124 from FRRouting/mergify/bp/stable/8.0/pr-8868

ospf6d: redistribute command minor fixes (backport #8868)

3 years agoMerge pull request #9123 from FRRouting/mergify/bp/stable/8.0/pr-8841
Martin Winter [Fri, 23 Jul 2021 07:32:55 +0000 (09:32 +0200)]
Merge pull request #9123 from FRRouting/mergify/bp/stable/8.0/pr-8841

ospf6: Drop LSA with bad seqnumber (backport #8841)

3 years agoMerge pull request #9122 from FRRouting/mergify/bp/stable/8.0/pr-8891
Martin Winter [Fri, 23 Jul 2021 07:31:53 +0000 (09:31 +0200)]
Merge pull request #9122 from FRRouting/mergify/bp/stable/8.0/pr-8891

lib: remove vrf-interface config when removing the VRF (backport #8891)

3 years agoMerge pull request #9121 from FRRouting/mergify/bp/stable/8.0/pr-8878
Martin Winter [Fri, 23 Jul 2021 07:30:52 +0000 (09:30 +0200)]
Merge pull request #9121 from FRRouting/mergify/bp/stable/8.0/pr-8878

ospf6d: fix "show ipv6 ospf6 neighbor" command (backport #8878)

3 years agozebra: Remove MM seq from evpn rmac json output
Trey Aspelund [Thu, 1 Apr 2021 04:43:55 +0000 (04:43 +0000)]
zebra: Remove MM seq from evpn rmac json output

Currently 'show evpn rmac vni .. mac .. json' includes fields for
localSequence and remoteSequence, which are misleading since they
aren't applicable to a macs in the IP-VRF mac table (RMAC).
This removes the localSequence + remoteSequence fields from the output.

Signed-off-by: Trey Aspelund <taspelund@nvidia.com>
(cherry picked from commit fb0b54b361ef2ba2563ce72dd3fe8a5d77e4630b)

3 years agovtysh: Handle `en` better when in -u for vtysh
Donald Sharp [Thu, 22 Jul 2021 15:59:25 +0000 (11:59 -0400)]
vtysh: Handle `en` better when in -u for vtysh

vtysh was unable to distinguish between end and ena.  The
code can now do so:

sharpd@eva ~/frr5 (master)> sudo vtysh/vtysh -u sharpd

Hello, this is FRRouting (version 8.1-dev).
Copyright 1996-2005 Kunihiro Ishiguro, et al.

eva> e
% Ambiguous command: e
eva> en
% Command not allowed: enable
eva> ena
% Command not allowed: enable
eva> enab
% Command not allowed: enable
eva> enabl
% Command not allowed: enable
eva> enable
% Command not allowed: enable
eva> enb
% Unknown command: enb
eva> enc
% Unknown command: enc
eva> end
% Unknown command: end
eva> ene
% Unknown command: ene
eva> quit

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

3 years agobgpd: Fix rpki spacing to be 1 for indentation
Donald Sharp [Thu, 22 Jul 2021 20:53:15 +0000 (16:53 -0400)]
bgpd: Fix rpki spacing to be 1 for indentation

The rpki sub-node was outputting 2 spaces instead
of 1 space.  Let's fix that to be consistent with
the rest of our code.

Fixes: #2738
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 7dc7fb9327385a506a9dc5d8d775cbb2684b0d53)

3 years agoMerge pull request #9119 from FRRouting/mergify/bp/stable/8.0/pr-8850
Martin Winter [Thu, 22 Jul 2021 23:54:46 +0000 (01:54 +0200)]
Merge pull request #9119 from FRRouting/mergify/bp/stable/8.0/pr-8850

ospf6d: consistent checksum JSON output (backport #8850)

3 years agoMerge pull request #9118 from FRRouting/mergify/bp/stable/8.0/pr-8954
Martin Winter [Thu, 22 Jul 2021 23:53:28 +0000 (01:53 +0200)]
Merge pull request #9118 from FRRouting/mergify/bp/stable/8.0/pr-8954

ospf6d: route-map config changed, not getting applied on all types of… (backport #8954)

3 years agoMerge pull request #9117 from FRRouting/mergify/bp/stable/8.0/pr-8919
Martin Winter [Thu, 22 Jul 2021 23:52:12 +0000 (01:52 +0200)]
Merge pull request #9117 from FRRouting/mergify/bp/stable/8.0/pr-8919

ospf6d: Max aged LSAs are not getting deleted from DB (backport #8919)

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

3 years agotests: use correct metric type and value for OSPFv3 redistributed routes
Igor Ryzhov [Fri, 18 Jun 2021 13:05:01 +0000 (16:05 +0300)]
tests: use correct metric type and value for OSPFv3 redistributed routes

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

3 years agoospf6d: Set metric from default values when route-map metric not present
Yash Ranjan [Wed, 2 Jun 2021 12:45:18 +0000 (05:45 -0700)]
ospf6d: Set metric from default values when route-map metric not present

For redistribute commands if route map is set, then route takes it's metric
values from the route map. But in the case that routemap is set but the
metric for the route map is not, then the route metric is set to type-1.

Check if the metric is set for the routemap. If not then set it as per
redistributed default values (type 2)

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
(cherry picked from commit f84504e686aa52591e0a3c211cfd1b5afe324756)

3 years agoospf6d: Change the default metric parameter for redistribute
Yash Ranjan [Mon, 24 May 2021 10:44:12 +0000 (03:44 -0700)]
ospf6d: Change the default metric parameter for redistribute

The default values will be set at the time of ospf6_redist_add
similar to ospfv2. Hence the default values will change as well.
Default metric type = E2
Default metic value = 20

Signed-off-by: Yash Ranjan <ranjany@vmware.com>
(cherry picked from commit a5bc334beb2f976d7cf3f0d6250086f435e17b7f)

3 years agoospf6: Drop LSA with bad seqnumber
lynne [Fri, 11 Jun 2021 14:38:42 +0000 (10:38 -0400)]
ospf6: Drop LSA with bad seqnumber

In RFC 2328 seqnumber 0x80000000 is reserved and not used.   If an LSA
is received with seqnumber the LSA is now dropped and a debug error log
is printed.

Signed-off-by: Lynne Morrison <lynne@voltanet.io>
(cherry picked from commit c5467a12ea002f4fbedf179e826445d9e3dbd4b8)

3 years agolib: remove vrf-interface config when removing the VRF
Igor Ryzhov [Mon, 21 Jun 2021 15:04:46 +0000 (18:04 +0300)]
lib: remove vrf-interface config when removing the VRF

If we have the following configuration:
```
vrf red
 smth
 exit-vrf
!
interface red vrf red
 smth
```
And we delete the VRF using "no vrf red" command, we end up with:
```
interface red
 smth
```
Interface config is preserved but moved to the default VRF.

This is not an expected behavior. We should remove the interface config
when the VRF is deleted.

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

3 years agoospf6d: fix "show ipv6 ospf6 neighbor" command
Igor Ryzhov [Fri, 18 Jun 2021 19:42:49 +0000 (22:42 +0300)]
ospf6d: fix "show ipv6 ospf6 neighbor" command

Simplify the logic and fix processing of "detail" and "drchoice"
arguments.

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

3 years agoospf6d: consistent checksum json output
David Schweizer [Mon, 14 Jun 2021 06:21:42 +0000 (08:21 +0200)]
ospf6d: consistent checksum json output

Changed LSA checksum JSON output variable name from "checkSum" to
"checksum" to maintain consistency.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
(cherry picked from commit d6265808f46eca787f6816ed2e4c684caf05e75b)

3 years agoospf6d: route-map config changed, not getting applied on all types of routes
Mobashshera Rasool [Wed, 30 Jun 2021 06:13:19 +0000 (06:13 +0000)]
ospf6d: route-map config changed, not getting applied on all types of routes

Problem Statement:
==================
when route-map config is changed from permit to deny, it is not getting
applied to both connected and static and vice versa

RCA:
==================
When route-map changes from permit to deny or vice versa, a notification is
sent to ospf6 daemon via ospf6_asbr_routemap_update. In this function, a thread
is scheduled after 5 seconds to apply the route-map changes. In this thread
(ospf6_asbr_routemap_update_timer), only the first type is passed as argument
and only the first type i.e "connected" is passed and hence in callback only
on this type of route route-map gets applied.

Fix:
====
Need to loop through all the route-types in the call back and process
the route-map changes. Added a flag to mark which all route-types needs
to be processed.

Test Executed:
===============
1. Change route-map from permit to deny.
2. Change route-map from deny to permit.
3. Add new route and checked.
4. Verified summarised routes.

Risk:
============
Low

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

3 years agoospf6d: Max aged LSAs are not getting deleted from DB
Mobashshera Rasool [Thu, 24 Jun 2021 11:10:04 +0000 (11:10 +0000)]
ospf6d: Max aged LSAs are not getting deleted from DB

Problem Statement:
==================
Max aged LSAs are not getting deleted from DB when there are multiple
neighbors in a LAN.

Root Cause Analysis:
====================
When the LSA is added to the neighbor's retransmit list, the LSA retrans count
is incremented but it is not checked if the LSA is already present in the
retransmit list leading to the count being incremented multiple times
untill the ack is not received and when the ack is received the count is
decremented once and hence the count never becomes 0 and
it remains in the DB forever.

Fix:
====================
Do not increment the retrans count multiple times if the LSA is already
present in the retransmit list of the neighbor. Also do not add the LSA
in the retransmit List if already present.

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

3 years agoFRR Release 8.0 frr-8.0
Martin Winter [Wed, 21 Jul 2021 13:06:19 +0000 (15:06 +0200)]
FRR Release 8.0

Major changes:
* A new daemon, `pathd`, has been added. This daemon implements support
  for segment routing.
* EVPN Multihoming is now fully supported
* OSPFv3 now supports VRFs
* TI-LFA has been implemented in IS-IS and OSPF
* Zebra now has the ability to dump netlink messages in a human-friendly format
* LDP gained SNMP support
* Minimum libyang version is now 2.0

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9057 from FRRouting/mergify/bp/dev/8.0/pr-9051
Donatas Abraitis [Thu, 15 Jul 2021 07:58:20 +0000 (10:58 +0300)]
Merge pull request #9057 from FRRouting/mergify/bp/dev/8.0/pr-9051

bgpd: fix crash during configuration removal (backport #9051)

3 years agobgpd: fix crash during configuration removal
Rafael Zalamena [Wed, 14 Jul 2021 01:46:40 +0000 (22:46 -0300)]
bgpd: fix crash during configuration removal

Test the BFD config pointer before trying to free the session as it
might not exist.

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

3 years agoMerge pull request #9043 from FRRouting/mergify/bp/dev/8.0/pr-9015
Donatas Abraitis [Wed, 14 Jul 2021 04:57:49 +0000 (07:57 +0300)]
Merge pull request #9043 from FRRouting/mergify/bp/dev/8.0/pr-9015

bgpd: Inconsistency in Local BGP GR state. (backport #9015)

3 years agoMerge pull request #8999 from ton31337/fix/check_only_ebgp_peer_8.0
Russ White [Tue, 13 Jul 2021 15:42:55 +0000 (11:42 -0400)]
Merge pull request #8999 from ton31337/fix/check_only_ebgp_peer_8.0

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

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

3 years agoMerge pull request #9042 from FRRouting/mergify/bp/dev/8.0/pr-9037
Donald Sharp [Tue, 13 Jul 2021 15:08:06 +0000 (11:08 -0400)]
Merge pull request #9042 from FRRouting/mergify/bp/dev/8.0/pr-9037

ospf6d: fix freebsd mcast group issues (backport #9037)

3 years agoMerge pull request #8998 from ton31337/fix/bgp_extended_msg_support_8.0
Russ White [Tue, 13 Jul 2021 14:46:10 +0000 (10:46 -0400)]
Merge pull request #8998 from ton31337/fix/bgp_extended_msg_support_8.0

bgpd: [8.0] Fixes for BGP extended message support

3 years agoMerge pull request #9000 from ton31337/fix/bgp_dest_lock_unlock_8.0
Russ White [Tue, 13 Jul 2021 14:41:39 +0000 (10:41 -0400)]
Merge pull request #9000 from ton31337/fix/bgp_dest_lock_unlock_8.0

bgpd: [8.0] Make sure we don't miss to unlock for bgp_dest before returning

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