]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
3 years agobgpd: make show bgp labeled-unicast work 9652/head
Mark Stapp [Tue, 21 Sep 2021 14:37:39 +0000 (10:37 -0400)]
bgpd: make show bgp labeled-unicast work

Yet-another path where the safi needs to be changed to locate
the unicast table where LU routes live.

Signed-off-by: Mark Stapp <mstapp@nvidia.com>
(cherry picked from commit cd8c2a27c1c7b183c36f0de906d400529a18d652)

3 years agoMerge pull request #9634 from FRRouting/mergify/bp/stable/8.0/pr-9620
Donald Sharp [Sat, 18 Sep 2021 22:46:08 +0000 (18:46 -0400)]
Merge pull request #9634 from FRRouting/mergify/bp/stable/8.0/pr-9620

bgpd: fix memory leaks when using route-maps (backport #9620)

3 years agobgpd: fix memory leaks when using route-maps 9634/head
Igor Ryzhov [Wed, 15 Sep 2021 19:45:23 +0000 (22:45 +0300)]
bgpd: fix memory leaks when using route-maps

There are places where we use route-maps using duplicated attributes and
neither intern nor flush them after the usage. If a route-map has set
rules for aspath/communities, they will be allocated and never freed.
We should always flush unneeded duplicated attributes.

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

3 years agoMerge pull request #9625 from FRRouting/mergify/bp/stable/8.0/pr-9586
Donatas Abraitis [Fri, 17 Sep 2021 12:47:53 +0000 (15:47 +0300)]
Merge pull request #9625 from FRRouting/mergify/bp/stable/8.0/pr-9586

BGP default-originate with route-map fixes (backport #9586)

3 years agoMerge pull request #9630 from FRRouting/mergify/bp/stable/8.0/pr-9627
Donatas Abraitis [Fri, 17 Sep 2021 12:45:29 +0000 (15:45 +0300)]
Merge pull request #9630 from FRRouting/mergify/bp/stable/8.0/pr-9627

bgpd: Allow v6 LL peers to work when connected to as well (backport #9627)

3 years agobgpd: Allow v6 LL peers to work when connected to as well 9630/head
Donald Sharp [Thu, 16 Sep 2021 12:00:44 +0000 (08:00 -0400)]
bgpd: Allow v6 LL peers to work when connected to as well

Initial commit: 8761cd6ddb5437767625f58c8e9cc3ccda7887ab

introduced the idea of v6 LL using interface up/down events
instead of nexthop resolution to know when a peering should
happen or not.  This above commit left a hole where if the remote
peer connected to this bgp, the bgp code would still believe
the peering is down.   Modify the code to double check and
ensure that we have proper v6 LL resolution flags set.

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

3 years agotests: add one more check for default-originate with route-map 9625/head
Igor Ryzhov [Wed, 8 Sep 2021 18:10:12 +0000 (21:10 +0300)]
tests: add one more check for default-originate with route-map

Make sure that we don't set communities from a random RIB route when
originating the default route.

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

3 years agobgpd: fix aspath memory leak
Igor Ryzhov [Wed, 8 Sep 2021 18:08:08 +0000 (21:08 +0300)]
bgpd: fix aspath memory leak

We allocate an as-path using bgp_attr_default_set and should free it
before exiting the function.

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

3 years agobgpd: fix default-originate route-map processing
Igor Ryzhov [Wed, 8 Sep 2021 18:06:44 +0000 (21:06 +0300)]
bgpd: fix default-originate route-map processing

When processing a route-map for default-originate, we actually want to
match by attributes in routes from the RIB, but set attributes in the
newly originated route. Currently, it's not the case. Instead, we
construct a dummy path combining attributes from both routes, and we end
up with multiple problems:
- match by as-path doesn't work
- communities from the matched RIB route are copied to the newly
  originated route
- we corrupt the RIB routes

To fix the issue, we should use the new route-map API that allows using
separate match/set objects.

Fixes #9584.

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

3 years agolib: add ability to supply separate match/set objects to routemaps
Igor Ryzhov [Wed, 8 Sep 2021 17:46:21 +0000 (20:46 +0300)]
lib: add ability to supply separate match/set objects to routemaps

Sometimes it's needed to match by fields of one object but set fields of
another object. The following commit is an example.

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

3 years agoMerge pull request #9554 from idryzhov/8.0-bgp-view-fix
Donatas Abraitis [Wed, 8 Sep 2021 07:24:25 +0000 (10:24 +0300)]
Merge pull request #9554 from idryzhov/8.0-bgp-view-fix

[8.0] backport bgp view fixes

3 years agoMerge pull request #9579 from FRRouting/mergify/bp/stable/8.0/pr-9533
Donatas Abraitis [Wed, 8 Sep 2021 07:15:46 +0000 (10:15 +0300)]
Merge pull request #9579 from FRRouting/mergify/bp/stable/8.0/pr-9533

ospfd: ASBR Summary LSA is not originated when process is reset (backport #9533)

3 years agoMerge pull request #9580 from idryzhov/8.0-ospf6-all-zero-lsa
Donatas Abraitis [Wed, 8 Sep 2021 07:15:13 +0000 (10:15 +0300)]
Merge pull request #9580 from idryzhov/8.0-ospf6-all-zero-lsa

[8.0] ospf6d: don't create Adv-ID:0.0.0.0 LSAs at start

3 years agoospf6d: don't create Adv-ID:0.0.0.0 LSAs at start 9580/head
David Lamparter [Mon, 28 Jun 2021 14:29:56 +0000 (16:29 +0200)]
ospf6d: don't create Adv-ID:0.0.0.0 LSAs at start

When ospf6d comes up, it gets interface and address state before it
decides on its router ID.  This results in a bunch of LSAs with
advertising router ID 0.0.0.0 in the LSDB.  Not quite right.

There's a whole bunch of paths leading to this, so just drop the LSA in
ospf6_lsa_originate.  The router-ID change causes everything to be
readvertised anyway (... but the delete doesn't catch the 0.0.0.0 stuff
because the router-ID is now different.)

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
3 years agoospfd: Summary LSA is not originated when process is reset 9579/head
Mobashshera Rasool [Wed, 1 Sep 2021 09:11:48 +0000 (02:11 -0700)]
ospfd: Summary LSA is not originated when process is reset

Problem Statement:
==================
Summary LSA is not originated when router-id is modified or process is reset

Root Cause Analysis:
====================
When router-id is modified or process is cleared, all the external LSAs are
 flushed then LSA is re-originated using ospf_external_lsa_rid_change
When the LSAs are flushed, the aggregate flags are not reset.

Fix:
===============
Reset the aggregation flag when the LSAs
 are flushed.

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

3 years agoMerge pull request #9556 from FRRouting/mergify/bp/stable/8.0/pr-9549
Russ White [Tue, 7 Sep 2021 15:04:48 +0000 (11:04 -0400)]
Merge pull request #9556 from FRRouting/mergify/bp/stable/8.0/pr-9549

ospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common. (backport #9549)

3 years agoMerge pull request #9524 from FRRouting/mergify/bp/stable/8.0/pr-9518
Russ White [Tue, 7 Sep 2021 14:58:09 +0000 (10:58 -0400)]
Merge pull request #9524 from FRRouting/mergify/bp/stable/8.0/pr-9518

bgpd: Drop redundand `WORD` for no_neighbor_interface_cmd (backport #9518)

3 years agotests: fix vrf id for bgp views 9554/head
Igor Ryzhov [Tue, 7 Sep 2021 13:59:07 +0000 (16:59 +0300)]
tests: fix vrf id for bgp views

VRF ID is now always 0 for views.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common. 9556/head
Mobashshera Rasool [Fri, 3 Sep 2021 11:06:15 +0000 (04:06 -0700)]
ospfd: Memory Leak seen at show_ip_ospf_neighbor_all_common.

Problem Statement:
==================
Memory Leak seen at  show_ip_ospf_neighbor_all_common (ospf_vty.c:4635)

RCA:
=================
In function show_ip_ospf_neighbor_all_common, one child json object is not
 added to the parent child object when there is no nbma neighbor. Hence
 the memory leak.

Fix:
=================
Add the child object to the parent json object.

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

3 years agobgpd: fix bgp_get_bound_name to handle views better
Igor Ryzhov [Thu, 2 Sep 2021 12:29:18 +0000 (15:29 +0300)]
bgpd: fix bgp_get_bound_name to handle views better

The vrf socket code needs a interface/vrf name to be passed
in, in order for it to properly bind to the correct vrf.
In the case where bgp is using a view based instance
the bgp_get_bound_name should handle views better and
not return anything to be bound to.

Fixes #9519.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Do not randomly generate a vrf id for -Z
Donald Sharp [Thu, 2 Sep 2021 00:50:31 +0000 (20:50 -0400)]
bgpd: Do not randomly generate a vrf id for -Z

When FRR added the -Z parameter the bgp daemon was setting
a vrf identifier based upon a number starting at 1.  This
caused issues when we upgraded the code to the outgoing
sockets to use vrf_bind always.

FRR should never just randomly select a vrf identifier.
Let's just use VRF_DEFAULT when we are in a -Z environment.
It's a safe bet.

Fixes: #9519
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
3 years agoMerge pull request #9536 from FRRouting/mergify/bp/stable/8.0/pr-9534
Russ White [Thu, 2 Sep 2021 17:13:48 +0000 (13:13 -0400)]
Merge pull request #9536 from FRRouting/mergify/bp/stable/8.0/pr-9534

ospf6d: Prevent crash of show ipv6 ospf data adv-router 0.0.0.0 links… (backport #9534)

3 years agoMerge pull request #9515 from qlyoung/fix-alpine-docker-images-stable80
David Lamparter [Thu, 2 Sep 2021 11:22:23 +0000 (13:22 +0200)]
Merge pull request #9515 from qlyoung/fix-alpine-docker-images-stable80

docker: build libyang2 along with FRR [8.0]

3 years agoMerge pull request #9527 from FRRouting/mergify/bp/stable/8.0/pr-9522
Donald Sharp [Wed, 1 Sep 2021 22:16:49 +0000 (18:16 -0400)]
Merge pull request #9527 from FRRouting/mergify/bp/stable/8.0/pr-9522

ospfd: add dead-interval 40 if configured in show running (backport #9522)

3 years agoMerge pull request #9528 from FRRouting/mergify/bp/stable/8.0/pr-9525
Donald Sharp [Wed, 1 Sep 2021 22:13:00 +0000 (18:13 -0400)]
Merge pull request #9528 from FRRouting/mergify/bp/stable/8.0/pr-9525

ospfd: correctly cleanup spf data (backport #9525)

3 years agoospf6d: Prevent crash of show ipv6 ospf data adv-router 0.0.0.0 linkstate-id 0.0.0.0 9536/head
Donald Sharp [Wed, 1 Sep 2021 10:30:33 +0000 (06:30 -0400)]
ospf6d: Prevent crash of show ipv6 ospf data adv-router 0.0.0.0 linkstate-id 0.0.0.0

With this sequence of events:
eva# conf
eva(config)# router ospf6
eva(config-ospf6)# end
eva# show ipv6 ospf data adv-router 0.0.0.0 linkstate-id 0.0.0.0
OSPF6: Received signal 11 at 1630442431 (si_addr 0x0, PC 0x559dcfa3a656); aborting...
OSPF6: zlog_signal+0x18c                  7fd2cc8229f7     7fff606775d0 /lib/libfrr.so.0 (mapped at 0x7fd2cc770000)
OSPF6: core_handler+0xe3                  7fd2cc8616ad     7fff606776f0 /lib/libfrr.so.0 (mapped at 0x7fd2cc770000)
OSPF6: funlockfile+0x50                   7fd2cc74f140     7fff60677840 /lib/x86_64-linux-gnu/libpthread.so.0 (mapped at 0x7fd2cc73b000)
OSPF6:     ---- signal ----
OSPF6: ospf6_lsdb_type_show_wrapper+0x5d     559dcfa3a656     7fff60677dd0 /usr/lib/frr/ospf6d (mapped at 0x559dcf9a5000)
OSPF6: show_ipv6_ospf6_database_adv_router_linkstate_id+0x1f9     559dcfa3c24a     7fff60677e50 /usr/lib/frr/ospf6d (mapped at 0x559dcf9a5000)

OSPF6 crashes.  Fix.

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

3 years agoospfd: correctly cleanup spf data 9528/head
Igor Ryzhov [Tue, 31 Aug 2021 10:41:40 +0000 (13:41 +0300)]
ospfd: correctly cleanup spf data

ospf_spf_cleanup frees the data so we need to reset the stale pointers.

Fixes #9523.

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

3 years agoospfd: add dead-interval 40 if configured in show running 9527/head
Mobashshera Rasool [Tue, 31 Aug 2021 06:02:39 +0000 (23:02 -0700)]
ospfd: add dead-interval 40 if configured in show running

Problem Statement:
==================
When hello-interval is configured as 5, automatically dead interval becomes
4 times of hello i.e 20 seconds. But user wants the dead interval as
40 seconds and hello as 5 seconds. Therefore user configures it.
Now "ip ospf dead-interval 40" is not shown in "show running-config"
Therefore when user restarts the daemon, the dead interval goes back to
20 seconds and the neighbors are down.

Fix:
==================
If user configures dead-interval as 40, show it in show running config.

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

3 years agobgpd: Drop redundand `WORD` for no_neighbor_interface_cmd 9524/head
Donatas Abraitis [Mon, 30 Aug 2021 12:14:28 +0000 (15:14 +0300)]
bgpd: Drop redundand `WORD` for no_neighbor_interface_cmd

Just to be consistent with neighbor_interface_cmd.

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

3 years agoalpine: fix path for daemons file install 9515/head
Quentin Young [Mon, 30 Aug 2021 19:21:59 +0000 (15:21 -0400)]
alpine: fix path for daemons file install

The install statement was putting the daemons file at "/etc/frr" instead
of making a new directory "/etc/frr" and putting it inside there.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodocker: add expected log functions to alpine docker-start
Quentin Young [Mon, 30 Aug 2021 19:21:32 +0000 (15:21 -0400)]
docker: add expected log functions to alpine docker-start

Some basic functions are required by frrcommon.sh

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agodocker: build libyang2 along with FRR
Quentin Young [Sun, 29 Aug 2021 23:33:34 +0000 (19:33 -0400)]
docker: build libyang2 along with FRR

Alpine images have been broken for some time because libyang2 is not
available in Alpine. This patch updates our Dockerfile to build a
libyang2 APK and install it into the image to satisfy FRR's libyang2
dependency.

Unfortunately, libyang2 erroneously includes an internal header from
glibc, making it dependent on glibc to build. FRR's official Docker
images are based on Alpine, which only offers musl libc. Until libyang2
fixes this problem, the libyang2 source that is installed in this image
is a patched version that is compatible with musl libc and not an
official version.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
3 years agoMerge pull request #9512 from FRRouting/mergify/bp/stable/8.0/pr-9504
Donatas Abraitis [Sun, 29 Aug 2021 08:43:12 +0000 (11:43 +0300)]
Merge pull request #9512 from FRRouting/mergify/bp/stable/8.0/pr-9504

lib: Send c-bit when not using bfdd as daemon of choice (backport #9504)

3 years agolib: Send c-bit when not using bfdd as daemon of choice 9512/head
Donald Sharp [Fri, 27 Aug 2021 13:32:27 +0000 (09:32 -0400)]
lib: Send c-bit when not using bfdd as daemon of choice

Commit: 4b983eef2cb5c7306a8303f002d0e053ebeabdca

Modified the zapi send receive of the c-bit to only
be under the HAVE_BFDD.  If you are using ptm-bfd
then the decoder function still expects this to be
sent down.  This commit puts this behavior back

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

3 years agoFRRouting Release 8.0.1 frr-8.0.1
Martin Winter [Fri, 27 Aug 2021 08:32:04 +0000 (10:32 +0200)]
FRRouting Release 8.0.1

Bugfix Release

bgpd:
  - associate correct nexthop when using peer link-local [9146]
  - BGP dampening JSON fixes [9151]
  - bgp_packet_process_error can access peer after deletion [9356]
  - Call bgp_dest_unlock_node() inside bgp_adj_in_remove() [9168]
  - Clear capabilities field when resetting a bgp neighbor [9263]
  - Do not check for NULL values for vni_hash_cmp() [9171]
  - Do not delete peer_af structure when deactivating peer-group from an
    address-family [9145]
  - Don't forget bgp_dest_unlock_node for bgp_static_set() [9160]
  - Drop double-pointer for bgp_damp_info_free() [9230]
  - Drop unnecessary chars for filtered reason [9152]
  - Ensure v6 LL address is available before establishing peering [9141]
  - Extended community bandwidth fixes [9407]
  - Fix bgp routes filtering by [large]community-list [9358]
  - Fix crash in "clear ip bgp dampening <prefix>" [9226]
  - fix double free in dampening code (fixes crash in dampening) [9223]
  - fix missing damp info free when cleaning bgp path [9245]
  - fix missing list add in dampening [9233]
  - fix update-source for ipv6 [9501]
  - Fix rpki spacing to be 1 for indentation [9127]
  - Force process networks on VRF creation [9136]
  - hash compare functions never receive null values [9170]
  - limit the length of opaque data sent to zebra [9311]
  - Mark the node as the correct type for bgp ipv6 unicast [9221]
  - nht unresolved with global address next-hop [9142]
  - prevent routes loop through itself [9155]
  - Reflect changes to pfxSnt when using default-originate [9149]
  - Set extended msg size only if we advertised and received
    capability [9257]
  - Stop prepending peer-as if self-originated and last AS
    configured [9398]
  - Unlock bgp_dest for bgp_distance_unset if distance does not
    match [9161]
  - Use strict AS4 capability when processing parsing/generating
    pkts [9266]
  - per-peer dampening revert [9320]
fabricd:
  - fix running config [9132]
isisd:
  - argv fixes [9177]
  - fix extra space in the mpls-te config output [9139]
  - fix setting of the attached bit [9147]
  - fix uninitialized variable when searching for LSP [9137]
  - update interface_link_params callback to check for change [9173]
lib:
  - fix interface configuration after vrf change [9172]
  - fix prefix-list duplication check [9425]
  - remove vrf-interface config when removing the VRF [9122]
  - Scan lib/resolver.c only when c-ares is installed [9415]
  - Preserve user-configured VRF on netns deletion [9277]
nhrp:
  - fix display of nhs command [9279]
ospf6d:
  - always generate default route for stubs [9154]
  - Check the cost only when asbr_present for ECMP routes [9359]
  - consistent checksum JSON output [9119]
  - fix argument processing in the "area ... range" command [9296]
  - fix backlink check [9125]
  - fix route-map config changed, not getting applied on all types of
    routes [9118]
  - fix "show ipv6 ospf6 neighbor" command [9121]
  - Max aged LSAs are not getting deleted from DB [9117]
  - redistribute command minor fixes [9124]
  - Release last dbdesc packet after router dead interval [9134]
  - Drop LSA with bad seqnumber [9123]
  - use per-vrf router id instead of one global [9140]
ospfd:
  - don't exit when VRF socket is not created [9208]
  - explicitly exit from the router configuration node [9421]
  - fix external lsa handling in opaque capabilities
    enable/disable [9135]
  - fix initialization when vrf doesn't exist yet [9423]
  - fix "no ip ospf passive" command [9268]
  - fix ospfd crash while giving 'clear ip ospf neighbor' [9153]
  - ospf redistribute originating LSA internal connected routes [9392]
  - show ip ospf route json does not shown metric and tag [9130]
  - Summarised External LSA is not flushed in one scenario [9433]
  - update interface_link_params callback to check for
    change [9173]
pathd:
  - a couple of cli/doc fixes [9329]
  - don't use localtime [9156]
  - fix pcep node-entering commands [9409]
pimd:
  - fix IGMP VRF handling and PIM RP Prefix-list matching [9186]
  - make show ip mroute output consistent [9386]
  - memory leak fix and issue fix [9297]
ripd:
  - fix authentication key length [9267]
staticd:
  - fix bug of Null0 wrongly converted into blackhole in running config
    [9144]
tools:
  - add mac access-list context to frr-reload.py [9131]
  - limit bgp route-maps to direct changes only during reload [9138]
  - make frr-reload recognize pbr table range lines as single-line
    contexts [9133]
vtysh:
  - another take at "enable" in vtysh user mode [9183]
  - Handle end/enable commands better when in -u for vtysh [9128]
  - fix exit from link-params and pseudowire nodes [9157]
zebra:
  - bugfix of error quit of zebra, due to no nexthop ACTIVE [9275]
  - clean up nhg allocations in error path [9387]
  - fix a couple of coverity warnings [9169]
  - fix ifp pointer for groups/recursives [9150]
  - Fix pseudowires with backup nexthops [9174]
  - Prevent memory leak if route is rejected early [9351]
  - remove checks for src address existence when using "set src" [9278]
  - Remove unrelated info from evpn rmac json output [9129]
  - trigger remove all access vlans info for access port [9159]
  - Preserve user-configured VRF on netns deletion [9277]
build:
  - fix LDFLAGS confusion & gcov [9158]
doc:
  - bump sphinx version to 4.0.2, remove deprecated API, fix developer
    docs not built [9270]
  - fix bgp user doc colons [9276]
  - Fix code-block display for example shell commands [9274]
  - move ospf6 area commands to the appropriate section [9377]
  - Replace typo BANDIWDTH to BANDWIDTH [9406]
redhat:
  - Install frr.conf only if no per daemon config exists[9349]
snapcraft:
  - Snap update to 18.04 base [9430]

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9501 from FRRouting/mergify/bp/stable/8.0/pr-9498
Martin Winter [Thu, 26 Aug 2021 21:48:27 +0000 (23:48 +0200)]
Merge pull request #9501 from FRRouting/mergify/bp/stable/8.0/pr-9498

bgpd: fix update-source for ipv6 (backport #9498)

3 years agobgpd: fix update-source for ipv6 9501/head
Igor Ryzhov [Thu, 26 Aug 2021 10:07:55 +0000 (13:07 +0300)]
bgpd: fix update-source for ipv6

There's no IPv6 LL address on loopback/vrf interfaces. So if the user
configures update-source, the session is never going to be established.

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

3 years agoMerge pull request #9186 from FRRouting/mergify/bp/stable/8.0/pr-8637
Donald Sharp [Thu, 26 Aug 2021 12:52:31 +0000 (08:52 -0400)]
Merge pull request #9186 from FRRouting/mergify/bp/stable/8.0/pr-8637

Pim vrf acl fixes (backport #8637)

3 years agoMerge pull request #9424 from FRRouting/mergify/bp/stable/8.0/pr-9385
Mark Stapp [Tue, 24 Aug 2021 15:41:11 +0000 (11:41 -0400)]
Merge pull request #9424 from FRRouting/mergify/bp/stable/8.0/pr-9385

bgpd: fix segfault when re-adding "match evpn default-route" rule (backport #9385)

3 years agoMerge pull request #9459 from FRRouting/mergify/bp/stable/8.0/pr-9426
Donatas Abraitis [Tue, 24 Aug 2021 14:34:22 +0000 (17:34 +0300)]
Merge pull request #9459 from FRRouting/mergify/bp/stable/8.0/pr-9426

bgpd: imported evpn rt5 routes copy igpmetric (backport #9426)

3 years agobgpd: imported evpn rt5 routes copy igpmetric 9459/head
Philippe Guibert [Tue, 17 Aug 2021 14:43:37 +0000 (16:43 +0200)]
bgpd: imported evpn rt5 routes copy igpmetric

when doing BGP over an IGP platform, the expectation is that
the path calculation for a given prefix takes into account the
igpmetric given by IGP.
This is true with prefixes obtained in a given BGP instance where
peering occurs. For instance, ipv4 unicast entries or l2vpn evpn
entries work this way. The igpmetric is obtained through nexthop
tracking, like below:

south-vm# show bgp nexthop
Current BGP nexthop cache:
 1.1.1.1 valid [IGP metric 10], #paths 1, peer 1.1.1.1
 2.2.2.2 valid [IGP metric 20], #paths 1, peer 2.2.2.2

The igp metric is taken into account when doing best path
selection, and only the entry with lowest igp wins.

[..]
*>i[5]:[0]:[32]:[5.5.5.5]
                    1.1.1.1                  0    100      0 ?
                    RT:65400:268435556 ET:8 Rmac:2e:22:6c:67:bb:73
* i                 2.2.2.2                  0    100      0 ?
                    RT:65400:268435556 ET:8 Rmac:f2:d3:68:4e:f4:ed

however, for imported EVPN RT5 entries, the igpmetric was not
copied from the parent path info. Fix it. In this way, the
imported route entries use the igpmetric of the parent pi.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
(cherry picked from commit 56c70d87149ebdf9f399a882b3ecd1cec4e84b76)

3 years agopimd: fix PtP address handling 9186/head
David Lamparter [Tue, 18 May 2021 11:55:48 +0000 (13:55 +0200)]
pimd: fix PtP address handling

When we have a "192.0.2.1 peer 192.0.2.2/32" address on an interface, we
need to (a) recognize the local address as being on the link for our own
packets, and (b) do the IGMP socket lookup with the proper local address
rather than the peer prefix.

Fixes: efe6f18 ("pimd: fix IGMP receive handling")
Cc: Nathan Bahr <nbahr@atcorp.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit a2810d30256e8de250b9e0fdc274fc4852c7877c)

3 years agotests: Add IGMP/PIM VRF test
Martin Winter [Tue, 4 May 2021 02:07:45 +0000 (04:07 +0200)]
tests: Add IGMP/PIM VRF test

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit 511184897b1ba45703f1a8b6503c6b4abc513482)

3 years agotests: Add PIM ACL-based RP selection test
Martin Winter [Tue, 4 May 2021 02:04:37 +0000 (04:04 +0200)]
tests: Add PIM ACL-based RP selection test

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit fe3c85de1a3e167ecd5308efa448d127e78a9f7e)

3 years agotests: Add multicast tester library for topotests
Martin Winter [Fri, 20 Aug 2021 23:12:51 +0000 (01:12 +0200)]
tests: Add multicast tester library for topotests

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agotests: fix hang during topology shutdown when CLI connection fails
Martin Winter [Mon, 3 May 2021 20:50:45 +0000 (22:50 +0200)]
tests: fix hang during topology shutdown when CLI connection fails

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
(cherry picked from commit 80c5c45b0bc12d4fc5ca4b9d83a45db4798e7fac)

3 years agolib, pimd: add address match mode to prefix lists
David Lamparter [Tue, 20 Apr 2021 04:11:57 +0000 (06:11 +0200)]
lib, pimd: add address match mode to prefix lists

... the PIM code is kinda misusing prefix lists to match addresses.
Considering the weird semantics of access-lists, I can't fault it.
However, prefix lists aren't great at matching addresses by default,
since they try to match the prefix length too.  So, here's an "address
match mode" for prefix lists to get that to work more reasonably.

Fixes: #8492
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 2b6b16fc21d35693914231509c8710eff6a58c4a)

3 years agopimd: IGMP sockets need to be iface-bound too
David Lamparter [Tue, 20 Apr 2021 03:10:17 +0000 (05:10 +0200)]
pimd: IGMP sockets need to be iface-bound too

There's an IGMP socket per interface, so they should be bound to that
interface.  Which also makes IGMP work in VRFs.

Fixes: #7889
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit f06c6e3ef91027205e653a4aa72a2bb8969466e9)

3 years agoMerge pull request #9433 from FRRouting/mergify/bp/stable/8.0/pr-9408
Igor Ryzhov [Wed, 18 Aug 2021 14:41:46 +0000 (17:41 +0300)]
Merge pull request #9433 from FRRouting/mergify/bp/stable/8.0/pr-9408

ospfd: Summarised External LSA is not flushed in one scenario (backport #9408)

3 years agoMerge pull request #9423 from FRRouting/mergify/bp/stable/8.0/pr-9383
Martin Winter [Wed, 18 Aug 2021 14:40:44 +0000 (16:40 +0200)]
Merge pull request #9423 from FRRouting/mergify/bp/stable/8.0/pr-9383

ospfd: fix initialization when vrf doesn't exist yet (backport #9383)

3 years agoMerge pull request #9430 from opensourcerouting/snap-1804
Igor Ryzhov [Wed, 18 Aug 2021 14:39:29 +0000 (17:39 +0300)]
Merge pull request #9430 from opensourcerouting/snap-1804

[8.0] Snap update to 18.04 base

3 years agosnapcraft: Add missing libprotobuf-c-dev to build dependency 9430/head
Martin Winter [Wed, 18 Aug 2021 14:28:54 +0000 (16:28 +0200)]
snapcraft: Add missing libprotobuf-c-dev to build dependency

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9425 from FRRouting/mergify/bp/stable/8.0/pr-9365
Martin Winter [Wed, 18 Aug 2021 11:22:16 +0000 (13:22 +0200)]
Merge pull request #9425 from FRRouting/mergify/bp/stable/8.0/pr-9365

lib: fix prefix-list duplication check (backport #9365)

3 years agoMerge pull request #9415 from FRRouting/mergify/bp/stable/8.0/pr-9404
Igor Ryzhov [Wed, 18 Aug 2021 07:43:59 +0000 (10:43 +0300)]
Merge pull request #9415 from FRRouting/mergify/bp/stable/8.0/pr-9404

Scan lib/resolver.c only when c-ares is installed (backport #9404)

3 years agoospfd: Summarised External LSA is not flushed in one scenario 9433/head
Mobashshera Rasool [Mon, 16 Aug 2021 11:27:45 +0000 (04:27 -0700)]
ospfd: Summarised External LSA is not flushed in one scenario

Fix CI Failure test_ospf_type5_summary_tc45_p0

Problem Statement:
==================
Summarised LSA is not flushed in OSPFv2 in below scenario:
1. Configure summary-address in ospfv2
2. redistribute static and connected.
3. Check the LSAs are received on neighbor.
4. Now remove all OSPFv2 configs, so neighbor will still have the summarised LSA.
5. Configure router ospf with redistribute static and connected.
6. Check the DB, summarised LSA is present although the configuration is not present.
7. Now configure the summary-address and remove the configuration after sometime.
8. The summarised LSA will be still present.

RCA:
==================
When self originated LSA is received from the neighbor and that
LSA is summarised one, the LSA is refreshed but a flag is not set
due to which it was not able to remove it later.

Fix:
==================
Set the originated flag when refreshing summarised LSA.

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

3 years agosnapcraft: Add pathd to FRR snap daemons
Martin Winter [Tue, 17 Aug 2021 19:24:47 +0000 (21:24 +0200)]
snapcraft: Add pathd to FRR snap daemons

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agosnapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7
Martin Winter [Tue, 17 Aug 2021 17:49:42 +0000 (19:49 +0200)]
snapcraft: Change base to Ubuntu 18.04 and libyang 2.0.7

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9421 from idryzhov/8.0-ospf-explicit-exit
David Lamparter [Tue, 17 Aug 2021 15:06:34 +0000 (17:06 +0200)]
Merge pull request #9421 from idryzhov/8.0-ospf-explicit-exit

3 years agolib: fix prefix-list duplication check 9425/head
Igor Ryzhov [Tue, 10 Aug 2021 18:46:37 +0000 (21:46 +0300)]
lib: fix prefix-list duplication check

Currently, when we check the new prefix-list entry for duplication, we
only take filled in fields into account and ignore optional fields.
For example, if we already have `ip prefix-list A 0.0.0.0/0 le 32` and
we try to add `ip prefix-list A 0.0.0.0/0`, it is treated as duplicate.
We should always compare all prefix-list fields when doing the check.

Fixes #9355.

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

3 years agoospfd: fix initialization when vrf doesn't exist yet 9423/head
Igor Ryzhov [Thu, 12 Aug 2021 12:49:54 +0000 (15:49 +0300)]
ospfd: fix initialization when vrf doesn't exist yet

There are a couple of things that are not initialized if the OSPF router
is created in a non-existent VRF:
- ospf_lsa_maxage_walker
- ospf_lsa_refresh_walker
- ospf_opaque_type11_lsa_init

Rearrange some code to always initialize them and make it easier to find
similar problems in the future.

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

3 years agobgpd: fix segfault when re-adding "match evpn default-route" rule 9424/head
Igor Ryzhov [Thu, 12 Aug 2021 16:07:53 +0000 (19:07 +0300)]
bgpd: fix segfault when re-adding "match evpn default-route" rule

When using "match evpn default-route" rule, match_arg is NULL and strcmp
is not happy with that. There's already a special function named rulecmp
that handles such situations.

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

3 years agoospfd: explicitly exit from the router node 9421/head
Igor Ryzhov [Tue, 17 Aug 2021 12:36:55 +0000 (15:36 +0300)]
ospfd: explicitly exit from the router node

There's a new "mpls ldp-sync" command added to the OSPF router node in
FRR 8.0. This change broke the following config:
```
router ospf
!
mpls ldp
 discovery hello interval 10
!
```
The config was broken because the "mpls ldp" line is now treated as an
"mpls ldp-sync" line inside the router node. We must explicitly print
"exit" at the end of OSPF router node to fix the issue.

Fixes #9206.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9386 from FRRouting/mergify/bp/stable/8.0/pr-8952
Donald Sharp [Tue, 17 Aug 2021 11:41:15 +0000 (07:41 -0400)]
Merge pull request #9386 from FRRouting/mergify/bp/stable/8.0/pr-8952

pimd: make show ip mroute output consistent (backport #8952)

3 years agoMerge pull request #9409 from FRRouting/mergify/bp/stable/8.0/pr-9375
Mark Stapp [Tue, 17 Aug 2021 11:24:19 +0000 (07:24 -0400)]
Merge pull request #9409 from FRRouting/mergify/bp/stable/8.0/pr-9375

vtysh, pathd: fix pcep node-entering commands (backport #9375)

3 years agoMerge pull request #9358 from ton31337/fix/dont_convert_by_default_to_alias_8.0
Igor Ryzhov [Tue, 17 Aug 2021 09:23:23 +0000 (12:23 +0300)]
Merge pull request #9358 from ton31337/fix/dont_convert_by_default_to_alias_8.0

bgpd: [8.0] Fix bgp routes filtering by [l]community-list

3 years agolib: Scan lib/resolver.c only when c-ares is installed 9415/head
John W. O'Brien [Sun, 15 Aug 2021 16:46:30 +0000 (12:46 -0400)]
lib: Scan lib/resolver.c only when c-ares is installed

Scan lib/resolver.c only when c-ares is installed

Signed-off-by: John W. O'Brien <john@saltant.com>
(cherry picked from commit 433d9af2a6463d975cd746b1013f6cbe675fc2ab)

3 years agoMerge pull request #9406 from FRRouting/mergify/bp/stable/8.0/pr-9399
Igor Ryzhov [Mon, 16 Aug 2021 17:14:54 +0000 (20:14 +0300)]
Merge pull request #9406 from FRRouting/mergify/bp/stable/8.0/pr-9399

doc: Replace typo BANDIWDTH to BANDWIDTH (backport #9399)

3 years agoMerge pull request #9407 from FRRouting/mergify/bp/stable/8.0/pr-9265
Igor Ryzhov [Mon, 16 Aug 2021 17:14:44 +0000 (20:14 +0300)]
Merge pull request #9407 from FRRouting/mergify/bp/stable/8.0/pr-9265

bgpd: Extended community bandwidth fixes (backport #9265)

3 years agovtysh, pathd: fix pcep node-entering commands 9409/head
Igor Ryzhov [Wed, 11 Aug 2021 14:46:31 +0000 (17:46 +0300)]
vtysh, pathd: fix pcep node-entering commands

pce-config, pce and pcc node-entering commands in vtysh include no-form,
which is incorrect. Currently, when user passes a no-form command like
`no pcc`, vtysh enters the node while pathd deletes the node and this
leads to a desynchronization.

Regular and no-form commands should be defined separately to fix this.

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

3 years agobgpd: fix memory leaks in bgp_alias2community_str 9358/head
Igor Ryzhov [Wed, 11 Aug 2021 09:09:15 +0000 (12:09 +0300)]
bgpd: fix memory leaks in bgp_alias2community_str

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: Don't set `non-transitive` for extcommunity bandwidth by default 9407/head
Donatas Abraitis [Tue, 3 Aug 2021 11:25:01 +0000 (14:25 +0300)]
bgpd: Don't set `non-transitive` for extcommunity bandwidth by default

Before:

```
~/frr# vtysh -c 'conf' -c 'route-map testas permit 10' -c 'set extcommunity bandwidth 321'
~/frr# vtysh -c 'show route-map testas' | grep 321
    extcommunity bandwidth 321 non-transitive
~/frr# vtysh -c 'show run' | grep 321
 set extcommunity bandwidth 321 non-transitive
```

After:

```
~/frr# vtysh -c 'conf' -c 'route-map testas permit 10' -c 'set extcommunity bandwidth 321'
~/frr# vtysh -c 'show route-map testas' | grep 321
    extcommunity bandwidth 321
~/frr# vtysh -c 'show run' | grep 321
 set extcommunity bandwidth 321
~/frr# vtysh -c 'conf' -c 'route-map testas permit 20' -c 'set extcommunity bandwidth 321 non-tra'
~/frr# vtysh -c 'show run' | grep 321
 set extcommunity bandwidth 321
 set extcommunity bandwidth 321 non-transitive
```

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

3 years agobgpd: Keep extcommunity bandwidth commands persistent in route-maps
Donatas Abraitis [Tue, 3 Aug 2021 08:02:49 +0000 (11:02 +0300)]
bgpd: Keep extcommunity bandwidth commands persistent in route-maps

~/frr# vtysh -c 'conf' -c 'route-map testas permit 10' -c 'set extcommunity bandwidth 321'
~/frr# vtysh -c 'show route-map testas' | grep 321
    extcommunity bandwidth 321 non-transitive
~/frr# vtysh -c 'sh run' | grep 321
~/frr#

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

3 years agodoc: Replace typo BANDIWDTH to BANDWIDTH 9406/head
Donatas Abraitis [Sun, 15 Aug 2021 08:10:22 +0000 (11:10 +0300)]
doc: Replace typo BANDIWDTH to BANDWIDTH

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

3 years agoMerge pull request #9377 from idryzhov/8.0-ospf6-doc-fix
Donatas Abraitis [Sun, 15 Aug 2021 07:48:50 +0000 (10:48 +0300)]
Merge pull request #9377 from idryzhov/8.0-ospf6-doc-fix

[8.0] doc: move ospf6 area commands to the appropriate section

3 years agoMerge pull request #9398 from FRRouting/mergify/bp/stable/8.0/pr-9394
Donatas Abraitis [Sat, 14 Aug 2021 19:21:23 +0000 (22:21 +0300)]
Merge pull request #9398 from FRRouting/mergify/bp/stable/8.0/pr-9394

bgpd: Stop prepending peer-as if self-originated and lastas configured (backport #9394)

3 years agobgpd: Stop prepending peer-as if self-originated and lastas configured 9398/head
Don Slice [Wed, 11 Aug 2021 12:45:23 +0000 (08:45 -0400)]
bgpd: Stop prepending peer-as if self-originated and lastas configured

Problem seen where if "set aspath-prepend last-as" configured and
applied outbound, we prepend the peer's asn which causes our self-
originated routes to be denied.

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

3 years agoMerge pull request #9356 from FRRouting/mergify/bp/stable/8.0/pr-9328
Igor Ryzhov [Fri, 13 Aug 2021 17:10:24 +0000 (20:10 +0300)]
Merge pull request #9356 from FRRouting/mergify/bp/stable/8.0/pr-9328

bgpd: bgp_packet_process_error can access peer after deletion (backport #9328)

3 years agoMerge pull request #9392 from FRRouting/mergify/bp/stable/8.0/pr-9363
Igor Ryzhov [Fri, 13 Aug 2021 16:51:47 +0000 (19:51 +0300)]
Merge pull request #9392 from FRRouting/mergify/bp/stable/8.0/pr-9363

ospfd: ospf redistribute originating LSA internal connected routes (backport #9363)

3 years agoospfd: ospf redistribute originating LSA internal connected routes 9392/head
Mobashshera Rasool [Tue, 10 Aug 2021 16:24:47 +0000 (09:24 -0700)]
ospfd: ospf redistribute originating LSA internal connected routes

When OSPF is disabled on interface and enabled again, the IP which is
not matching the prefix-list is getting originated as External LSA.

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

3 years agoMerge pull request #9351 from FRRouting/mergify/bp/stable/8.0/pr-9321
Igor Ryzhov [Fri, 13 Aug 2021 11:08:52 +0000 (14:08 +0300)]
Merge pull request #9351 from FRRouting/mergify/bp/stable/8.0/pr-9321

zebra: Prevent memory leak if route is rejected early (backport #9321)

3 years agoMerge pull request #9359 from FRRouting/mergify/bp/stable/8.0/pr-9290
Igor Ryzhov [Fri, 13 Aug 2021 11:07:42 +0000 (14:07 +0300)]
Merge pull request #9359 from FRRouting/mergify/bp/stable/8.0/pr-9290

ospf6d: Check the cost only when asbr_present for ECMP routes (backport #9290)

3 years agoMerge pull request #9387 from FRRouting/mergify/bp/stable/8.0/pr-9374
Igor Ryzhov [Fri, 13 Aug 2021 11:05:41 +0000 (14:05 +0300)]
Merge pull request #9387 from FRRouting/mergify/bp/stable/8.0/pr-9374

zebra: clean up nhg allocations in error path (backport #9374)

3 years agozebra: clean up nhg allocations in error path 9387/head
Mark Stapp [Wed, 11 Aug 2021 14:41:53 +0000 (10:41 -0400)]
zebra: clean up nhg allocations in error path

Clean up allocated nhgs in error path in zread_nhg_add().

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

3 years agopimd: make show ip mroute output consistent 9386/head
Jafar Al-Gharaibeh [Tue, 29 Jun 2021 19:02:45 +0000 (14:02 -0500)]
pimd: make show ip mroute output consistent

We had 3 different string output formats in various places.
Make them all the same.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
(cherry picked from commit 530b12cf6e88170d4f6d4f10a8bd95de0284866e)

3 years agodoc: move ospf6 area commands to the appropriate section 9377/head
Igor Ryzhov [Wed, 11 Aug 2021 14:55:12 +0000 (17:55 +0300)]
doc: move ospf6 area commands to the appropriate section

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agobgpd: BGP extended [l]community-list regexp match must work with aliases
Donatas Abraitis [Mon, 9 Aug 2021 10:34:57 +0000 (13:34 +0300)]
bgpd: BGP extended [l]community-list regexp match must work with aliases

We have to convert BGP alias to numerical format to compare in regexp.

Signed-off-by: Donatas Abraitis <donatas.abraitis@gmail.com>
3 years agoospf6d: Check the cost only when asbr_present for ECMP routes 9359/head
Yash Ranjan [Wed, 4 Aug 2021 11:53:10 +0000 (04:53 -0700)]
ospf6d: Check the cost only when asbr_present for ECMP routes

For ECMP routes, the metric cost and metric type are compared
even when the asbr entry is not present. This stops the routes
from getting removed when max age LSAs are received for the
ECMP routes.

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

3 years agoMerge pull request #9349 from opensourcerouting/rpm-keep-config
Donald Sharp [Tue, 10 Aug 2021 14:12:29 +0000 (10:12 -0400)]
Merge pull request #9349 from opensourcerouting/rpm-keep-config

redhat: Install frr.conf only if no per daemon config exists

3 years agobgpd: bgp_packet_process_error can access peer after deletion 9356/head
Donald Sharp [Sun, 8 Aug 2021 12:23:24 +0000 (08:23 -0400)]
bgpd: bgp_packet_process_error can access peer after deletion

in bgp_io.c upon packet read of some error we are storing
the peer pointer on a thread to call bgp_packet_process_error.
In this case an event is generated that is not guaranteed to be
run immediately.  It could come in *after* the peer data structure
is deleted and as such we now are writing into memory that we
no longer possibly own as a peer data structure.

Modify the code so that the peer can track the thread associated
with the read error and then it can wisely kill that thread
when deleting the peer data structure.

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

3 years agozebra: Properly note add/update for rib_add_multipath_nhe 9351/head
Donald Sharp [Mon, 9 Aug 2021 12:01:06 +0000 (08:01 -0400)]
zebra: Properly note add/update for rib_add_multipath_nhe

When calling rib_add_multipath_nhe ensure that we have
well aligned return codes that mean something so that
interersted parties can properly handle the situation.

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

3 years agozebra: Prevent memory leak if route is rejected early
Donald Sharp [Fri, 6 Aug 2021 20:00:32 +0000 (16:00 -0400)]
zebra: Prevent memory leak if route is rejected early

When receiving a route via zapi, if the route is rejected
there exists a code path where we would not free the corresponding
re created.

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

3 years agoredhat: Install frr.conf only if no per daemon config exists 9349/head
Martin Winter [Mon, 9 Aug 2021 23:52:05 +0000 (01:52 +0200)]
redhat: Install frr.conf only if no per daemon config exists

Install frr.conf template as a template file, but only install it
as a config file if no per daemon file exists. This will use the
integrated config with new setups, but keeps the per-daemon config
for existing users

Signed-off-by: Martin Winter <mwinter@opensourcerouting.org>
3 years agoMerge pull request #9277 from FRRouting/mergify/bp/stable/8.0/pr-9238
Donatas Abraitis [Mon, 9 Aug 2021 07:38:16 +0000 (10:38 +0300)]
Merge pull request #9277 from FRRouting/mergify/bp/stable/8.0/pr-9238

lib, zebra: Preserve user-configured VRF on netns deletion (backport #9238)

3 years agoMerge pull request #9329 from FRRouting/mergify/bp/stable/8.0/pr-9315
Donatas Abraitis [Mon, 9 Aug 2021 07:30:59 +0000 (10:30 +0300)]
Merge pull request #9329 from FRRouting/mergify/bp/stable/8.0/pr-9315

pathd: a couple of cli/doc fixes (backport #9315)

3 years agodoc: fix pathd example config 9329/head
Igor Ryzhov [Thu, 5 Aug 2021 20:57:24 +0000 (23:57 +0300)]
doc: fix pathd example config

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

3 years agopathd: fix indentation and redundant space in index config
Igor Ryzhov [Thu, 5 Aug 2021 20:47:27 +0000 (23:47 +0300)]
pathd: fix indentation and redundant space in index config

Before:
```
segment-routing
 traffic-eng
  segment-list SL1
 index  10 mpls label 16010
```

After:
```
segment-routing
 traffic-eng
  segment-list SL1
   index 10 mpls label 16010
```

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

3 years agopathd: fix indentation for mpls-te config
Igor Ryzhov [Thu, 5 Aug 2021 20:45:44 +0000 (23:45 +0300)]
pathd: fix indentation for mpls-te config

Before:
```
segment-routing
 traffic-eng
 mpls-te on
 mpls-te import ospfv2
```

After:
```
segment-routing
 traffic-eng
  mpls-te on
  mpls-te import ospfv2
```

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

3 years agoMerge pull request #9266 from FRRouting/mergify/bp/stable/8.0/pr-9249
Donald Sharp [Sat, 7 Aug 2021 20:08:28 +0000 (16:08 -0400)]
Merge pull request #9266 from FRRouting/mergify/bp/stable/8.0/pr-9249

bgpd: Use strict AS4 capability when processing parsing/generating pkts (backport #9249)

3 years agoMerge pull request #9268 from FRRouting/mergify/bp/stable/8.0/pr-9239
Donald Sharp [Sat, 7 Aug 2021 20:08:08 +0000 (16:08 -0400)]
Merge pull request #9268 from FRRouting/mergify/bp/stable/8.0/pr-9239

ospfd: fix "no ip ospf passive" command (backport #9239)

3 years agoMerge pull request #9311 from idryzhov/bgp-opaque-fix
Donald Sharp [Sat, 7 Aug 2021 19:10:42 +0000 (15:10 -0400)]
Merge pull request #9311 from idryzhov/bgp-opaque-fix

[8.0] bgpd: limit the length of opaque data sent to zebra