]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
2 years agoisisd: fix area NULL pointer in isis_route_update
Louis Scalbert [Thu, 10 Nov 2022 16:18:01 +0000 (17:18 +0100)]
isisd: fix area NULL pointer in isis_route_update

Fix the case area is NULL.

Fixes: acc0029779 ("isisd: fix potential access to NULL pointer in isis_route_update")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
(cherry picked from commit 41c2bf853f072008330a929480bf235ac840212a)

2 years agoMerge pull request #12320 from FRRouting/mergify/bp/stable/8.4/pr-12307
Donatas Abraitis [Tue, 15 Nov 2022 16:02:43 +0000 (18:02 +0200)]
Merge pull request #12320 from FRRouting/mergify/bp/stable/8.4/pr-12307

tools: remove backslash from declare check regex (backport #12307)

2 years agoMerge pull request #12319 from FRRouting/mergify/bp/stable/8.4/pr-12315
Donatas Abraitis [Tue, 15 Nov 2022 09:28:25 +0000 (11:28 +0200)]
Merge pull request #12319 from FRRouting/mergify/bp/stable/8.4/pr-12315

Dplane sorry (backport #12315)

2 years agotools: remove backslash from declare check regex
Marius Tomaschewski [Fri, 11 Nov 2022 11:26:04 +0000 (12:26 +0100)]
tools: remove backslash from declare check regex

The backslash in `grep -q '^declare \-a'` is not needed and
causes `grep: warning: stray \ before -` warning in grep-3.8.

Signed-off-by: Marius Tomaschewski <mt@suse.com>
(cherry picked from commit 5216a05b32390a64efeb598051411e1776042624)

2 years agozebra: Fix dplane_fpm_nl to allow for fast configuration
Donald Sharp [Mon, 14 Nov 2022 13:28:45 +0000 (08:28 -0500)]
zebra: Fix dplane_fpm_nl to allow for fast configuration

If you have this order in your configuration file:

no fpm use-next-hop-groups
fpm address 127.0.0.1

the dplane code was using the same event thread t_event and the second
add event in the code was going, you already have an event scheduled
and as such the second event does not overwrite it.  Leaving
no code to actually start the whole processing.  There are probably
other cli iterations that will cause this fun as well, but I'm
not going to spend the time sussing them out at the moment.

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

2 years agozebra: Use the enum, luke
Donald Sharp [Mon, 14 Nov 2022 13:06:16 +0000 (08:06 -0500)]
zebra: Use the enum, luke

Use the enum and let the compiler help us figure out
what cases are being missed.

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

2 years agoMerge pull request #12305 from FRRouting/mergify/bp/stable/8.4/pr-12303
Donatas Abraitis [Fri, 11 Nov 2022 08:47:46 +0000 (10:47 +0200)]
Merge pull request #12305 from FRRouting/mergify/bp/stable/8.4/pr-12303

zebra: relax if_type check to allow early ES config creation (backport #12303)

2 years agozebra: relax if_type check to allow early ES config creation
Anuradha Karuppiah [Fri, 29 May 2020 16:53:31 +0000 (09:53 -0700)]
zebra: relax if_type check to allow early ES config creation

The API for configuring ES in zebra had a strict check for if_type
"isBond" that prevented the ES config from being created before the
interface.

Ticket: CM-29454

Signed-off-by: Anuradha Karuppiah <anuradhak@cumulusnetworks.com>
(cherry picked from commit 3fa177eed287823bbe1d6c7bd9856d1d19435db3)

2 years agoMerge pull request #12304 from FRRouting/mergify/bp/stable/8.4/pr-12269
Jafar Al-Gharaibeh [Thu, 10 Nov 2022 22:20:57 +0000 (16:20 -0600)]
Merge pull request #12304 from FRRouting/mergify/bp/stable/8.4/pr-12269

ospfd: prevent from crashing when processing external lsa (backport #12269)

2 years agoospfd: prevent from crashing when processing external lsa
Philippe Guibert [Mon, 7 Nov 2022 10:03:41 +0000 (11:03 +0100)]
ospfd: prevent from crashing when processing external lsa

When using debug mode, the ei parameter may be NULL. In that
case, do not display the log trace, otherwise a crash will
happen.

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

2 years agoMerge pull request #12299 from FRRouting/mergify/bp/stable/8.4/pr-12297
Jafar Al-Gharaibeh [Thu, 10 Nov 2022 04:55:42 +0000 (22:55 -0600)]
Merge pull request #12299 from FRRouting/mergify/bp/stable/8.4/pr-12297

pimd: Convert zlog_warn to debug (backport #12297)

2 years agopimd: Convert zlog_warn to debug
Donald Sharp [Fri, 22 Nov 2019 20:12:05 +0000 (15:12 -0500)]
pimd: Convert zlog_warn to debug

The unable to find a nexthop should not be a warning it should
be a debug.  Switching over.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 7d7206a534eec49b83ff0ef95fe1ba04e5507fc8)

2 years agoMerge pull request #12293 from donaldsharp/rpki_crash_to_8.4
Donatas Abraitis [Wed, 9 Nov 2022 14:46:50 +0000 (16:46 +0200)]
Merge pull request #12293 from donaldsharp/rpki_crash_to_8.4

bgpd: rpki was decrementing the node lock one time too many

2 years agobgpd: rpki was decrementing the node lock one time too many
Donald Sharp [Tue, 8 Nov 2022 19:38:02 +0000 (14:38 -0500)]
bgpd: rpki was decrementing the node lock one time too many

The code was this:

1)        match = bgp_table_subtree_lookup(rrp->bgp->rib[rrp->afi][rrp->safi],
                                         &rrp->prefix);

2)        node = match;

        while (node) {
                if (bgp_dest_has_bgp_path_info_data(node)) {
                        revalidate_bgp_node(node, rrp->afi, rrp->safi);
                }

3)               node = bgp_route_next_until(node, match);
        }

if (match)
4)              bgp_dest_unlock_node(match);

At 1) match was locked and became +1
At 2) match and node are now equal
At 3) On first iteration, match is decremented( as that node points
at it ) and the next item is locked, if it is found, and returned which becomes node

If 3 is run again because node is non-null then, current node is decremented
and the next node found is incremented and returned which becomes node again.

So if we get to 4) match is unlocked again which is now a double unlock
which, frankly, is not good.  In all code paths that I can see the
test for `if (match) ...` is not needed so let's just remove it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2 years agoMerge pull request #12290 from FRRouting/mergify/bp/stable/8.4/pr-12286
Donatas Abraitis [Wed, 9 Nov 2022 09:20:28 +0000 (11:20 +0200)]
Merge pull request #12290 from FRRouting/mergify/bp/stable/8.4/pr-12286

zebra/netconf_netlink.c: fix build without AF_MPLS (backport #12286)

2 years agozebra/netconf_netlink.c: fix build without AF_MPLS
Fabrice Fontaine [Tue, 8 Nov 2022 17:48:41 +0000 (18:48 +0100)]
zebra/netconf_netlink.c: fix build without AF_MPLS

Fix the following build failure raised since version 8.4 and
https://github.com/FRRouting/frr/commit/d53dc9bd8164ba40242e2013d382fb01eb0b96ed:

zebra/netconf_netlink.c: In function 'netlink_netconf_change':
zebra/netconf_netlink.c:109:32: error: 'AF_MPLS' undeclared (first use in this function)
  109 |         if (ncm->ncm_family == AF_MPLS)
      |                                ^~~~~~~

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
(cherry picked from commit fa60f2c2fac9ff6d71e8bddab92f78a6d558035b)

2 years agoMerge pull request #12285 from FRRouting/mergify/bp/stable/8.4/pr-12258
Donatas Abraitis [Tue, 8 Nov 2022 19:24:53 +0000 (21:24 +0200)]
Merge pull request #12285 from FRRouting/mergify/bp/stable/8.4/pr-12258

bgpd: fix "storing the address of local variable" (backport #12258)

2 years agobgpd: fix "storing the address of local variable"
David Lamparter [Fri, 4 Nov 2022 11:33:28 +0000 (12:33 +0100)]
bgpd: fix "storing the address of local variable"

New GCC 12 warning.

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

2 years agoMerge pull request #12282 from FRRouting/mergify/bp/stable/8.4/pr-12115
Jafar Al-Gharaibeh [Tue, 8 Nov 2022 16:33:21 +0000 (10:33 -0600)]
Merge pull request #12282 from FRRouting/mergify/bp/stable/8.4/pr-12115

ospfd: Allow unnumbered and numbered addresses to co-exist better (backport #12115)

2 years agoospfd: Allow unnumbered and numbered addresses to co-exist better
Donald Sharp [Wed, 12 Oct 2022 20:05:23 +0000 (16:05 -0400)]
ospfd: Allow unnumbered and numbered addresses to co-exist better

When forming a neighbor relationship on an interface, ospf is
currently evaluating unnumbered as highest priority, without
any consideration for if you have /32's and non /32's on the
interface.  Effectively if I have something like this:

int foo0
  ip address 192.168.119.1/24
!
router ospf
  network 0.0.0.0/0 area 0
!

ospf will form a neighbor on foo0 if it exists.  Now
suppose someone does this:

int foo0
  ip address 192.168.120.1/32

This will create the unnumbered interface on foo0 and
the peering will come down immediately.

The problem here is that the original designers of the unnumbered
code for ospf didn't envision end operators mixing and matching
addresses on an interface like this ( for perfectly legitimate
reasons I might add ).

So if ospf has both numbered and unnumbered let's match against
the numbered first and then unnumbered.  This solves the problem

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

2 years agoMerge pull request #12275 from FRRouting/mergify/bp/stable/8.4/pr-12034
Donatas Abraitis [Tue, 8 Nov 2022 07:16:10 +0000 (09:16 +0200)]
Merge pull request #12275 from FRRouting/mergify/bp/stable/8.4/pr-12034

bgpd: Do not send Deconfig/Shutdown message when restarting (backport #12034)

2 years agoMerge pull request #12274 from FRRouting/mergify/bp/stable/8.4/pr-12268
Jafar Al-Gharaibeh [Tue, 8 Nov 2022 06:26:03 +0000 (00:26 -0600)]
Merge pull request #12274 from FRRouting/mergify/bp/stable/8.4/pr-12268

zebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr (backport #12268)

2 years agoMerge pull request #12277 from FRRouting/mergify/bp/stable/8.4/pr-12276
Jafar Al-Gharaibeh [Tue, 8 Nov 2022 06:25:34 +0000 (00:25 -0600)]
Merge pull request #12277 from FRRouting/mergify/bp/stable/8.4/pr-12276

ospfd: Get route-map name for default-information originate (backport #12276)

2 years agoospfd: Get route-map name for default-information originate
Donatas Abraitis [Mon, 7 Nov 2022 20:23:07 +0000 (22:23 +0200)]
ospfd: Get route-map name for default-information originate

LR1.wue3(config)# route-map foo-bar-baz10 permit 10
LR1.wue3(config-route-map)# exit
LR1.wue3(config)# router ospf
LR1.wue3(config-router)#  ospf router-id 172.18.254.201
LR1.wue3(config-router)#  log-adjacency-changes
LR1.wue3(config-router)# default-information originate metric 50 metric-type 1 route-map foo-bar-baz10
LR1.wue3(config-router)# end

Results in:

LR1.wue3# show run
...
!
router ospf
 ospf router-id 172.18.254.201
 log-adjacency-changes
 default-information originate metric 50 metric-type 1 route-map oute-map
exit
!
route-map foo-bar-baz10 permit 10
exit
!
end

Let's fix this.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit bd162aae094360605b7f4b9b8cd46f6e4ffebc04)

2 years agotests: Check if the routes in the kernel are retained for GR as well
Donatas Abraitis [Fri, 30 Sep 2022 06:46:00 +0000 (09:46 +0300)]
tests: Check if the routes in the kernel are retained for GR as well

Not only in BGP table.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 18e427bc598879110860fd198808300e991ad146)

2 years agobgpd: Do not send Deconfig/Shutdown message when restarting
Donatas Abraitis [Tue, 27 Sep 2022 14:30:16 +0000 (17:30 +0300)]
bgpd: Do not send Deconfig/Shutdown message when restarting

We might disable sending unconfig/shutdown notifications when
Graceful-Restart is enabled and negotiated.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 95098d9611e79d43b578400bb76dc7a76aa8cab9)

2 years agozebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr
Donatas Abraitis [Wed, 2 Nov 2022 21:01:18 +0000 (23:01 +0200)]
zebra: Reuse netinet/if_ether.h to avoid redefinition of struct ethhdr

In file included from /usr/include/net/ethernet.h:10,
                 from ./lib/prefix.h:26,
                 from zebra/tc_netlink.c:32:
/usr/include/netinet/if_ether.h:115:8: error: redefinition of 'struct ethhdr'
  115 | struct ethhdr {
      |        ^~~~~~
In file included from zebra/tc_netlink.c:28:
/usr/include/linux/if_ether.h:169:8: note: originally defined here
  169 | struct ethhdr {
      |        ^~~~~~

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 83f496bdf094d71e9bbe38f08f39426f8b1a139d)

2 years agoFRR Release 8.4 frr-8.4
Jafar Al-Gharaibeh [Thu, 3 Nov 2022 03:45:40 +0000 (22:45 -0500)]
FRR Release 8.4

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agodebian, redhat: updating changelog for new release
Jafar Al-Gharaibeh [Thu, 3 Nov 2022 03:44:56 +0000 (22:44 -0500)]
debian, redhat: updating changelog for new release

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2 years agoMerge pull request #12249 from FRRouting/mergify/bp/stable/8.4/pr-12247
Jafar Al-Gharaibeh [Thu, 3 Nov 2022 03:36:32 +0000 (22:36 -0500)]
Merge pull request #12249 from FRRouting/mergify/bp/stable/8.4/pr-12247

bgpd: Ensure that bgp open message stream has enough data to read (backport #12247)

2 years agobgpd: Ensure that bgp open message stream has enough data to read
Donald Sharp [Wed, 2 Nov 2022 17:24:48 +0000 (13:24 -0400)]
bgpd: Ensure that bgp open message stream has enough data to read

If a operator receives an invalid packet that is of insufficient size
then it is possible for BGP to assert during reading of the packet
instead of gracefully resetting the connection with the peer.

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

2 years agoMerge pull request #12242 from FRRouting/mergify/bp/dev/8.4/pr-12159
Jafar Al-Gharaibeh [Wed, 2 Nov 2022 03:59:17 +0000 (22:59 -0500)]
Merge pull request #12242 from FRRouting/mergify/bp/dev/8.4/pr-12159

bgpd: Notify BGP conditional advertisement thread when the peer goes down (backport #12159)

2 years agobgpd: Notify BGP conditional advertisement thread when the peer goes down
Donatas Abraitis [Thu, 20 Oct 2022 08:21:51 +0000 (11:21 +0300)]
bgpd: Notify BGP conditional advertisement thread when the peer goes down

Also, make sure we check if the advertisement table changed using FROM peer,
not TO peer.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 0775362306d51ceb3ca847f3aacd9b0b8451465b)

2 years agoMerge pull request #12228 from FRRouting/mergify/bp/dev/8.4/pr-12215
Jafar Al-Gharaibeh [Sun, 30 Oct 2022 05:11:40 +0000 (00:11 -0500)]
Merge pull request #12228 from FRRouting/mergify/bp/dev/8.4/pr-12215

ospfd: remove asster on zero length LSA - which is permitted by spec (backport #12215)

2 years agoMerge pull request #12227 from FRRouting/mergify/bp/dev/8.4/pr-12222
Jafar Al-Gharaibeh [Sun, 30 Oct 2022 05:11:14 +0000 (00:11 -0500)]
Merge pull request #12227 from FRRouting/mergify/bp/dev/8.4/pr-12222

ospfd: fix bug where acks were not be generated to incoming P2P/P2MP peers (backport #12222)

2 years agoMerge pull request #12213 from FRRouting/mergify/bp/dev/8.4/pr-12200
Jafar Al-Gharaibeh [Sun, 30 Oct 2022 05:11:06 +0000 (00:11 -0500)]
Merge pull request #12213 from FRRouting/mergify/bp/dev/8.4/pr-12200

pimd, pim6d: Fix rp-info OIF having PIM disabled interface (backport #12200)

2 years agoMerge pull request #12225 from FRRouting/mergify/bp/dev/8.4/pr-12220
Jafar Al-Gharaibeh [Sun, 30 Oct 2022 05:10:51 +0000 (00:10 -0500)]
Merge pull request #12225 from FRRouting/mergify/bp/dev/8.4/pr-12220

doc: Update with right default FPM server port (backport #12220)

2 years agoospfd: catch and report runt LSAs
Lou Berger [Fri, 28 Oct 2022 16:06:04 +0000 (16:06 +0000)]
ospfd: catch and report runt LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 53674eaba6a34f42f322f79449c2ab667884fb82)

2 years agoospfd: remove assert on zero length LSA - which is permitted by spec
Lou Berger [Thu, 27 Oct 2022 19:12:23 +0000 (19:12 +0000)]
ospfd: remove assert on zero length LSA - which is permitted by spec

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 15c4dd82dba35467c598d48407dc1238983bb31b)

2 years agoMerge pull request #12214 from FRRouting/mergify/bp/dev/8.4/pr-12211
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:57:51 +0000 (16:57 -0500)]
Merge pull request #12214 from FRRouting/mergify/bp/dev/8.4/pr-12211

pimd: fixing some coverity issues (backport #12211)

2 years agoospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors
Lou Berger [Sat, 29 Oct 2022 17:17:56 +0000 (17:17 +0000)]
ospfd: fix bug where acks were not be generated to incoming P2P/P2MP neighbors

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit dd3b58a00aebc1b72c2dc18cc28d9cb6bbcd1c5b)

2 years agoMerge pull request #12223 from FRRouting/mergify/bp/dev/8.4/pr-12172
Jafar Al-Gharaibeh [Sat, 29 Oct 2022 21:57:34 +0000 (16:57 -0500)]
Merge pull request #12223 from FRRouting/mergify/bp/dev/8.4/pr-12172

OSPF opaques LSA API - fix bug with LL API delete, add option for zero data length withdrawals (backport #12172)

2 years agodoc: Update with right default FPM server port
Spoorthi K [Sat, 29 Oct 2022 08:39:00 +0000 (14:09 +0530)]
doc: Update with right default FPM server port

Signed-off-by: Spoorthi K <spk@redhat.com>
(cherry picked from commit aa52f3189b576dd8fea7ae183d0f7e7dc4307020)

2 years agotopotest: ospfapi - test opaque all type add/withdrawals, with and wo zero length
Lou Berger [Wed, 19 Oct 2022 20:26:13 +0000 (20:26 +0000)]
topotest: ospfapi - test opaque all type add/withdrawals, with and wo zero length

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit c4fff21b8bd96ab0fbf659da3e6d151b341eb963)

2 years agoospfd/ospfclient: add option to flush/withdrawal with zero length
Lou Berger [Sun, 16 Oct 2022 15:19:37 +0000 (15:19 +0000)]
ospfd/ospfclient: add option to flush/withdrawal with zero length

default behavior is unchanged, i.e., to not zero

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 2f30cb25747dc9657046c59ca1f378203192de26)

2 years agoospfd: ospf_apiserver.c - fix link local opaque LSA delete
Lou Berger [Fri, 21 Oct 2022 11:12:11 +0000 (11:12 +0000)]
ospfd: ospf_apiserver.c - fix link local opaque LSA delete

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 08172828f6dc0950431e57e43b0aa2dc674cb6fe)

2 years agopimd: Dereference before null check
Sai Gomathi N [Thu, 27 Oct 2022 09:36:00 +0000 (02:36 -0700)]
pimd: Dereference before null check

In pim_ecmp_nexthop_search: All paths that lead to this null pointer comparison already dereference the pointer earlier
There may be a null pointer dereference, or else the comparison against null is unnecessary.

Coverity CID-1519749

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
(cherry picked from commit b6467a4274df734c5a5d1bf4cf9ab5c6d0b8a475)

2 years agopimd: Unchecked return value
Sai Gomathi N [Thu, 27 Oct 2022 08:52:31 +0000 (01:52 -0700)]
pimd: Unchecked return value

In tib_sg_oil_setup: Value returned from a function is not checked for errors before being used.
If the function returns an error value, the error value may be mistaken for a normal value.
Here, only the nexthop value is being used. So casted the return type to void.

Coverity CID-1519816

Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
(cherry picked from commit f13530f23a9ba73027f8f40b78eb81396afaa092)

2 years agopimd, pim6d: Fix rp-info OIF having PIM disabled interface
Sarita Patra [Wed, 26 Oct 2022 04:25:23 +0000 (21:25 -0700)]
pimd, pim6d: Fix rp-info OIF having PIM disabled interface

Problem:
frr(config)# show ip pim rp-info
RP address group/prefix-list OIF I am RP Source Group-Type
109.0.0.3 224.0.0.0/4 ens192 no Static ASM

frr(config)# int ens192
frr(config-if)# no ip pim

frr(config) show ip pim rp-info
RP address group/prefix-list OIF I am RP Source Group-Type
109.0.0.3 224.0.0.0/4 ens192 no Static ASM

rp-info OIF is still having ens192 which is PIM disabled.
Fixing this as part of this PR.

Issue: #12044

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 43a18948d5239271b9e777c2ec4b7770ef0dcb15)

2 years agoMerge pull request #12209 from FRRouting/mergify/bp/dev/8.4/pr-12205
Donatas Abraitis [Thu, 27 Oct 2022 09:29:02 +0000 (10:29 +0100)]
Merge pull request #12209 from FRRouting/mergify/bp/dev/8.4/pr-12205

bgpd: Fix the condition whether nexthop is changed (backport #12205)

2 years agoMerge pull request #12208 from FRRouting/mergify/bp/dev/8.4/pr-12204
Donatas Abraitis [Thu, 27 Oct 2022 08:45:15 +0000 (09:45 +0100)]
Merge pull request #12208 from FRRouting/mergify/bp/dev/8.4/pr-12204

bgpd: Check for IP-format Site-of-Origin (backport #12204)

2 years agobgpd: Fix the condition whether nexthop is changed
Ryoga Saito [Thu, 27 Oct 2022 01:17:50 +0000 (10:17 +0900)]
bgpd: Fix the condition whether nexthop is changed

Given that the following topology, route server MUST not modify NEXT_HOP
attribute because route server isn't in the actual routing path. This
behavior is required to comply RFC7947

(Router A) <-(eBGP peer)-> (Route Server) <-(eBGP peer)-> (Router B)

RFC7947 says as follows:

> As the route server does not participate in the actual routing of
> traffic, the NEXT_HOP attribute MUST be passed unmodified to the route
> server clients, similar to the "third-party" next-hop
> feature described in Section 5.1.3. of [RFC4271].

However, current FRR is violating RFC7947 in some cases. If routers and
route server established BGP peer over IPv6 connection and routers
advertise ipv4-vpn routes through route server, route server will modify
NEXT_HOP attribute in these advertisements.

This is because the condition to check whether NEXT_HOP attribute should
be changed or not is wrong. We should use (afi, safi) as the key to
check, but (nhafi, safi) is actually used. This causes the RFC7947
violation.

Signed-off-by: Ryoga Saito <ryoga.saito@linecorp.com>
(cherry picked from commit 5b786189bc60b07c62569a324754b4b49fe61f8e)

2 years agobgpd: Check for IP-format Site-of-Origin
Trey Aspelund [Wed, 26 Oct 2022 20:53:09 +0000 (20:53 +0000)]
bgpd: Check for IP-format Site-of-Origin

When deciding whether to apply "neighbor soo" filtering towards a peer,
we were only looking for SoO ecoms that use either AS or AS4 encoding.
This makes sure we also check for IPv4 encoding, since we allow a user
to configure that encoding style against the peer.

Config:
```
router bgp 1
 address-family ipv4 unicast
  network 100.64.0.2/32 route-map soo-foo
  neighbor 192.168.122.12 soo 3.3.3.3:20
 exit-address-family
!
route-map soo-foo permit 10
 set extcommunity soo 3.3.3.3:20
exit
```

Before:
```
ub20# show ip bgp neighbors 192.168.122.12 advertised-routes
BGP table version is 5, local router ID is 100.64.0.222, vrf id 0
Default local pref 100, local AS 1
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          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0    100  32768 i
*> 100.64.0.2/32    0.0.0.0                  0    100  32768 i

Total number of prefixes 2
```

After:
```
ub20# show ip bgp neighbors 192.168.122.12 advertised-routes
BGP table version is 5, local router ID is 100.64.0.222, vrf id 0
Default local pref 100, local AS 1
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          Next Hop            Metric LocPrf Weight Path
*> 2.2.2.2/32       0.0.0.0                  0    100  32768 i

Total number of prefixes 1
```

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

2 years agoMerge pull request #12206 from FRRouting/mergify/bp/dev/8.4/pr-12179
Donatas Abraitis [Thu, 27 Oct 2022 06:26:35 +0000 (07:26 +0100)]
Merge pull request #12206 from FRRouting/mergify/bp/dev/8.4/pr-12179

  ospf: optimization for FRR's P2MP mode (backport #12179)

2 years agoMerge pull request #12207 from FRRouting/mergify/bp/dev/8.4/pr-12190
Donatas Abraitis [Thu, 27 Oct 2022 06:26:17 +0000 (07:26 +0100)]
Merge pull request #12207 from FRRouting/mergify/bp/dev/8.4/pr-12190

ospf6d: Fix for memory leak issues in ospf6. (backport #12190)

2 years agoospf6d: Fix for memory leak issues in ospf6.
Manoj Naragund [Tue, 25 Oct 2022 07:43:10 +0000 (00:43 -0700)]
ospf6d: Fix for memory leak issues in ospf6.

Problem:
Multiple memory leaks in ospf6.

 260 ==6637== 32 bytes in 1 blocks are definitely lost in loss record 5 of 24
 261 ==6637==    at 0x4C31FAC: calloc (vg_replace_malloc.c:762)
 262 ==6637==    by 0x4E8A1BF: qcalloc (memory.c:111)
 263 ==6637==    by 0x11EE27: ospf6_summary_add_aggr_route_and_blackhole (ospf6_asbr.c:2779)
 264 ==6637==    by 0x11EEBA: ospf6_originate_new_aggr_lsa (ospf6_asbr.c:2811)
 265 ==6637==    by 0x4E7C6A7: hash_clean (hash.c:325)
 266 ==6637==    by 0x11FA93: ospf6_handle_external_aggr_update (ospf6_asbr.c:3164)
 267 ==6637==    by 0x11FA93: ospf6_asbr_summary_process (ospf6_asbr.c:3386)
 268 ==6637==    by 0x4EB739B: thread_call (thread.c:1692)
 269 ==6637==    by 0x4E85B17: frr_run (libfrr.c:1068)
 270 ==6637==    by 0x119535: main (ospf6_main.c:228)

 356 ==6637== 240 bytes in 12 blocks are indirectly lost in loss record 13 of 24
 357 ==6637==    at 0x4C2FE96: malloc (vg_replace_malloc.c:309)
 358 ==6637==    by 0x4E8A0DA: qmalloc (memory.c:106)
 359 ==6637==    by 0x13545C: ospf6_lsa_alloc (ospf6_lsa.c:724)
 360 ==6637==    by 0x1354E3: ospf6_lsa_create_headeronly (ospf6_lsa.c:756)
 361 ==6637==    by 0x1355F2: ospf6_lsa_copy (ospf6_lsa.c:790)
 362 ==6637==    by 0x13B58B: ospf6_dbdesc_recv_slave (ospf6_message.c:976)
 363 ==6637==    by 0x13B58B: ospf6_dbdesc_recv (ospf6_message.c:1038)
 364 ==6637==    by 0x13B58B: ospf6_read_helper (ospf6_message.c:1838)
 365 ==6637==    by 0x13B58B: ospf6_receive (ospf6_message.c:1875)
 366 ==6637==    by 0x4EB739B: thread_call (thread.c:1692)
 367 ==6637==    by 0x4E85B17: frr_run (libfrr.c:1068)
 368 ==6637==    by 0x119535: main (ospf6_main.c:228)

RCA:
1. when the ospf6 area is being deleted, the neighbor related information
   was not being cleaned up.
2. when aggr route gets deleted from rt_aggr_tbl the corrsponding summary
   route attched to the aggr route was not being deleted.

Fix:
Added the ospf6_neighbor_delete in ospf6_area_delete to free the
neighbor related information and added ospf6_route_delete while
freeing external aggr route to free the summary route.

Signed-off-by: Manoj Naragund <mnaragund@vmware.com>
(cherry picked from commit 0022611fb729c6d53ff2efa3f77254ff07fbe0a4)

2 years agoospf: optimization for FRR's P2MP mode
Lou Berger [Fri, 21 Oct 2022 20:35:13 +0000 (20:35 +0000)]
ospf: optimization for FRR's P2MP mode

FRR implements a non-standard, but compatible approach for
sending update LSAs (it always send to 224.0.0.5) on P2MP
interfaces. This change makes it so acks are also sent to
224.0.0.5.

Since the acks are multicast, this allows an optimization
where we don't send back out the incoming P2MP interface
immediately allow time to rx multicast ack from neighbors
on the same net that rx'ed the original (multicast) update.

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit c706f0e32ba8aa8780a0618b6fbba364c383ae05)

2 years agotopotests: test_ospf_p2mp.py - check for full adjacencies and basic DB info
Lou Berger [Fri, 21 Oct 2022 16:44:45 +0000 (16:44 +0000)]
topotests: test_ospf_p2mp.py - check for full adjacencies and basic DB info

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 675ba67d89b1bc3fc2364ff2aabc50392456d1d0)

2 years agoMerge pull request #12198 from FRRouting/mergify/bp/dev/8.4/pr-12142
Donald Sharp [Tue, 25 Oct 2022 17:52:28 +0000 (13:52 -0400)]
Merge pull request #12198 from FRRouting/mergify/bp/dev/8.4/pr-12142

bgpd: Honor default holdtime when triggering session reset for SendHoldTimer (backport #12142)

2 years agobgpd: Honor default holdtime when triggering session reset for SendHoldTimer
Donatas Abraitis [Mon, 17 Oct 2022 10:34:41 +0000 (13:34 +0300)]
bgpd: Honor default holdtime when triggering session reset for SendHoldTimer

If the timer is not explicitly configured for a peer, the default timer
is not taken into account and SendHoldTimer mechanism does not work at all.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 460ed839b57199cfb7fc9e71d4f861e22454ae18)

2 years agoMerge pull request #12194 from FRRouting/mergify/bp/dev/8.4/pr-12178
Donald Sharp [Tue, 25 Oct 2022 12:19:52 +0000 (08:19 -0400)]
Merge pull request #12194 from FRRouting/mergify/bp/dev/8.4/pr-12178

Revert "doc: Add `neighbor PEER extended-optional-parameters` command" (backport #12178)

2 years agoRevert "doc: Add `neighbor PEER extended-optional-parameters` command"
Donatas Abraitis [Fri, 21 Oct 2022 18:45:29 +0000 (21:45 +0300)]
Revert "doc: Add `neighbor PEER extended-optional-parameters` command"

I don't know how I missed that it was already defined. Let's just revert it.

This reverts commit 13111667513a0f91a8e875cdf12c940ea2b60b05.

(cherry picked from commit 37abfd6d191389718557730e28ad0caa77e4ba93)

2 years agoMerge pull request #12175 from FRRouting/mergify/bp/dev/8.4/pr-12155
Donatas Abraitis [Sun, 23 Oct 2022 15:53:37 +0000 (18:53 +0300)]
Merge pull request #12175 from FRRouting/mergify/bp/dev/8.4/pr-12155

OSPF: allow for zero length opaque LSAs (backport #12155)

2 years agoMerge pull request #12168 from FRRouting/mergify/bp/dev/8.4/pr-12094
Donatas Abraitis [Sun, 23 Oct 2022 15:53:10 +0000 (18:53 +0300)]
Merge pull request #12168 from FRRouting/mergify/bp/dev/8.4/pr-12094

pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP (backport #12094)

2 years agotopotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs
Lou Berger [Wed, 19 Oct 2022 13:07:02 +0000 (13:07 +0000)]
topotests: ospfapi - enahnce test to cover explicit delete and 0 len opaque LSAs

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 0b242b118fb8db6397d186f62d7f912abeb620ac)

2 years agoospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing
Lou Berger [Wed, 19 Oct 2022 11:52:30 +0000 (11:52 +0000)]
ospfclient: add 'wait,<seconds>' action to ospfclient.py - for testing

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 20d26a9e08aa2e104bef1e4dd0cb347c9a2ab912)

2 years agoospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)
Lou Berger [Wed, 19 Oct 2022 11:50:41 +0000 (11:50 +0000)]
ospfd: allow for zero length opaque LSAs (which is permitted per RFC 5250)

Signed-off-by: Lou Berger <lberger@labn.net>
(cherry picked from commit 0b91fce78b0bcd601e1c9eff44dbac1e847038cc)

2 years agopimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP
Sarita Patra [Tue, 11 Oct 2022 01:38:14 +0000 (18:38 -0700)]
pimd, pim6d: Don't configure link-local, Multicast, Unspecified address as RP

Problem:
=======
frr(config)# do show ipv6 pim interface
 Interface  State  Address                   PIM Nbrs  PIM DR  FHR  IfChannels
 ens192     up     fe80::250:56ff:feb7:3619  0         local   0    1

Configure ens192 interface link-local address as RP.
frr(config)# ipv6 pim rp fe80::250:56ff:feb7:3619
No Path to RP address specified: fe80::250:56ff:feb7:3619

frr(config)# do show ipv6 pim rp-info
 RP address                group/prefix-list  OIF      I am RP  Source  Group-Type
 fe80::250:56ff:feb7:3619  ff00::/8           Unknown  yes      Static  ASM

Fix:
===
RP should not be link-local, multicast and unspecified address.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit aae2af98ca62b17b2bd63e432d65938d7202b9bd)

2 years agopimd, pim6d: Define pim_addr_is_multicast API
Sarita Patra [Thu, 13 Oct 2022 04:37:28 +0000 (21:37 -0700)]
pimd, pim6d: Define pim_addr_is_multicast API

pim_addr_is_multicast API will check if the address is multicast
address or not.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit dce0f7468d4b1f3bb39dfdd0e768138bebb08b0d)

2 years agoMerge pull request #12164 from FRRouting/mergify/bp/dev/8.4/pr-12160
Donatas Abraitis [Fri, 21 Oct 2022 07:02:23 +0000 (10:02 +0300)]
Merge pull request #12164 from FRRouting/mergify/bp/dev/8.4/pr-12160

Debug nh fix (backport #12160)

2 years agoMerge pull request #12158 from FRRouting/mergify/bp/dev/8.4/pr-12144
Jafar Al-Gharaibeh [Fri, 21 Oct 2022 04:45:03 +0000 (23:45 -0500)]
Merge pull request #12158 from FRRouting/mergify/bp/dev/8.4/pr-12144

pimd: Fix v4-over-v6 nexthop handling (backport #12144)

2 years agolib: Remove unnecessary comparison, for linked list
Donald Sharp [Wed, 19 Oct 2022 16:57:28 +0000 (12:57 -0400)]
lib: Remove unnecessary comparison, for linked list

In the comparison function for a linked list code was
always checking against passed in NULL's.  The comparison
function will never receive a NULL value for data from
the linklist.c code.

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

2 years agozebra: Fix debug of filtering out prefix due to routemap
Donald Sharp [Wed, 19 Oct 2022 16:44:55 +0000 (12:44 -0400)]
zebra: Fix debug of filtering out prefix due to routemap

The debug for notification about a filtered prefix was
just printing the nexthop ifindex and vrf id.  Not all
nexthops have this data.  Just print out the actual nexthop

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

2 years agopimd: Fix v4-over-v6 nexthop handling
Sarita Patra [Mon, 17 Oct 2022 21:13:33 +0000 (14:13 -0700)]
pimd: Fix v4-over-v6 nexthop handling

In the current code, if_lookup_by_index()
is called for un-initialized ifindex value.

This issue is introduced after 11098 PR.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit e0a75e7001fdab5d59f62b03d640e64664217dd5)

2 years agoMerge pull request #12137 from opensourcerouting/fix/chown_touch
Donald Sharp [Sun, 16 Oct 2022 19:20:05 +0000 (15:20 -0400)]
Merge pull request #12137 from opensourcerouting/fix/chown_touch

tools: Use install instead of touch/chown combination

2 years agotools: Do not try creating /proc with install command
Donatas Abraitis [Fri, 14 Oct 2022 18:30:13 +0000 (21:30 +0300)]
tools: Do not try creating /proc with install command

Leftovers.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agotools: Use `install` instead of `touch/chown` combination
Donatas Abraitis [Mon, 10 Oct 2022 15:27:59 +0000 (18:27 +0300)]
tools: Use `install` instead of `touch/chown` combination

touch + chown can have a gap between the commands (or the second failed).

This could lead to unexpected permissions (root, instead of frr) for some
.conf files or directories.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2 years agoMerge pull request #12131 from FRRouting/mergify/bp/dev/8.4/pr-12113
Donald Sharp [Fri, 14 Oct 2022 12:41:19 +0000 (08:41 -0400)]
Merge pull request #12131 from FRRouting/mergify/bp/dev/8.4/pr-12113

bgpd: Allow `network XXX` to work with bgp suppress-fib-pending (backport #12113)

2 years agobgpd: Allow `network XXX` to work with bgp suppress-fib-pending
Donald Sharp [Wed, 12 Oct 2022 18:53:21 +0000 (14:53 -0400)]
bgpd: Allow `network XXX` to work with bgp suppress-fib-pending

When bgp is using `bgp suppress-fib-pending` and the end
operator is using network statements, bgp was not sending
the network'ed prefix'es to it's peers.  Fix this.

Also update the test cases for bgp_suppress_fib to test
this new corner case( I am sure that there are going to
be others that will need to be added ).

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

2 years agoMerge pull request #12119 from FRRouting/mergify/bp/dev/8.4/pr-12108
Donatas Abraitis [Thu, 13 Oct 2022 07:27:31 +0000 (10:27 +0300)]
Merge pull request #12119 from FRRouting/mergify/bp/dev/8.4/pr-12108

General mayhem (backport #12108)

2 years agozebra: Cleanup memory leaks on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:26:42 +0000 (16:26 -0400)]
zebra: Cleanup memory leaks on shutdown

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

2 years agoripngd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:44 +0000 (16:21 -0400)]
ripngd: Cleanup memory allocations on shutdown

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

2 years agoripd: Cleanup memory allocations on shutdown
Donald Sharp [Tue, 11 Oct 2022 20:21:30 +0000 (16:21 -0400)]
ripd: Cleanup memory allocations on shutdown

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

2 years agozebra: zrouter.mh_info is leaked on shutdown
Donald Sharp [Tue, 11 Oct 2022 19:22:04 +0000 (15:22 -0400)]
zebra: zrouter.mh_info is leaked on shutdown

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

2 years agolib: Free some memory in scripting subsystem at shutdown
Donald Sharp [Tue, 11 Oct 2022 17:21:03 +0000 (13:21 -0400)]
lib: Free some memory in scripting subsystem at shutdown

Pre:
staticd: showing active allocations in memory group libfrr
staticd: memstats:  Scripting                     :     16 * (variably sized)
staticd: memstats:  Hash                          :      2 * (variably sized)
staticd: memstats:  Hash Bucket                   :      8 *         32
staticd: memstats:  Hash Index                    :      1 * (variably sized)
staticd: memstats:  Link List                     :      1 *         40
staticd: memstats:  Link Node                     :      1 *         24
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

Post:
staticd: showing active allocations in memory group libfrr
staticd: showing active allocations in memory group logging subsystem
staticd: memstats:  log file target               :      1 *         88
staticd: showing active allocations in memory group staticd

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

2 years agostaticd: Clean up zclient on shutdown
Donald Sharp [Tue, 11 Oct 2022 16:57:57 +0000 (12:57 -0400)]
staticd: Clean up zclient on shutdown

The zclient data structure was not being cleaned up on shutdown.

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

2 years agoMerge pull request #12101 from FRRouting/mergify/bp/dev/8.4/pr-12087
Donatas Abraitis [Wed, 12 Oct 2022 20:17:24 +0000 (23:17 +0300)]
Merge pull request #12101 from FRRouting/mergify/bp/dev/8.4/pr-12087

bgpd: fix "no match rpki" in route-map (backport #12087)

2 years agoMerge pull request #12110 from FRRouting/mergify/bp/dev/8.4/pr-12105
Donatas Abraitis [Wed, 12 Oct 2022 20:17:01 +0000 (23:17 +0300)]
Merge pull request #12110 from FRRouting/mergify/bp/dev/8.4/pr-12105

tools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py (backport #12105)

2 years agotools: Apply black formatting for frr-reload.py
Donatas Abraitis [Tue, 11 Oct 2022 19:38:30 +0000 (22:38 +0300)]
tools: Apply black formatting for frr-reload.py

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 63f99a91c8371bb5e03d5dc59d4ec0f197aefc90)

2 years agotools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py
Donatas Abraitis [Tue, 11 Oct 2022 19:36:26 +0000 (22:36 +0300)]
tools: Handle sequence numbers for BGP community (large/ext) in frr-reload.py

If we add/modify community/large/ext lists without sequence numbers, and
doing frr-reload.py, then rules with sequence numbers (show running-config
always adds sequence numbers) will be deleted and new ones will be re-added.

This could lead to blackholing for some time.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
(cherry picked from commit 8bcbee1999176a46cd82b80002e4111c2cdd5084)

2 years agobgpd: fix "no match rpki" in route-map
Alexander Chernavin [Mon, 10 Oct 2022 13:17:54 +0000 (13:17 +0000)]
bgpd: fix "no match rpki" in route-map

With this fix, make "no match rpki" in a route-map actually remove the
node in the candidate configuration instead of creating it.

Signed-off-by: Alexander Chernavin <achernavin@netgate.com>
(cherry picked from commit 87c3ed1bf82ae84eae6c9848b4c53de721671401)

2 years agoMerge pull request #12092 from FRRouting/mergify/bp/dev/8.4/pr-12084
Donatas Abraitis [Tue, 11 Oct 2022 09:45:09 +0000 (12:45 +0300)]
Merge pull request #12092 from FRRouting/mergify/bp/dev/8.4/pr-12084

bgpd: fix display bgp large-community exact-match (backport #12084)

2 years agobgpd: fix display bgp large-community exact-match
Your Name [Mon, 10 Oct 2022 10:51:27 +0000 (13:51 +0300)]
bgpd: fix display bgp large-community exact-match

Before patch:
frr# show bgp large-community 1:1:1 exact-match
% Large-community malformed

After patch:
frr# show bgp large-community 1:1:1 exact-match

Signed-off-by: Dmitrii Turlupov <dturlupov@factor-ts.ru>
(cherry picked from commit 1857760c1ed38250d6be0d92502f9dc816d4e4cc)

2 years agoMerge pull request #12080 from FRRouting/mergify/bp/dev/8.4/pr-11656
Donatas Abraitis [Sat, 8 Oct 2022 19:20:45 +0000 (22:20 +0300)]
Merge pull request #12080 from FRRouting/mergify/bp/dev/8.4/pr-11656

Some memory (backport #11656)

2 years agoMerge pull request #12067 from FRRouting/mergify/bp/dev/8.4/pr-12060
Donald Sharp [Fri, 7 Oct 2022 19:21:11 +0000 (15:21 -0400)]
Merge pull request #12067 from FRRouting/mergify/bp/dev/8.4/pr-12060

zebra: Allow tunneldump data to work properly on non-supported kernels (backport #12060)

2 years agobgpd: Make sure hdr length is at a minimum of what is expected
Donald Sharp [Thu, 21 Jul 2022 12:11:58 +0000 (08:11 -0400)]
bgpd: Make sure hdr length is at a minimum of what is expected

Ensure that if the capability length specified is enough data.

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

2 years agoisisd: Ensure rcap is freed in error case
Donald Sharp [Wed, 20 Jul 2022 20:49:09 +0000 (16:49 -0400)]
isisd: Ensure rcap is freed in error case

unpack_tlv_router_cap allocates memory that in the error
case is not being freed.

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

2 years agoospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into stack
Donald Sharp [Wed, 20 Jul 2022 20:43:17 +0000 (16:43 -0400)]
ospfclient: Ensure ospf_apiclient_lsa_originate cannot accidently write into stack

Even though OSPF_MAX_LSA_SIZE is quite large and holds the upper bound
on what can be written into a lsa, let's add a small check to ensure
it is not possible to do a bad thing.

This wins one of the long standing bug awards.  2003!

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

2 years agozebra: Allow tunneldump data to work properly on non-supported kernels
Donald Sharp [Tue, 4 Oct 2022 12:51:38 +0000 (08:51 -0400)]
zebra: Allow tunneldump data to work properly on non-supported kernels

When zebra requests tunnel data it is sending a RTM_GETTUNNEL per
interface that is a VXLAN tunnel.  If the kernel that is being
used does not support the particular request type then zebra
will get a error message per tunnel request back.  Unfortunately
netlink_parse_info *stops* reading on the first error message.
Therefor one kernels that are returning an error message
let's gather all of those errors.  This will allow things
like route reads to actually work properly

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

2 years agoMerge pull request #12065 from FRRouting/mergify/bp/dev/8.4/pr-11838
Donatas Abraitis [Thu, 6 Oct 2022 09:19:43 +0000 (12:19 +0300)]
Merge pull request #12065 from FRRouting/mergify/bp/dev/8.4/pr-11838

bgpd: BGP does not update next-hop when global V6 address is configured (backport #11838)