Commit Graph

32667 Commits

Author SHA1 Message Date
anlan_cs
5581a7fc08 zebra: adjust one debug info
Adjust one debug info, separate the ip address from it. Just like it is processed
in `redistribute_update()`.

Before:
```
34:1375.75.75.75/32: Redist del: re 0x55c1112067e0 (0:static), new re 0x55c1112de7c0 (0:static)
```

After:
```
(34:13):75.75.75.75/32: Redist del: re 0x55c1112067e0 (0:static), new re 0x55c1112de7c0 (0:static)
```

Signed-off-by: anlan_cs <vic.lan@pica8.com>
2023-07-11 13:36:09 +08:00
xzheng
c46a231a8d doc: fix the error path
fix the error path.

Signed-off-by: xzheng <zhengxiang311019@163.com>
2023-07-11 09:45:35 +08:00
Mark Stapp
6bbf00fc45 isisd: replace gmtime with gmtime_r
No gmtime() allowed - use gmtime_r()

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-10 17:06:17 -04:00
Mark Stapp
bf465adc57 tests: add route-install test using NHRP tunnel
Add a test-case to the NHRP test that installs routes over the
NHRP tunnel endpoint routes. This confirms that zebra will use
NHRP routes when validating incoming routes from other daemons
(sharpd in this test).

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-10 16:43:53 -04:00
Mark Stapp
89ff272d38 sharpd: allow sharpd to install non-recursive routes
Add a config option so that sharpd can install routes without
the ALLOW_RECURSION flag, matching IGP behavior.
The default remains 'recursion'.

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-10 16:43:53 -04:00
Mark Stapp
bb58cad150 zebra: use NHRP routes as valid in nexthop check
Treat NHRP-installed routes as valid, as if they were
CONNECTED routes, when checking candidate routes'
nexthops for validity. This allows use of NHRP by an
IGP, for example, that doesn't normally want recursive
nexthop resolution.

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-10 16:43:53 -04:00
Mark Stapp
281e7685c1 nhrpd: clean up locals in route zapi api
Clean up use of a nexthop pointer - seemed inconsistent.

Signed-off-by: Mark Stapp <mjs@labn.net>
2023-07-10 16:43:53 -04:00
Donatas Abraitis
4bd04364ad zebra: Guard printing an error by checking if VRF is not NULL
Check if vrf_lookup_by_id() didn't return a NULL before dereferencing in
flor_err().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-10 22:37:35 +03:00
Donatas Abraitis
f5fee8dd54 zebra: Check if ifp is not NULL in zebra_if_update_ctx()
Use the same logic as zebra_if_netconf_update_ctx().

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-10 22:37:33 +03:00
Donatas Abraitis
803375ac69 zebra: Do not check ifp for NULL
It's already checked at the bottom of the function.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-10 22:36:59 +03:00
Donald Sharp
3bde2e3d33 bgpd: Fix table manager to use the synchronous client
bgp_zebra_tm_connect calls bgp_zebra_get_table_range which
just used the global zclient.  Which of course still had
us exposing the global zclient to read and drop important
data from zebra.  This fixes commit 787c61e03c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 10:48:43 -04:00
Donald Sharp
1e0b6a601e bgpd: Fix table manager to use the synchronous client
bgp_zebra_tm_connect calls bgp_zebra_get_table_range which
just used the global zclient.  Which of course still had
us exposing the global zclient to read and drop important
data from zebra.  This fixes commit 787c61e03c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 10:47:17 -04:00
David Schweizer
59640b7223
tests: fix BGP delayopen timer expiration test
The changes allow the test to correctly pass in case the connection
between two peers is be established in less than 0.5 seconds after the
delayopen timer expires.

Signed-off-by: David Schweizer <dschweizer@opensourcerouting.org>
2023-07-10 15:46:05 +02:00
Donald Sharp
f4c29914b5 zebra: Lookup up nlsock * one time in call tree
Code is looking up the nlsock to generate the batch messages
and then looking it up again to get the response.  Let's
just look it up one time.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
162b61ec16 tests: bgp_flowspec expand timings
Attempt to set the hold time in the bgp flowspec exabgp
config.  In addition it was noticed that upstream bgp_flowspec
tests are still not negotiating peering within the time frame
specified.  This is because the first tcp packet is missed
and no keepalive/hold time are negotiated and exabgp will
not attempt a reconnect for quite some time.  Make this
test slower when things go south.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
377e92bc89 tests: Fix wrong config line in bgp_l3vpn_to_bgp_vrf
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
f5c44adb73 tests: isis_tilfa_topo1 fails sometimes due to insufficient time
The isis_tilfa_topo1 test is failing because insufficient time was
given for isis to converge on the system under system load.  Extend
the time and decrease the hello-interval timers to give it more
of a chance to converge.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
ce51339205 tests: bgp_vpnv4_per_nexthop_label is failing
The test is failing because it assumes a json key
is always present when it is not.  Test for it
before having the test fail.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
481c540d28 tests: zebra_rib route-map run times fixup
I have a local test run where the sharp route-map usage
was being checked for 5 seconds.  I saw usages going up
for each 1 second check and the 5th one was at 497 out
of 500.  Looks like the system was really loaded.  Let's
give it more time to coalesce under heavy load.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
9b38d8fec9 tests: Do not remove core files
Tests are removing core files and we are missing some
of them because of this.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
a8510639ad tests: If a core file is generated fail the test
If a .dmp file is found in the test log directories
fail the test.

Issue: #13788
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
caa278d0c7 tests: Look for zlog_backtrace in ci system
There are parts of our daemons that upon certain types
of errors that a zlog_backtrace is auto-generated.
It is desirable for this to be caught and have the
test auto-failed.

Issue: #13787
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2023-07-10 09:06:40 -04:00
Donald Sharp
b35dbae2c2
Merge pull request #13962 from opensourcerouting/fix/ignore_tests/lib/test_darr
tests: Ignore test_darr for git
2023-07-10 09:06:29 -04:00
Donatas Abraitis
79563af564 bgpd: Get 1 or 2 octets for Sub-TLV length (Tunnel Encap attr)
The total number of octets of the Sub-TLV Value field. The Sub-TLV Length field
contains 1 octet if the Sub-TLV Type field contains a value in the range from
0-127. The Sub-TLV Length field contains two octets if the Sub-TLV Type field
contains a value in the range from 128-255.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-10 16:05:18 +03:00
Sarita Patra
752c568226 pimd, pim6d: Added pimEnabled field in "show ip pim nexthop json" cli
The cli "show ip pim nexthop json" gives the RPF information.
However it doesn't give PIM enable status on the nexthop interface.

Added pimEnabled field in this clis,
this will tell if PIM is enabled or not on the nexthop interface.

Example:

frr# show ip pim nexthop
Number of registered addresses: 1
 Address    Interface  Nexthop
 108.0.0.2  ens224     108.0.0.2

frr# show ip pim nexthop json
{
  "108.0.0.2":{
    "address":"108.0.0.2",
    "nexthops":[
      {
        "interface":"ens224",
        "pimEnabled":true,
        "nexthop":"108.0.0.2"
      }
    ]
  }
}

frr# configure terminal
frr(config)# int ens224
frr(config-if)# no ip pim
frr(config-if)# end

frr# show ip pim nexthop json
{
  "108.0.0.2":{
    "address":"108.0.0.2",
    "nexthops":[
      {
        "interface":"ens224",
        "pimEnabled":false,
        "nexthop":"108.0.0.2"
      }
    ]
  }
}

Signed-off-by: Sarita Patra <saritap@vmware.com>
2023-07-10 05:03:04 -07:00
Philippe Guibert
71b0b0d3b3 zebra: fix mpls config on ifaces created post frr
The mpls configuration does not work when an interface is
created after having applied the frr configuration. The
below scenario illustrates:

> root@dut:~# modprobe mpls
> root@dut:~# zebra &
> [..]
> dut(config)# interface ifacenotcreated
> dut(config-if)# mpls enable
> dut(config-if)# Ctrl-D
> root@dut:~# ip li show ifacenotcreated
> Device "ifacenotcreated" does not exist.
> root@dut:~# ip li add ifacenotcreated type dummy
> 0

Fix this by forcing the mpls flag when the interface is detected.

> root@dut:~# cat /proc/sys/net/mpls/conf/ifacenotcreat/input
> 1

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2023-07-09 21:57:01 +02:00
Chirag Shah
84f543a8a4 tools: fix ospf area stub summary in frr-reload
OSPFv2 no area x stub no-summary only resets
'no-summary' config. From frr-reload if the config
line 'area x stub no-summary' is removed then
it needs to remove completely. Before this change
it took two frr-roload to remove the config which is
inconsistent behavior.
Fix is to frr-reload to add extra line to delete
'no area x stub'.

Ticket:#3514775
Testing Done:

Running config:

router ospf
 ospf router-id 6.6.6.6
 area 0.0.0.1 stub no-summary
 area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
 area 0.0.1.1 range 24.1.1.0/24
 area 0.0.1.2 stub no-summary
exit

changed frr.conf:
router ospf
 ospf router-id 6.6.6.6
 area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
 area 0.0.1.1 range 24.1.1.0/24
exit

Lines To Delete
===============
router ospf
 no area 0.0.0.1 stub  <<<< newly added
router ospf vrf sym_1
 no area 0.0.1.2 stub  <<<< newly added
router ospf
 no area 0.0.0.1 stub no-summary
router ospf vrf sym_1
 no area 0.0.1.2 stub no-summary

After fix new running-config post reload:
i
router ospf
 ospf router-id 6.6.6.6
 area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
 area 0.0.1.1 range 24.1.1.0/24
exit

Before fix running-config post 1st reload:

router ospf
 ospf router-id 6.6.6.6
 area 0.0.0.1 stub
 area 0.0.0.2 stub
exit
!
router ospf vrf sym_1
 area 0.0.1.1 range 24.1.1.0/24
 area 0.0.1.2 stub
exit

Signed-off-by: Chirag Shah <chirag@nvidia.com>
2023-07-09 11:53:22 -07:00
Donatas Abraitis
bea517b669 tests: Ignore test_darr for git
This file is generated after `make check`.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-08 22:41:34 +03:00
Chirag Shah
bad029e92d bgpd: fix evpn zclient_send_message return code
In scaled EVPN route sync from bgp to zebra, return
code can be ZCLIENT_SEND_BUFFERED which was treated
as error and leads to route install/uninstall failure.

Following error logs were seen:
2023-07-07T17:05:59.640899+03:00 vtep12 bgpd[15305]: [WYBZ0-MM8F1][EC
33554471] 0: Failed to uninstall EVPN IMET route in VNI 478
2023-07-07T17:05:59.640913+03:00 vtep12 bgpd[15305]: [Y5VKN-9BV7H][EC
33554471] default (0): Failed to uninstall EVPN [3]:[0]:[32]:[27.0.0.5]
route from VNI 465 IP table
2023-07-07T17:05:59.640927+03:00 vtep12 bgpd[15305]: [WYBZ0-MM8F1][EC
33554471] 0: Failed to uninstall EVPN IMET route in VNI 465
2023-07-07T17:05:59.640940+03:00 vtep12 bgpd[15305]: [Y5VKN-9BV7H][EC
33554471] default (0): Failed to uninstall EVPN [3]:[0]:[32]:[27.0.0.5]
route from VNI 173 IP table

Ticket:#3499957
Testing Done:

Before fix:

root@vtep12:mgmt:/home/cumulus# bridge -d -s fdb show | grep  27.0.0.5 |
wc -l
16010

Once source VTEP withdraws, DUT VTEP still has stale entries
root@vtep12:mgmt:~# bridge -d -s fdb show | grep  27.0.0.5 | wc -l
12990

After fix:

Once source VTEP withdraws, DUT VTEP still is able to delete entries
root@vtep12:mgmt:/home/cumulus# bridge -d -s fdb show | grep  27.0.0.5 |
wc -l
0

Zapi stats:

Client: bgp
[32/133]
------------------------
FD: 76
Connect Time: 00:26:17
Nexthop Registry Time: 00:26:11
Nexthop Last Update Time: 00:23:31
Client will Not be notified about it's routes status
Last Msg Rx Time: 00:21:33
Last Msg Tx Time: 00:23:31
Last Rcvd Cmd: ZEBRA_REMOTE_MACIP_ADD
Last Sent Cmd: ZEBRA_NEXTHOP_UPDATE

Type        Add         Update      Del
==================================================
IPv4        7           0           1
IPv6        0           0           0
Redist:v4   22          0           0
Redist:v6   0           0           0
VRF         2           0           0
Connected   4170        0           0
Interface   9           0           4
Intf Addr   2166        0           0
BFD peer    0           0           0
NHT v4      2           0           1
NHT v6      4           0           0
VxLAN SG    0           0           0
VNI         1010        0           0
L3-VNI      0           0           0
MAC-IP      46010       0           0
ES          2024        0           0
ES-EVI      0           0           0
Errors: 0

Signed-off-by: Chirag Shah <chirag@nvidai.com>
2023-07-07 18:55:04 -07:00
Donatas Abraitis
c76f6146ab bgpd: Deprecate Prestandard Outbound Route Filtering capability
https://www.rfc-editor.org/rfc/rfc8810.html

Not relevant anymore. Use RFC'd version of ORF.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 23:41:43 +03:00
Donatas Abraitis
29196a6a5f bgpd: Check if cluster list attribute is not received via eBGP session
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 23:02:18 +03:00
Donatas Abraitis
c1ccfa977a bgpd: Check if originator-id attribute is not received via eBGP session
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 23:01:13 +03:00
Mark Stapp
f5b8a4e188
Merge pull request #13949 from opensourcerouting/fix/bgpd_deprecations
bgpd: rfc8810 deprecations
2023-07-07 15:25:31 -04:00
Mark Stapp
2332ca1d1b
Merge pull request #13757 from cscarpitta/bugfix/fix-fpm-read-crash
zebra: Fix crash when `dplane_fpm_nl` fails to process received routes
2023-07-07 12:15:31 -04:00
Donatas Abraitis
04dfcb14ff bgpd: Deprecate Prestandard Route Refresh capability (128)
More details: https://www.rfc-editor.org/rfc/rfc8810.html

Not sure if we want to maintain the old code more.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 16:19:54 +03:00
Donatas Abraitis
e3ba70e8df bgpd: Drop deprecated capability (dynamic 66)
Already deprecated since two decades.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 16:13:07 +03:00
Carmine Scarpitta
7f2dec4f09 zebra: Fix crash when dplane_fpm_nl fails to process received routes
When `dplane_fpm_nl` receives a route, it allocates memory for a dplane
context and calls `netlink_route_change_read_unicast_internal` without
initializing the `intf_extra_list` contained in the dplane context. If
`netlink_route_change_read_unicast_internal` is not able to process the
route, we call `dplane_ctx_fini` to free the dplane context. This causes
a crash because `dplane_ctx_fini` attempts to access the intf_extra_list
which is not initialized.

To solve this issue, we can call `dplane_ctx_route_init`to initialize
the dplane route context properly, just after the dplane context
allocation.

(gdb) bt
#0 0x0000555dd5ceae80 in dplane_intf_extra_list_pop (h=0x7fae1c007e68) at ../zebra/zebra_dplane.c:427
#1 dplane_ctx_free_internal (ctx=0x7fae1c0074b0) at ../zebra/zebra_dplane.c:724
#2 0x0000555dd5cebc99 in dplane_ctx_free (pctx=0x7fae2aa88c98) at ../zebra/zebra_dplane.c:869
#3 dplane_ctx_free (pctx=0x7fae2aa88c98, pctx@entry=0x7fae2aa78c28) at ../zebra/zebra_dplane.c:855
#4 dplane_ctx_fini (pctx=pctx@entry=0x7fae2aa88c98) at ../zebra/zebra_dplane.c:890
#5 0x00007fae31e93f29 in fpm_read (t=) at ../zebra/dplane_fpm_nl.c:605
#6 0x00007fae325191dd in thread_call (thread=thread@entry=0x7fae2aa98da0) at ../lib/thread.c:2006
#7 0x00007fae324c42b8 in fpt_run (arg=0x555dd74777c0) at ../lib/frr_pthread.c:309
#8 0x00007fae32405ea7 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
#9 0x00007fae32325a2f in clone () from /lib/x86_64-linux-gnu/libc.so.6

Fixes: #13754
Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-07-07 10:59:28 +02:00
Carmine Scarpitta
745a0fcbb2 zebra: Abstract dplane_ctx_route_init to init route without copying
The function `dplane_ctx_route_init` initializes a dplane route context
from the route object passed as an argument. Let's abstract this
function to allow initializing the dplane route context without actually
copying a route object.

This allows us to use this function for initializing a dplane route
context when we don't have any route to copy in it.

Signed-off-by: Carmine Scarpitta <carmine.scarpitta@uniroma2.it>
2023-07-07 10:59:28 +02:00
ryndia
f0d1ea8fb6 ospf: fix lsa leak
In the function ospf_lsa_translated_nssa_new the newly created lsa is lock however, the return lsa from ospf_lsa_new already has a lock. Therefore removing the addition lock resolve the leak below.

ospf_basic_functionality.test_ospf_nssa#r3.asan.ospfd.5456

=================================================================
==5456==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 640 byte(s) in 5 object(s) allocated from:
    #0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
    #2 0x561a16004f60 in ospf_lsa_new ../ospfd/ospf_lsa.c:186
    #3 0x561a160051a1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:205
    #4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
    #5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
    #6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
    #7 0x561a16011cfb in ospf_translated_nssa_refresh ../ospfd/ospf_lsa.c:2152
    #8 0x561a16014bb2 in ospf_external_lsa_install ../ospfd/ospf_lsa.c:2871
    #9 0x561a1601596b in ospf_lsa_install ../ospfd/ospf_lsa.c:3076
    #10 0x561a16168b3c in ospf_flood ../ospfd/ospf_flood.c:482
    #11 0x561a160462f8 in ospf_ls_upd ../ospfd/ospf_packet.c:2115
    #12 0x561a1604c66c in ospf_read_helper ../ospfd/ospf_packet.c:3198
    #13 0x561a1604c88e in ospf_read ../ospfd/ospf_packet.c:3229
    #14 0x7f294efd6c33 in event_call ../lib/event.c:1995
    #15 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
    #16 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
    #17 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Objects leaked above:
0x60c000062800 (128 bytes)
0x60c000062c80 (128 bytes)
0x60c0000631c0 (128 bytes)
0x60c000063700 (128 bytes)
0x60c000063d00 (128 bytes)

Direct leak of 640 byte(s) in 5 object(s) allocated from:
    #0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
    #2 0x561a16004f60 in ospf_lsa_new ../ospfd/ospf_lsa.c:186
    #3 0x561a160051a1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:205
    #4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
    #5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
    #6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
    #7 0x561a16010e10 in ospf_translated_nssa_originate ../ospfd/ospf_lsa.c:2034
    #8 0x561a16136559 in ospf_abr_translate_nssa ../ospfd/ospf_abr.c:668
    #9 0x561a161383da in ospf_abr_process_nssa_translates ../ospfd/ospf_abr.c:968
    #10 0x561a1613f9b8 in ospf_abr_nssa_task ../ospfd/ospf_abr.c:2054
    #11 0x561a161402e5 in ospf_abr_task_timer ../ospfd/ospf_abr.c:2168
    #12 0x7f294efd6c33 in event_call ../lib/event.c:1995
    #13 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
    #14 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
    #15 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Objects leaked above:
0x60c00003e380 (128 bytes)
0x60c00003e740 (128 bytes)
0x60c00003eb00 (128 bytes)
0x60c00005fd40 (128 bytes)
0x60c00005ff80 (128 bytes)

Indirect leak of 180 byte(s) in 5 object(s) allocated from:
    #0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
    #2 0x561a16005a43 in ospf_lsa_data_new ../ospfd/ospf_lsa.c:296
    #3 0x561a160051b1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:206
    #4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
    #5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
    #6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
    #7 0x561a16011cfb in ospf_translated_nssa_refresh ../ospfd/ospf_lsa.c:2152
    #8 0x561a16014bb2 in ospf_external_lsa_install ../ospfd/ospf_lsa.c:2871
    #9 0x561a1601596b in ospf_lsa_install ../ospfd/ospf_lsa.c:3076
    #10 0x561a16168b3c in ospf_flood ../ospfd/ospf_flood.c:482
    #11 0x561a160462f8 in ospf_ls_upd ../ospfd/ospf_packet.c:2115
    #12 0x561a1604c66c in ospf_read_helper ../ospfd/ospf_packet.c:3198
   #13 0x561a1604c88e in ospf_read ../ospfd/ospf_packet.c:3229
    #14 0x7f294efd6c33 in event_call ../lib/event.c:1995
    #15 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
    #16 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
    #17 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Objects leaked above:
0x60400003f890 (36 bytes)
0x60400003f990 (36 bytes)
0x60400003fa50 (36 bytes)
0x60400003fb10 (36 bytes)
0x60400003fbd0 (36 bytes)

Indirect leak of 180 byte(s) in 5 object(s) allocated from:
    #0 0x7f294f354a37 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:154
    #1 0x7f294eeed562 in qcalloc ../lib/memory.c:105
    #2 0x561a16005a43 in ospf_lsa_data_new ../ospfd/ospf_lsa.c:296
    #3 0x561a160051b1 in ospf_lsa_new_and_data ../ospfd/ospf_lsa.c:206
    #4 0x561a1600f21d in ospf_exnl_lsa_prepare_and_flood ../ospfd/ospf_lsa.c:1762
    #5 0x561a1600fd71 in ospf_external_lsa_new ../ospfd/ospf_lsa.c:1863
    #6 0x561a160107d7 in ospf_lsa_translated_nssa_new ../ospfd/ospf_lsa.c:1985
    #7 0x561a16010e10 in ospf_translated_nssa_originate ../ospfd/ospf_lsa.c:2034
    #8 0x561a16136559 in ospf_abr_translate_nssa ../ospfd/ospf_abr.c:668
    #9 0x561a161383da in ospf_abr_process_nssa_translates ../ospfd/ospf_abr.c:968
    #10 0x561a1613f9b8 in ospf_abr_nssa_task ../ospfd/ospf_abr.c:2054
    #11 0x561a161402e5 in ospf_abr_task_timer ../ospfd/ospf_abr.c:2168
    #12 0x7f294efd6c33 in event_call ../lib/event.c:1995
    #13 0x7f294eec134a in frr_run ../lib/libfrr.c:1213
    #14 0x561a15fd3b6d in main ../ospfd/ospf_main.c:249
    #15 0x7f294e998d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Objects leaked above:
0x60400003c6d0 (36 bytes)
0x60400003c790 (36 bytes)
0x60400003c810 (36 bytes)
0x60400003c890 (36 bytes)
0x60400003c910 (36 bytes)

SUMMARY: AddressSanitizer: 1640 byte(s) leaked in 20 allocation(s).
Signed-off-by: ryndia <dindyalsarvesh@gmail.com>
2023-07-07 11:47:30 +04:00
Donatas Abraitis
c10d1c8aca bgpd: Fix show bgp summary wide alignment
Before:

```
r1# show ip bgp summary wide

IPv4 Unicast Summary (VRF default):
BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 725 KiB of memory

Neighbor        V         AS    LocalAS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.1.2     4      65002     65001         8         8        0    0    0 00:00:05            0        0 FRRouting/9.1-dev-MyOwnFRRVersion-gc5fc0beb46

Total number of neighbors 1
r1#
```

After:

```
r1# show ip bgp summary wide

IPv4 Unicast Summary (VRF default):
BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 725 KiB of memory

Neighbor        V         AS    LocalAS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.1.2     4      65002      65001        10        10        0    0    0 00:00:08            0        0 FRRouting/9.1-dev-MyOwnFRRVersion-g4be13ec347

Total number of neighbors 1
r1#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 10:25:30 +03:00
Donatas Abraitis
71c93270f7 bgpd: Show neighbors software version if description is not set
Also, this is visible only if `capability software-version` is enabled.

Example:

```
r1# show ip bgp summary

IPv4 Unicast Summary (VRF default):
BGP router identifier 192.168.1.1, local AS number 65001 vrf-id 0
BGP table version 0
RIB entries 0, using 0 bytes of memory
Peers 1, using 725 KiB of memory

Neighbor        V         AS   MsgRcvd   MsgSent   TblVer  InQ OutQ  Up/Down State/PfxRcd   PfxSnt Desc
192.168.1.2     4      65002        54        54        0    0    0 00:00:52            0        0 FRRouting/9.1-dev-My

Total number of neighbors 1
r1#
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
2023-07-07 10:21:27 +03:00
Donatas Abraitis
700ef0dd20
Merge pull request #13946 from LabNConsulting/chopps/doc-sqlite3-depend
doc sqlite3 depend
2023-07-07 09:53:57 +03:00
Christian Hopps
055f4997b4 doc: document sqlite3 depend and add to docker build
Signed-off-by: Christian Hopps <chopps@labn.net>
2023-07-06 18:08:15 -04:00
Christian Hopps
7ee63796bc build: disable warning for m$ extension use
This is adding a "disable warning" to ccls convenience config.

Signed-off-by: Christian Hopps <chopps@labn.net>
2023-07-06 18:07:47 -04:00
Donald Sharp
30f511e63a
Merge pull request #13925 from Keelan10/bgpd-leak
bgpd: Fix memory leak
2023-07-06 16:24:05 -04:00
Donald Sharp
9f6a5380ea
Merge pull request #13926 from SaiGomathiN/querinterval
pimd,pim6d: Query-interval should be greater than query max response time
2023-07-06 16:22:15 -04:00
Donald Sharp
3b496e9b5d
Merge pull request #13915 from pguibert6WIND/bgp_vpnv6_per_nexthop_better_test
topotests: label per nexthop ipv6 test adds add a while loop for mpls…
2023-07-06 16:21:19 -04:00
Donald Sharp
857566f34a
Merge pull request #13932 from opensourcerouting/redhat-libyang-update
redhat: Change libyang dependency to libyang > 2
2023-07-06 11:21:54 -04:00
Russ White
1e9e82e803
Merge pull request #13396 from donaldsharp/interface_is_interface
move interface ( LINK and ADDR ) events to the dplane
2023-07-06 08:31:16 -04:00
Donatas Abraitis
2ec7477a26
Merge pull request #13808 from anlancs/fix/zebra-kernel-route-reserved
zebra: fix wrong nexthop check for kernel routes
2023-07-06 09:01:21 +03:00