]> git.puffer.fish Git - matthieu/frr.git/log
matthieu/frr.git
15 months agoMerge pull request #15146 from idryzhov/8.0-fix-libyang stable/8.0
Donald Sharp [Tue, 16 Jan 2024 15:35:44 +0000 (10:35 -0500)]
Merge pull request #15146 from idryzhov/8.0-fix-libyang

isisd, staticd, bfdd, ripd, ripngd: need to link directly against libyang

15 months agoisisd, staticd, bfdd, ripd, ripngd: need to link directly against libyang
Igor Ryzhov [Fri, 12 Jan 2024 16:39:55 +0000 (18:39 +0200)]
isisd, staticd, bfdd, ripd, ripngd: need to link directly against libyang

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #10514 from FRRouting/mergify/bp/stable/8.0/pr-10510
Donatas Abraitis [Tue, 8 Feb 2022 06:59:18 +0000 (08:59 +0200)]
Merge pull request #10514 from FRRouting/mergify/bp/stable/8.0/pr-10510

bgpd: Flush temporary attributes after route-map apply (backport #10510)

3 years agobgpd: Print route-map name for filtred outgoing prefixes
Donatas Abraitis [Mon, 7 Feb 2022 10:04:10 +0000 (12:04 +0200)]
bgpd: Print route-map name for filtred outgoing prefixes

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

3 years agobgpd: Flush temporary attributes after route-map apply
Donatas Abraitis [Mon, 7 Feb 2022 08:50:33 +0000 (10:50 +0200)]
bgpd: Flush temporary attributes after route-map apply

Fixes crash:

```
Received signal 6 at 1644222173 (si_addr 0x6f000012d2, PC 0x7f79274cbfb7); aborting...
/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_backtrace_sigsafe+0x6d) [0x7f79282e079d]
/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(zlog_signal+0xf3) [0x7f79282e0993]
/usr/lib/x86_64-linux-gnu/frr/libfrr.so.0(+0xbd881) [0x7f792830b881]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12980) [0x7f7927890980]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0xc7) [0x7f79274cbfb7]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x141) [0x7f79274cd921]
/lib/x86_64-linux-gnu/libc.so.6(+0x89967) [0x7f7927516967]
/lib/x86_64-linux-gnu/libc.so.6(+0x909da) [0x7f792751d9da]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x620) [0x7f7927525050]
/usr/lib/frr/bgpd(+0x1e7c1c) [0x55b5c53b1c1c]
/usr/lib/frr/bgpd(aspath_free+0x28) [0x55b5c53b1c78]
/usr/lib/frr/bgpd(bgp_attr_flush+0x245) [0x55b5c52abc15]
/usr/lib/frr/bgpd(subgroup_announce_check+0x1137) [0x55b5c530c5d7]
```

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

3 years agoMerge pull request #10498 from FRRouting/mergify/bp/stable/8.0/pr-10473
Donatas Abraitis [Sun, 6 Feb 2022 13:15:37 +0000 (15:15 +0200)]
Merge pull request #10498 from FRRouting/mergify/bp/stable/8.0/pr-10473

ospfd: Core in ospf_if_down during shutdown. (backport #10473)

3 years agoospfd: Core in ospf_if_down during shutdown.
Tomi Salminen [Wed, 2 Feb 2022 09:19:09 +0000 (11:19 +0200)]
ospfd: Core in ospf_if_down during shutdown.

Skip marking routes as changed in ospf_if_down if there's now
new_table present, which might be the case when the instance is
being finished

The backtrace for the core was:

  raise (sig=sig@entry=11) at ../sysdeps/unix/sysv/linux/raise.c:50
  core_handler (signo=11, siginfo=0x7fffffffe170, context=<optimized out>) at lib/sigevent.c:262
  <signal handler called>
  route_top (table=0x0) at lib/table.c:401
  ospf_if_down (oi=oi@entry=0x555555999090) at ospfd/ospf_interface.c:849
  ospf_if_free (oi=0x555555999090) at ospfd/ospf_interface.c:339
  ospf_finish_final (ospf=0x55555599c830) at ospfd/ospfd.c:749
  ospf_deferred_shutdown_finish (ospf=0x55555599c830) at ospfd/ospfd.c:578
  ospf_deferred_shutdown_check (ospf=<optimized out>) at ospfd/ospfd.c:627
  ospf_finish (ospf=<optimized out>) at ospfd/ospfd.c:683
  ospf_terminate () at ospfd/ospfd.c:653
  sigint () at ospfd/ospf_main.c:109
  quagga_sigevent_process () at lib/sigevent.c:130
  thread_fetch (m=m@entry=0x5555556e45e0, fetch=fetch@entry=0x7fffffffe9b0) at lib/thread.c:1709
  frr_run (master=0x5555556e45e0) at lib/libfrr.c:1174
  main (argc=9, argv=0x7fffffffecb8) at ospfd/ospf_main.c:254

Signed-off-by: Tomi Salminen <tsalminen@forcepoint.com>
(cherry picked from commit d4e66f14854d1cc5bdb8b8209613fd596f8c1775)

3 years agoMerge pull request #10378 from FRRouting/mergify/bp/stable/8.0/pr-10360
Donald Sharp [Thu, 20 Jan 2022 00:17:44 +0000 (19:17 -0500)]
Merge pull request #10378 from FRRouting/mergify/bp/stable/8.0/pr-10360

lib/clippy: don't endian-convert twice (backport #10360)

3 years agolib/clippy: don't endian-convert twice
David Lamparter [Tue, 18 Jan 2022 08:50:25 +0000 (09:50 +0100)]
lib/clippy: don't endian-convert twice

elf_getdata_rawchunk() already endian-converts; doing it again is, uh,
counterproductive.

Fixes: #10051
Reported-by: Lucian Cristian <lucian.cristian@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit cfc45e911e21820bc8b703b37e947a6a7e5d798a)

3 years agoMerge pull request #10252 from FRRouting/mergify/bp/stable/8.0/pr-10228
Donatas Abraitis [Wed, 22 Dec 2021 07:50:23 +0000 (09:50 +0200)]
Merge pull request #10252 from FRRouting/mergify/bp/stable/8.0/pr-10228

bgpd: fix aggregate route AS Path attribute (backport #10228)

3 years agobgpd: fix aggregate route AS Path attribute
Rafael Zalamena [Mon, 13 Dec 2021 20:21:56 +0000 (17:21 -0300)]
bgpd: fix aggregate route AS Path attribute

Always free the locally allocated attribute not the one we are using for
return. This fixes a memory leak and a crash when AS Path is set with
route-map.

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

3 years agoMerge pull request #10232 from FRRouting/mergify/bp/stable/8.0/pr-10213
Donatas Abraitis [Mon, 20 Dec 2021 13:16:47 +0000 (15:16 +0200)]
Merge pull request #10232 from FRRouting/mergify/bp/stable/8.0/pr-10213

isisd: fix use after free (backport #10213)

3 years agoisisd: fix use after free
Igor Ryzhov [Tue, 14 Dec 2021 13:28:08 +0000 (16:28 +0300)]
isisd: fix use after free

Pointers to the adjacency must be cleared only when the adjacency is
deleted. Otherwise, when the ISIS router is deleted later, the adjacency
is not deleted and a crash happens because of UAF.

Fixes #10209.

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

3 years agoMerge pull request #10218 from FRRouting/mergify/bp/stable/8.0/pr-10214
Donatas Abraitis [Wed, 15 Dec 2021 20:50:13 +0000 (22:50 +0200)]
Merge pull request #10218 from FRRouting/mergify/bp/stable/8.0/pr-10214

bgpd: fix BGP ORF Prefix-length matching (backport #10214)

3 years agobgpd: fix BGP ORF Prefix-length matching
Martin Winter [Tue, 14 Dec 2021 13:53:53 +0000 (14:53 +0100)]
bgpd: fix BGP ORF Prefix-length matching

BGP ORF Prefix list incorrectly rejected list with a GE or LE to match the actual
prefix.

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

3 years agoMerge pull request #10188 from FRRouting/mergify/bp/stable/8.0/pr-10120
Donatas Abraitis [Thu, 9 Dec 2021 21:18:54 +0000 (23:18 +0200)]
Merge pull request #10188 from FRRouting/mergify/bp/stable/8.0/pr-10120

bfdd: fix detection timeout update (backport #10120)

3 years agobfdd: fix detection timeout update
Igor Ryzhov [Wed, 24 Nov 2021 12:01:41 +0000 (15:01 +0300)]
bfdd: fix detection timeout update

Per RFC 5880 section 6.8.12, the use of a Poll Sequence is not necessary
when the Detect Multiplier is changed. Currently, we update the Detection
Timeout only when a Poll Sequence is terminated, therefore we ignore the
Detect Multiplier change if it's not accompanied with RX/TX timer change.
To fix the problem, we should update the Detection Timeout on every
received packet.

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

3 years agoMerge pull request #10185 from FRRouting/mergify/bp/stable/8.0/pr-10144
Igor Ryzhov [Tue, 7 Dec 2021 10:48:51 +0000 (13:48 +0300)]
Merge pull request #10185 from FRRouting/mergify/bp/stable/8.0/pr-10144

bgpd: Handle Delete status when peers flapping for BMP (backport #10144)

3 years agobgpd: Handle Delete status when peers flapping for BMP
Donatas Abraitis [Mon, 29 Nov 2021 15:35:54 +0000 (17:35 +0200)]
bgpd: Handle Delete status when peers flapping for BMP

Memory leak when doing quickly: clear ip bgp * or [no] neighbor X shutdown.

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

3 years agoMerge pull request #10141 from FRRouting/mergify/bp/stable/8.0/pr-10137
Donatas Abraitis [Tue, 30 Nov 2021 06:21:25 +0000 (08:21 +0200)]
Merge pull request #10141 from FRRouting/mergify/bp/stable/8.0/pr-10137

vtysh: add missing rpki node when showing config (backport #10137)

3 years agovtysh: add missing rpki node when showing config
Igor Ryzhov [Sun, 28 Nov 2021 18:55:06 +0000 (21:55 +0300)]
vtysh: add missing rpki node when showing config

Before:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
service integrated-vtysh-config
!
```

After:
```
frr version 8.2-dev
frr defaults traditional
hostname frr
service integrated-vtysh-config
!
rpki
 rpki polling_period 20
 rpki cache 192.0.2.1 8080 preference 1
exit
!
```

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

3 years agoMerge pull request #10109 from FRRouting/mergify/bp/stable/8.0/pr-10057
Donald Sharp [Wed, 24 Nov 2021 00:52:41 +0000 (19:52 -0500)]
Merge pull request #10109 from FRRouting/mergify/bp/stable/8.0/pr-10057

bgpd: Do not send LLA for route-server-client peers (backport #10057)

3 years agobgpd: Do not send LLA for route-server-client peers
Donatas Abraitis [Mon, 15 Nov 2021 06:51:26 +0000 (08:51 +0200)]
bgpd: Do not send LLA for route-server-client peers

We should send only 16bytes next hop, no need for 32bytes, third party
next hops kinda for LLA does not work here.

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

3 years agoMerge pull request #10065 from FRRouting/mergify/bp/stable/8.0/pr-10047
Donatas Abraitis [Wed, 17 Nov 2021 07:00:11 +0000 (09:00 +0200)]
Merge pull request #10065 from FRRouting/mergify/bp/stable/8.0/pr-10047

bgpd: fix source-address for BFD sessions when using update-source IFNAME (backport #10047)

3 years agobgpd: fix source-address for BFD sessions when using update-source IFNAME
Igor Ryzhov [Fri, 12 Nov 2021 16:32:06 +0000 (19:32 +0300)]
bgpd: fix source-address for BFD sessions when using update-source IFNAME

When "update-source IFNAME" is used for the neighbor, p->update_source
is set to NULL, so we can't use it as a source address and should use
the address from p->su_local.

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

3 years agoMerge pull request #10053 from FRRouting/mergify/bp/stable/8.0/pr-10049
Igor Ryzhov [Mon, 15 Nov 2021 14:39:12 +0000 (17:39 +0300)]
Merge pull request #10053 from FRRouting/mergify/bp/stable/8.0/pr-10049

doc: update & clarify language in process arch doc (backport #10049)

3 years agodoc: update & clarify language in process arch doc
Quentin Young [Fri, 12 Nov 2021 19:45:36 +0000 (14:45 -0500)]
doc: update & clarify language in process arch doc

There was a historical blurb at the top of the process architecture
document that in several instances caused some confusion regarding
whether or not FRR supports multithreading. Remove this paragraph and
replace it with a summary of the page contents.

Signed-off-by: Quentin Young <qlyoung@nvidia.com>
(cherry picked from commit ad2af6ed1cb13ad1556f84b309066de33b64f7a1)

3 years agoMerge pull request #10037 from FRRouting/mergify/bp/stable/8.0/pr-10035
Igor Ryzhov [Fri, 12 Nov 2021 14:57:40 +0000 (17:57 +0300)]
Merge pull request #10037 from FRRouting/mergify/bp/stable/8.0/pr-10035

ospfd: Prevent use after free on shutdown (backport #10035)

3 years agoospfd: Prevent use after free on shutdown
Donald Sharp [Thu, 11 Nov 2021 18:25:35 +0000 (13:25 -0500)]
ospfd: Prevent use after free on shutdown

Running ospf_topo_vrf1 leads us to this valgrind issue:

==2386518== Invalid read of size 8
==2386518==    at 0x4971520: route_top (table.c:401)
==2386518==    by 0x181F08: ospf_interface_bfd_apply (ospf_bfd.c:126)
==2386518==    by 0x182069: ospf_interface_disable_bfd (ospf_bfd.c:158)
==2386518==    by 0x18BF51: ospf_del_if_params (ospf_interface.c:557)
==2386518==    by 0x18C584: ospf_if_delete_hook (ospf_interface.c:712)
==2386518==    by 0x490CA0B: hook_call_if_del (if.c:61)
==2386518==    by 0x490D1F3: if_delete_retain (if.c:286)
==2386518==    by 0x490D337: if_delete (if.c:309)
==2386518==    by 0x490CDED: if_destroy_via_zapi (if.c:200)
==2386518==    by 0x49940A9: zclient_interface_delete (zclient.c:2237)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==  Address 0x5df39a0 is 0 bytes inside a block of size 56 free'd
==2386518==    at 0x48399AB: free (vg_replace_malloc.c:538)
==2386518==    by 0x492A03E: qfree (memory.c:141)
==2386518==    by 0x4970C6F: route_table_free (table.c:141)
==2386518==    by 0x4970A36: route_table_finish (table.c:61)
==2386518==    by 0x18C543: ospf_if_delete_hook (ospf_interface.c:708)
==2386518==    by 0x490CA0B: hook_call_if_del (if.c:61)
==2386518==    by 0x490D1F3: if_delete_retain (if.c:286)
==2386518==    by 0x490D337: if_delete (if.c:309)
==2386518==    by 0x490CDED: if_destroy_via_zapi (if.c:200)
==2386518==    by 0x49940A9: zclient_interface_delete (zclient.c:2237)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==  Block was alloc'd at
==2386518==    at 0x483AB65: calloc (vg_replace_malloc.c:760)
==2386518==    by 0x4929EFC: qcalloc (memory.c:116)
==2386518==    by 0x49709F8: route_table_init_with_delegate (table.c:53)
==2386518==    by 0x49717F4: route_table_init (table.c:528)
==2386518==    by 0x18C328: ospf_if_new_hook (ospf_interface.c:659)
==2386518==    by 0x490C97D: hook_call_if_add (if.c:60)
==2386518==    by 0x490CE85: if_create_name (if.c:223)
==2386518==    by 0x490DF32: if_get_by_name (if.c:622)
==2386518==    by 0x4993F73: zclient_interface_add (zclient.c:2186)
==2386518==    by 0x4998062: zclient_read (zclient.c:3969)
==2386518==    by 0x4979529: thread_call (thread.c:1908)
==2386518==    by 0x4919918: frr_run (libfrr.c:1164)
==2386518==    by 0x181AC7: main (ospf_main.c:235)
==2386518==

Fix the ordering to do the individual node tree cleanup after we delete
the data we care about.

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

3 years agoMerge pull request #10004 from FRRouting/mergify/bp/stable/8.0/pr-9984
Igor Ryzhov [Tue, 9 Nov 2021 11:01:33 +0000 (14:01 +0300)]
Merge pull request #10004 from FRRouting/mergify/bp/stable/8.0/pr-9984

bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all` (backport #9984)

3 years agobgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view detail`
Donatas Abraitis [Sat, 6 Nov 2021 13:54:20 +0000 (15:54 +0200)]
bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view detail`

AFI/SAFI is handled in bgp_vty_find_and_parse_afi_safi_bgp() properly for
IPv4, but not for IPv6. Let's have it enabled for IPv6 by default.

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

3 years agobgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all`
Donatas Abraitis [Sat, 6 Nov 2021 13:50:56 +0000 (15:50 +0200)]
bgpd: Set afi by default to AFI_IP6 for `show bgp vrf/view all`

AFI/SAFI is handled in bgp_vty_find_and_parse_afi_safi_bgp() properly for
IPv4, but not for IPv6. Let's have it enabled for IPv6 by default.

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

3 years agoMerge pull request #9993 from FRRouting/mergify/bp/stable/8.0/pr-9954
Donald Sharp [Sun, 7 Nov 2021 16:00:49 +0000 (11:00 -0500)]
Merge pull request #9993 from FRRouting/mergify/bp/stable/8.0/pr-9954

zebra: Send up ifindex for redistribution when appropriate (backport #9954)

3 years agozebra: Send up ifindex for redistribution when appropriate
Donald Sharp [Thu, 4 Nov 2021 12:01:14 +0000 (08:01 -0400)]
zebra: Send up ifindex for redistribution when appropriate

Currently the NEXTHOP_TYPE_IPV4 and NEXTHOP_TYPE_IPV6 are
not sending up the resolved ifindex for the route.  This
is causing upper level protocols that have something like
this:

route-map FOO permit 10
  match interface swp13
!

router ospf
   redistribute static
!

ip route 4.5.6.7/32 10.10.10.10

where 10.10.10.10 resolves to interface swp13.  The route-map
will never match in this case.

Since FRR has the resolved nexthop interface, FRR might as
well send it up to be selected on by the upper level protocol
as needed.

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

3 years agoMerge pull request #9989 from FRRouting/mergify/bp/stable/8.0/pr-9972
Donald Sharp [Sat, 6 Nov 2021 20:49:13 +0000 (16:49 -0400)]
Merge pull request #9989 from FRRouting/mergify/bp/stable/8.0/pr-9972

bfdd,bgpd: fix some integration bugs (backport #9972)

3 years agobgpd: update BFD config on update-source change
Rafael Zalamena [Wed, 3 Nov 2021 11:43:17 +0000 (08:43 -0300)]
bgpd: update BFD config on update-source change

Update BFD sessions when the update-source configuration is set so the
session follows the new configured source address.

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

3 years agobgpd: fix BFD configuration update on TTL change
Rafael Zalamena [Tue, 2 Nov 2021 21:54:23 +0000 (18:54 -0300)]
bgpd: fix BFD configuration update on TTL change

When altering the TTL of a eBGP peer also update the BFD
configuration. This was only working when the configuration happened
after the peer connection had been established.

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

3 years agolib: constify read only parameters
Rafael Zalamena [Wed, 3 Nov 2021 11:45:02 +0000 (08:45 -0300)]
lib: constify read only parameters

Constify some BFD library function parameters to signalize they are
not going to get modified.

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

3 years agolib: fix BFD IPv6 session address change
Renato Westphal [Thu, 28 Oct 2021 15:35:56 +0000 (12:35 -0300)]
lib: fix BFD IPv6 session address change

Pass the correct family type and remove unneeded casts.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
(cherry picked from commit ae0945733333f60fccb0b4ac170ca3ee7351828b)

3 years agoMerge pull request #9986 from FRRouting/mergify/bp/stable/8.0/pr-9978
Igor Ryzhov [Sat, 6 Nov 2021 14:12:53 +0000 (17:12 +0300)]
Merge pull request #9986 from FRRouting/mergify/bp/stable/8.0/pr-9978

doc: Drop misleading explanation about `neighbor X interface IFNAME` (backport #9978)

3 years agodoc: Drop misleading explanation about `neighbor X interface IFNAME`
Donatas Abraitis [Fri, 5 Nov 2021 20:59:52 +0000 (22:59 +0200)]
doc: Drop misleading explanation about `neighbor X interface IFNAME`

This command is not deprecated.

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

3 years agoMerge pull request #9903 from FRRouting/mergify/bp/stable/8.0/pr-9791
Donatas Abraitis [Wed, 27 Oct 2021 04:20:55 +0000 (07:20 +0300)]
Merge pull request #9903 from FRRouting/mergify/bp/stable/8.0/pr-9791

3 years agoMerge pull request #9853 from FRRouting/mergify/bp/stable/8.0/pr-9845
Donald Sharp [Tue, 26 Oct 2021 15:43:57 +0000 (11:43 -0400)]
Merge pull request #9853 from FRRouting/mergify/bp/stable/8.0/pr-9845

[8.0] ospfd: fix crash when creating vlink in unknown vrf (backport #9845)

3 years agobgpd: remove bogus check
Rafael Zalamena [Mon, 11 Oct 2021 21:29:54 +0000 (18:29 -0300)]
bgpd: remove bogus check

`bgp` pointer always exists and is used before this function call.

Calling `free` in `json` in this context will also cause a
use-after-free crash.

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

3 years agobgpd: fix json object handling
Martin Winter [Fri, 8 Oct 2021 17:19:53 +0000 (19:19 +0200)]
bgpd: fix json object handling

Fix memory leaks when quitting early and double free when headers are
not set.

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

3 years agoMerge pull request #9892 from FRRouting/mergify/bp/stable/8.0/pr-9876
Igor Ryzhov [Tue, 26 Oct 2021 14:43:37 +0000 (17:43 +0300)]
Merge pull request #9892 from FRRouting/mergify/bp/stable/8.0/pr-9876

bgpd: When issuing `no ... ebgp-multihop` always resets (backport #9876)

3 years agoMerge pull request #9890 from ton31337/feature/backport_800867d85e5fae7d41131c2552dec...
Igor Ryzhov [Tue, 26 Oct 2021 12:13:09 +0000 (15:13 +0300)]
Merge pull request #9890 from ton31337/feature/backport_800867d85e5fae7d41131c2552dec290f2246077_to_8.0

bgpd: [8.0] Reset dynamic peer counter

3 years agobgpd: When issuing `no ... ebgp-multihop` always resets
Donald Sharp [Sun, 24 Oct 2021 19:02:11 +0000 (15:02 -0400)]
bgpd: When issuing `no ... ebgp-multihop` always resets

When removing the command `no neighbor <X> ebgp-multihop <Y>`
the bgp code was always resetting the connection even if
the command would do nothing.

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

3 years agobgpd: Reset dynamic peer counter
Abhishek Naik [Tue, 19 Oct 2021 23:45:26 +0000 (23:45 +0000)]
bgpd: Reset dynamic peer counter

Dynamic peer count is inconsistent in
"show bgp summary json" and "show bgp summary failed json" due to
dynamic peer counter 'dn_count' being reused without resetting

Signed-off-by: Abhishek Naik <bhini@amazon.com>
3 years agoospfd: fix crash when creating vlink in unknown vrf
Igor Ryzhov [Mon, 18 Oct 2021 14:16:35 +0000 (17:16 +0300)]
ospfd: fix crash when creating vlink in unknown vrf

if_create_name crashes when vrf_id is VRF_UNKNOWN:
```
nfware# conf t
nfware(config)# router ospf vrf doesnt-exist
nfware(config-router)# area 1.1.1.1 virtual-link 2.2.2.2
vtysh: error reading from ospfd: Success (0)Warning: closing connection to ospfd because of an I/O error!
```

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

3 years agoMerge pull request #9814 from FRRouting/mergify/bp/stable/8.0/pr-9655
Donald Sharp [Wed, 13 Oct 2021 18:43:50 +0000 (14:43 -0400)]
Merge pull request #9814 from FRRouting/mergify/bp/stable/8.0/pr-9655

Zebra: Ignore the failure of startup intf lookup. (backport #9655)

3 years agoMerge pull request #9793 from FRRouting/mergify/bp/stable/8.0/pr-9789
Donald Sharp [Wed, 13 Oct 2021 14:15:32 +0000 (10:15 -0400)]
Merge pull request #9793 from FRRouting/mergify/bp/stable/8.0/pr-9789

lib: set type for newly created interfaces (backport #9789)

3 years agoMerge pull request #9807 from FRRouting/mergify/bp/stable/8.0/pr-9686
Donald Sharp [Wed, 13 Oct 2021 14:15:14 +0000 (10:15 -0400)]
Merge pull request #9807 from FRRouting/mergify/bp/stable/8.0/pr-9686

zebra: fix buffer overflow (backport #9686)

3 years agoZebra: Ignore the failure of startup intf lookup.
Yuan Yuan [Wed, 22 Sep 2021 20:02:40 +0000 (20:02 +0000)]
Zebra: Ignore the failure of startup intf lookup.

In startup, zebra would dump interface information from Kernel in 3
steps w/o lock: step1, get interface information; step2, get interface
ipv4 address; step3, get interface ipv6 address.
If any interface gets added after step1, but before step2/3, zebra
would get extra interface addresses in step2/3 that has not been added
into zebra in step1. Returning error in the referenced interface lookup
would cause the startup interface retrieval to be incomplete.

Signed-off-by: Yuan Yuan <yyuanam@amazon.com>
(cherry picked from commit 8eec31ef564dcf4e096e700a648570973ca4e96b)

3 years agozebra: fix buffer overflow
Igor Ryzhov [Tue, 28 Sep 2021 12:44:51 +0000 (15:44 +0300)]
zebra: fix buffer overflow

mac is only 6 bytes long and we shouldn't blindly copy unknown number of
bytes into it.

Fixes #9671.

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

3 years agolib: set type for newly created interfaces
Igor Ryzhov [Fri, 8 Oct 2021 21:22:31 +0000 (00:22 +0300)]
lib: set type for newly created interfaces

Currently, the ll_type is set only in `netlink_interface` which is
executed only during startup. If the interface is created when the FRR
is already running, the type is not stored.

Fixes #1164.

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

3 years agoMerge pull request #9748 from FRRouting/mergify/bp/stable/8.0/pr-9743
Donatas Abraitis [Wed, 6 Oct 2021 06:22:11 +0000 (09:22 +0300)]
Merge pull request #9748 from FRRouting/mergify/bp/stable/8.0/pr-9743

bgpd: large community exact match fix (backport #9743)

3 years agobgpd: large community exact match fix
Philippe Guibert [Tue, 5 Oct 2021 14:24:41 +0000 (16:24 +0200)]
bgpd: large community exact match fix

The pointer to large community was not the appropriate one.

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

3 years agoMerge pull request #9713 from idryzhov/8.0-vtysh-walkup
David Lamparter [Mon, 4 Oct 2021 14:56:22 +0000 (16:56 +0200)]
Merge pull request #9713 from idryzhov/8.0-vtysh-walkup

3 years agoMerge pull request #9718 from FRRouting/mergify/bp/stable/8.0/pr-9710
Donatas Abraitis [Mon, 4 Oct 2021 11:31:11 +0000 (14:31 +0300)]
Merge pull request #9718 from FRRouting/mergify/bp/stable/8.0/pr-9710

bgpd: fix access-list update callback (backport #9710)

3 years agoMerge pull request #9717 from FRRouting/mergify/bp/stable/8.0/pr-9701
Igor Ryzhov [Mon, 4 Oct 2021 09:30:19 +0000 (12:30 +0300)]
Merge pull request #9717 from FRRouting/mergify/bp/stable/8.0/pr-9701

bgpd: fix build error seen when lttng is enabled (backport #9701)

3 years agobgpd: fix access-list update callback
Igor Ryzhov [Fri, 1 Oct 2021 09:42:04 +0000 (12:42 +0300)]
bgpd: fix access-list update callback

When a regular access-list is updated, we should update references to
regular access-lists, not as-path access-lists.

Fixes #9707.

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

3 years agobgpd: fix build error seen when lttng is enabled
Anuradha Karuppiah [Thu, 16 Sep 2021 18:46:02 +0000 (11:46 -0700)]
bgpd: fix build error seen when lttng is enabled

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>
(cherry picked from commit e439b73606d54dd6aebc5e194bc326e9e18c97b1)

3 years agovtysh: fix node walkup
Igor Ryzhov [Fri, 1 Oct 2021 14:25:57 +0000 (17:25 +0300)]
vtysh: fix node walkup

The current code executes either "exit" or "end" once - so vtysh switches
either to the parent node or straight to the config node. But sometimes,
we need to exit to the grandparent node, which is not the config node.

Another issue is that some nodes are completely missing in this long
checklist, for example, BFD peer and profile nodes.

Instead of doing all this special checking, we should just always exit
the exact number of times we need - it is stored in "tried" variable.

Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
3 years agoMerge pull request #9678 from FRRouting/mergify/bp/stable/8.0/pr-9675
Donald Sharp [Mon, 27 Sep 2021 19:15:00 +0000 (15:15 -0400)]
Merge pull request #9678 from FRRouting/mergify/bp/stable/8.0/pr-9675

pimd: fix UAF/heap corruption in BSM code (backport #9675)

3 years agopimd: fix UAF/heap corruption in BSM code
David Lamparter [Mon, 27 Sep 2021 08:33:33 +0000 (10:33 +0200)]
pimd: fix UAF/heap corruption in BSM code

This `XFREE()` call is in plainly in the wrong spot.  `rp_all` (the
224.0.0.0/4 entry) isn't supposed to be free'd ever, and the
conditional above makes quite clear that it remains in use.

It may be possible to exploit this as a heap corruption bug, maybe even
as RCE.  I haven't tried; I randomly noticed this while working on the
BSM code.  Luckily this code is only run by the CLI for the clear
command, so the surface is very small.

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

3 years agoMerge pull request #9663 from FRRouting/mergify/bp/stable/8.0/pr-9660
Quentin Young [Fri, 24 Sep 2021 18:14:10 +0000 (14:14 -0400)]
Merge pull request #9663 from FRRouting/mergify/bp/stable/8.0/pr-9660

bgpd: swap bgp error value with file descriptor value (backport #9660)

3 years agobgpd: swap bgp error value with file descriptor value
Philippe Guibert [Thu, 23 Sep 2021 11:57:56 +0000 (13:57 +0200)]
bgpd: swap bgp error value with file descriptor value

the values were swapped by mistake. fix it.

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

3 years agoMerge pull request #9652 from FRRouting/mergify/bp/stable/8.0/pr-9645
Donatas Abraitis [Wed, 22 Sep 2021 11:47:54 +0000 (14:47 +0300)]
Merge pull request #9652 from FRRouting/mergify/bp/stable/8.0/pr-9645

bgpd: make show bgp labeled-unicast work (backport #9645)

3 years agobgpd: make show bgp labeled-unicast work
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
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
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
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
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
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
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.
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
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
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
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
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
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>