Commit Graph

37380 Commits

Author SHA1 Message Date
Francois Dumontet
ee2f1b85cf bgpd: fix crash when polling bgp4v2PathAttrTable
we have

(gdb) p *path->attr->aspath
$1 = {refcnt = 3, segments = 0x0, json = 0x0, str = 0x55723d0b7470 "", str_len = 0, asnotation = ASNOTATION_PLAIN}

It looks like this aspath is empty, resulting in a size 0 and NULL pointer for path->attr->aspath->segments which leads to the SIGSEGV

fixe: return 0 when segments is null.

Signed-off-by: Francois Dumontet <francois.dumontet@6wind.com>
2024-10-25 22:25:35 +02:00
Philippe Guibert
8e861a75e8 isisd: fix change flex-algorithm number from uint32 to uint8
The algorithm number is encoded on 8 bits and does not require
an unsigned 32 bit value to store the value.

Fixes: cc4926c128 ("isisd,yang: add algorithm-prefix-sid configuration tree")

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
2024-10-25 22:17:29 +02:00
Louis Scalbert
e7b3276ace bgpd: fix display of local label in show bgp
Fix the display of the local label in show bgp.

> r1# show bgp ipv4 labeled-unicast 172.16.2.2/32
> BGP routing table entry for 172.16.2.2/32, version 2
> Local label: 16 <---- MISSING
> Paths: (1 available, best #1, table default, vrf (null))
>   Advertised to non peer-group peers:
>  192.168.1.2
>  65501
>    192.168.1.2 from 192.168.1.2 (172.16.2.2)
>      Origin IGP, metric 0, valid, external, best (First path received)
>      Remote label: 3
>      Last update: Fri Oct 25 17:55:45 2024

Fixes: 67f67ba481 ("bgpd: Drop label_ntop/label_pton functions")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 17:56:57 +02:00
Acee Lindem
c735f25abb ospfd: Fix opaque LSA refresh interval and modify LSA cmds.
The configured OSPF refresh interval was not being used for opaque LSA (it always used the constant). Also, modified the timers lsa min-arrival command to have a maximum of 5000 msecs as well as providing a path for backward command compatibility.

Added missing user documentation for both timers lsa min-arrival and timers throttle lsa all.

Signed-off-by: Acee Lindem <acee@lindem.com>
2024-10-25 14:31:10 +00:00
Jafar Al-Gharaibeh
a7e7cc301d tests: expand bsr topotest to cover ipv6
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-25 09:00:50 -05:00
Jafar Al-Gharaibeh
4e74183d0f pimd: allow a bsr with higher priority to take over
Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-25 09:00:50 -05:00
Jafar Al-Gharaibeh
8fbd88c5a7 pimd: allow resolving bsr via directly connected secondary address
This only matters to single hop nodes that are adjacent to the bsr. More common
with IPv6 where LL address is used in PIM as the primary address. If the BSR IP
happens to be an address on the same interface, the receiving pim router
rejects the BSR address because it expects the BSR IP to resolve via the LL address
even if we have a connected route for the same BSR IP subnet. Effectively, we want to
allow rpf to be resolved via secondary IPs with connected routes on the same interface,
and not limit them to primary addresses.

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
2024-10-25 08:59:17 -05:00
Louis Scalbert
a235dbc65b tests: fix bgp_bmp_vrf race condition
The bgp_bmp_vrf topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp_vrf

bgp_bmp_vrf is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
771284474d tests: fix bgp_bmp race condition
The bgp_bmp topotest is randomly failing with similar messages:

> 2024-10-24 16:59:03,037 ERROR: topo: test failed at "bgp_bmp.test_bgp_bmp/test_bmp_bgp_unicast": Checking the updated prefixes has failed ! Generated JSON diff error report:
>
> $->pre-policy->update: expected has key '172.31.0.15/32' which is not present in output

It is particularly unsuccessful when run with valgrind:

> python3 -m pytest -vvss --valgrind-leak-kinds=all --valgrind-extra --valgrind-memleaks bgp_bmp

bgp_bmp is configuring a BMP policy on r1 and then some static BGP
prefixes on r2. If for some reasons, the BGP UPDATE arrives to r1 before
the BMP configuration is operational, the UPDATE is not sent to the BMP
server and the test fails.

Pre-configure the BMP policies at startup to avoid this race condition.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
14eed3ab8b tests: factorize code in bgp_bmp_vrf
Factorize code in bgp_bmp_vrf

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
e29abfdbd5 tests: factorize code in bgp_bmp
Factorize code in bgp_bmp

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:20 +02:00
Louis Scalbert
19a6621424 tests: rework bgp_bmp_vrf
The BGP BMP VRF topotest is difficult to debug. It does not say which
prefix is not received by BGP or BMP when it fails.

Rework the test to convert the actual BMP logs to JSON and compare the
BGP table and BMP server logs output to expected reference JSON files.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:17:17 +02:00
Louis Scalbert
44c6f579c3 tests: rework bgp_bmp
The BGP BMP topotest is difficult to debug. It does not say which prefix
is not received by BGP or BMP when it fails.

Rework the test to convert the actual BMP logs to JSON and compare the
BGP table and BMP server logs output to expected reference JSON files.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 14:16:55 +02:00
Louis Scalbert
a7fc9a27f0 tests: augment bgp bmp test wait time
Augment bgp bmp test wait time

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-25 10:00:56 +02:00
Loïc Sang
3c2949e1ba topotests: supress bgp_vpnv4/6_per_nexthop_label warning
WARNING: topo: Waiting time is too small
(count=10, wait=0.5), using default values (count=20, wait=3)

Supress warning by inscreasing wait time.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
2024-10-25 09:31:12 +02:00
Loïc Sang
6975228d66 bgpd: fix prefix same as nexthop in label per nexthop
When a prefix is imported using the "network" command under a vrf, which
is a connected prefix, and in the context of label allocation per
nexthop:

..
>router bgp 1 vrf vrf1
> address-family ipv4 unicast
>  redistribute static
>  network 172.16.0.1/32  <--- connected network
>  network 192.168.106.0/29
>  label vpn export auto
>  label vpn export allocation-mode per-nexthop
..

We encounter an MPLS entry where the nexthop is the prefix itself:

> 18             BGP   172.16.0.1     -

Actually, when using the "network" command, a bnc context is used, but
it is filled by using the prefix itself instead of the nexthop for other
BGP updates. Consequently, when picking up the original nexthop for
label allocation, the function behaves incorrectly. Instead ensure that
the nexthop type of bnc->nexthop is not a nexthop_ifindex; otherwise
fallback to the per vrf label.

Update topotests.

Signed-off-by: Loïc Sang <loic.sang@6wind.com>
2024-10-25 09:30:32 +02:00
Donatas Abraitis
3f446ecb6b
Merge pull request #17199 from enkechen-panw/aigp-fix5
bgpd: compare aigp after local route check in bgp_path_info_cmp()
2024-10-25 09:59:29 +03:00
Donatas Abraitis
2606f84b31
Merge pull request #17207 from louis-6wind/bmpserver-log
tests: add bmpserver logging
2024-10-25 09:58:57 +03:00
Donatas Abraitis
ba3836c4e6
Merge pull request #17229 from donaldsharp/bgp_update_optimizations
Optimizations and problem fixing for large scale ecmp from bgp
2024-10-25 09:57:07 +03:00
Donatas Abraitis
c5231babcb
Merge pull request #17215 from nabahr/autorp_no_path
pimd: PIM autorp no path RP fix
2024-10-25 09:05:16 +03:00
Donald Sharp
274c98628f
Merge pull request #17155 from opensourcerouting/memstats-zlog
lib: `debug memstats-at-exit` improvements
2024-10-24 21:07:09 -04:00
Donald Sharp
138935a5fd bgpd: Fix wrong pthread event cancelling
0  __pthread_kill_implementation (no_tid=0, signo=6, threadid=130719886083648) at ./nptl/pthread_kill.c:44
1  __pthread_kill_internal (signo=6, threadid=130719886083648) at ./nptl/pthread_kill.c:78
2  __GI___pthread_kill (threadid=130719886083648, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
3  0x000076e399e42476 in __GI_raise (sig=6) at ../sysdeps/posix/raise.c:26
4  0x000076e39a34f950 in core_handler (signo=6, siginfo=0x76e3985fca30, context=0x76e3985fc900) at lib/sigevent.c:258
5  <signal handler called>
6  __pthread_kill_implementation (no_tid=0, signo=6, threadid=130719886083648) at ./nptl/pthread_kill.c:44
7  __pthread_kill_internal (signo=6, threadid=130719886083648) at ./nptl/pthread_kill.c:78
8  __GI___pthread_kill (threadid=130719886083648, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
9  0x000076e399e42476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
10 0x000076e399e287f3 in __GI_abort () at ./stdlib/abort.c:79
11 0x000076e39a39874b in _zlog_assert_failed (xref=0x76e39a46cca0 <_xref.27>, extra=0x0) at lib/zlog.c:789
12 0x000076e39a369dde in cancel_event_helper (m=0x5eda32df5e40, arg=0x5eda33afeed0, flags=1) at lib/event.c:1428
13 0x000076e39a369ef6 in event_cancel_event_ready (m=0x5eda32df5e40, arg=0x5eda33afeed0) at lib/event.c:1470
14 0x00005eda0a94a5b3 in bgp_stop (connection=0x5eda33afeed0) at bgpd/bgp_fsm.c:1355
15 0x00005eda0a94b4ae in bgp_stop_with_notify (connection=0x5eda33afeed0, code=8 '\b', sub_code=0 '\000') at bgpd/bgp_fsm.c:1610
16 0x00005eda0a979498 in bgp_packet_add (connection=0x5eda33afeed0, peer=0x5eda33b11800, s=0x76e3880daf90) at bgpd/bgp_packet.c:152
17 0x00005eda0a97a80f in bgp_keepalive_send (peer=0x5eda33b11800) at bgpd/bgp_packet.c:639
18 0x00005eda0a9511fd in peer_process (hb=0x5eda33c9ab80, arg=0x76e3985ffaf0) at bgpd/bgp_keepalives.c:111
19 0x000076e39a2cd8e6 in hash_iterate (hash=0x76e388000be0, func=0x5eda0a95105e <peer_process>, arg=0x76e3985ffaf0) at lib/hash.c:252
20 0x00005eda0a951679 in bgp_keepalives_start (arg=0x5eda3306af80) at bgpd/bgp_keepalives.c:214
21 0x000076e39a2c9932 in frr_pthread_inner (arg=0x5eda3306af80) at lib/frr_pthread.c:180
22 0x000076e399e94ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
23 0x000076e399f26850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb) f 12
12 0x000076e39a369dde in cancel_event_helper (m=0x5eda32df5e40, arg=0x5eda33afeed0, flags=1) at lib/event.c:1428
1428		assert(m->owner == pthread_self());

In this decode the attempt to cancel the connection's events from
the wrong thread is causing the crash.  Modify the code to create an
event on the bm->master to cancel the events for the connection.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-24 21:01:26 -04:00
Donald Sharp
b097a3188a bgpd: Fix deadlock in bgp_keepalive and master pthreads
(gdb) bt
0  futex_wait (private=0, expected=2, futex_word=0x5c438e9a98d8) at ../sysdeps/nptl/futex-internal.h:146
1  __GI___lll_lock_wait (futex=futex@entry=0x5c438e9a98d8, private=0) at ./nptl/lowlevellock.c:49
2  0x00007af16d698002 in lll_mutex_lock_optimized (mutex=0x5c438e9a98d8) at ./nptl/pthread_mutex_lock.c:48
3  ___pthread_mutex_lock (mutex=0x5c438e9a98d8) at ./nptl/pthread_mutex_lock.c:93
4  0x00005c4369c17e70 in _frr_mtx_lock (mutex=0x5c438e9a98d8, func=0x5c4369dc2750 <__func__.265> "bgp_notify_send_internal") at ./lib/frr_pthread.h:258
5  0x00005c4369c1a07a in bgp_notify_send_internal (connection=0x5c438e9a98c0, code=8 '\b', sub_code=0 '\000', data=0x0, datalen=0, use_curr=true) at bgpd/bgp_packet.c:928
6  0x00005c4369c1a707 in bgp_notify_send (connection=0x5c438e9a98c0, code=8 '\b', sub_code=0 '\000') at bgpd/bgp_packet.c:1069
7  0x00005c4369bea422 in bgp_stop_with_notify (connection=0x5c438e9a98c0, code=8 '\b', sub_code=0 '\000') at bgpd/bgp_fsm.c:1597
8  0x00005c4369c18480 in bgp_packet_add (connection=0x5c438e9a98c0, peer=0x5c438e9b6010, s=0x7af15c06bf70) at bgpd/bgp_packet.c:151
9  0x00005c4369c19816 in bgp_keepalive_send (peer=0x5c438e9b6010) at bgpd/bgp_packet.c:639
10 0x00005c4369bf01fd in peer_process (hb=0x5c438ed05520, arg=0x7af16bdffaf0) at bgpd/bgp_keepalives.c:111
11 0x00007af16dacd8e6 in hash_iterate (hash=0x7af15c000be0, func=0x5c4369bf005e <peer_process>, arg=0x7af16bdffaf0) at lib/hash.c:252
12 0x00005c4369bf0679 in bgp_keepalives_start (arg=0x5c438e0db110) at bgpd/bgp_keepalives.c:214
13 0x00007af16dac9932 in frr_pthread_inner (arg=0x5c438e0db110) at lib/frr_pthread.c:180
14 0x00007af16d694ac3 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
15 0x00007af16d726850 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
(gdb)

The bgp keepalive pthread gets deadlocked with itself and consequently
the bgp master pthread gets locked when it attempts to lock
the peerhash_mtx, since it is also locked by the keepalive_pthread

The keepalive pthread is locking the peerhash_mtx in
bgp_keepalives_start.  Next the connection->io_mtx mutex in
bgp_keepalives_send is locked and then when it notices a problem it invokes
bgp_stop_with_notify which relocks the same mutex ( and of course
the relock causes it to get stuck on itself ).  This generates a
deadlock condition.

Modify the code to only hold the connection->io_mtx as short as
possible.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-24 21:01:26 -04:00
Donald Sharp
e68550b8d8 bgpd: Only grab the confed path count if we are comparing it
This is just a small optimization but when calling path_info_cmp
hundreds of millions of times this adds up.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-24 21:01:26 -04:00
Donald Sharp
ed94fbfe5b bgpd: Store aspath count after aspath has changed
When running bestpath on a very large number of ecmp.
BGP ends up calling aspath_count a very very large number
of times, which results in ~15% cpu runtime in aspath_count_hops.
Modify the aspath to keep track of it's own count.  This results
in the function now taking up ~1.5% of the cpu runtime.  Enough
for the moment to be ignored.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-24 21:01:26 -04:00
Donald Sharp
4954d9d17c bgpd: Do not call evpn_overlay_free no matter what
bgp_update is a very expensive call.  Calling evpn_overlay_free
even when we have no evpn data to free is not trivial.  Let's
limit the call into this function until we actually have data to
free.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-24 18:05:01 -04:00
Enke Chen
6a7049aaac bgpd: compare aigp after local route check in bgp_path_info_cmp()
For consistency between RIB and BGP, the aigp comparison should
be made after the local route check in bgp bestpath selection.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-10-24 10:50:37 -07:00
Enke Chen
1a2c3d684a tests: add a new BGP AIGP topotest
The topotest verifies that a local route is favored irrespective
of its AIGP value.

Signed-off-by: Enke Chen <enchen@paloaltonetworks.com>
2024-10-24 10:42:41 -07:00
Louis Scalbert
c8ed08b22f tests: add bmpserver logging
Add bmpserver logging

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-24 16:37:23 +02:00
Louis Scalbert
ad6c107f91 tests: bmpserver, detect session close immediately
bmpserver infinitely loops after the clients has closed the TCP session.
In this situation, recv() returns empty data.

Detect session close immediately.

Fixes: 875511c466 ("topotests: add basic bmp collector")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-24 16:37:23 +02:00
Louis Scalbert
6bb0c91d10 tests: apply black to bmpserver
Apply black to bmpserver

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-24 16:37:23 +02:00
Donatas Abraitis
be3b97d9ed
Merge pull request #17191 from louis-6wind/fix-bgp-labels
bgpd: fix uninitialized bgp_labels
2024-10-24 17:35:36 +03:00
Nathan Bahr
433fce647c pimd: PIM autorp no path RP fix
Just because there is currently no path to the RP doesn't mean it failed to add.

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
2024-10-23 19:10:47 +00:00
Donatas Abraitis
91e157f3ae
Merge pull request #17162 from louis-6wind/fix-bh-nh-vrf
zebra: fix showing nexthop vrf for ipv6 blackhole
2024-10-23 17:34:44 +03:00
Donatas Abraitis
a6aa6b5880
Merge pull request #17183 from Shbinging/fix_no_area_range_command_2
ospfd:fix the bug that the empty area was not free after no area range command was executed
2024-10-23 12:41:37 +03:00
Louis Scalbert
3225b778ca bgpd: fix uninitialized labels
Fix uninitialized labels that cause multiple valgrind issues.

> ==3729602== Use of uninitialised value of size 8
> ==3729602==    at 0x492B493: hash_get (hash.c:140)
> ==3729602==    by 0x2629D2: bgp_labels_intern (bgp_label.c:98)
> ==3729602==    by 0x2E6C92: bgp_adj_out_set_subgroup (bgp_updgrp_adv.c:622)
> ==3729602==    by 0x2A6810: subgroup_process_announce_selected (bgp_route.c:3340)
> ==3729602==    by 0x2E5FF6: group_announce_route_walkcb (bgp_updgrp_adv.c:260)
> ==3729602==    by 0x2E3E28: update_group_walkcb (bgp_updgrp.c:1759)
> ==3729602==    by 0x492B9A0: hash_walk (hash.c:270)
> ==3729602==    by 0x2E498C: update_group_af_walk (bgp_updgrp.c:2090)
> ==3729602==    by 0x2E7C0D: group_announce_route (bgp_updgrp_adv.c:1119)
> ==3729602==    by 0x2A796E: bgp_process_main_one (bgp_route.c:3865)
> ==3729602==    by 0x2A808A: bgp_process_wq (bgp_route.c:3991)
> ==3729602==    by 0x49CC7CF: work_queue_run (workqueue.c:282)
> ==3729602==    by 0x49BBF25: event_call (event.c:2019)
> ==3729602==    by 0x49413CA: frr_run (libfrr.c:1238)
> ==3729602==    by 0x1FD1D3: main (bgp_main.c:555)

> ==2604268== Use of uninitialised value of size 8
> ==2604268==    at 0x4943016: hash_get (hash.c:159)
> ==2604268==    by 0x26EFC1: bgp_labels_intern (bgp_label.c:97)
> ==2604268==    by 0x28077B: leak_update (bgp_mplsvpn.c:1298)
> ==2604268==    by 0x2824A3: vpn_leak_from_vrf_update (bgp_mplsvpn.c:1932)
> ==2604268==    by 0x2C281C: bgp_static_update (bgp_route.c:6974)
> ==2604268==    by 0x2C366F: bgp_static_set (bgp_route.c:7263)
> ==2604268==    by 0x2C435B: bgp_network_magic (bgp_route.c:7556)
> ==2604268==    by 0x2ACF09: bgp_network (bgp_route_clippy.c:86)
> ==2604268==    by 0x4914EE7: cmd_execute_command_real (command.c:1003)
> ==2604268==    by 0x4915060: cmd_execute_command (command.c:1062)
> ==2604268==    by 0x4915610: cmd_execute (command.c:1228)
> ==2604268==    by 0x49E7C32: vty_command (vty.c:625)
> ==2604268==    by 0x49E9B56: vty_execute (vty.c:1388)
> ==2604268==    by 0x49EC331: vtysh_read (vty.c:2400)
> ==2604268==    by 0x49E06F1: event_call (event.c:2001)
> ==2604268==    by 0x495AB8B: frr_run (libfrr.c:1238)
> ==2604268==    by 0x200C4B: main (bgp_main.c:555)

Fixes: ddb5b4880b ("bgpd: vpn-vrf route leaking")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-23 09:41:59 +02:00
Shbinging
03649ffde3 ospfd:fix syntax of some no commands
Fix syntax of the following no commands:
1. `no area virtual link A.B.C.D hello-interval <NUM>`, `<NUM>` can be omitted.
2. `no area nssa default-information-originate metric <NUM>`, `<NUM>` can be omitted.
3. `no area nssa range cost <NUM>`, `<NUM>` can be omitted.
4. `no area default cost <NUM>`, `<NUM>` can be omitted.
5. `no ospf write-multiplier <NUM>`, `<NUM>` can be omitted.
6. `no default-information originate metric <NUM>`, `<NUM>` can be omitted.
7. `no distance <NUM>`, `<NUM>` can be omitted.

Signed-off-by: Shbinging <bingshui@smail.nju.edu.cn>
2024-10-23 06:01:57 +00:00
baozhen-H3C
66ef3576af isisd: The command "'show isis vrf all summary json" has no output.
When input 'show isis vrf all summary', output is as follow:
sonic# show isis vrf all summary
vrf             : default
Process Id      : 55
System Id       : 0000.0000.0006
Symbolic name   : RouterA
Up time         : 4d01h52m ago
Number of areas : 1
Area 10:
  Net: 10.0000.0000.0006.00
  IS_name: RouterA
  TX counters per PDU type:
     L1 IIH: 365003
     L1 LSP: 20468
    L1 PSNP: 8
   LSP RXMT: 0
  RX counters per PDU type:
     L1 IIH: 361577
     L2 IIH: 434
     L1 LSP: 10492
    L1 CSNP: 114260
  Level-1:
    LSP0 regenerated: 4840
         LSPs purged: 0
    SPF:
      minimum interval  : 1
    IPv4 route computation:
      last run elapsed  : 00:01:02 ago
      last run duration : 327 usec
      run count         : 12053
However, json display is null.

After the commit:
sonic# show isis vrf all summary json
{
  "vrfs":[
    {
      "vrf":"default",
      "process-id":56,
      "system-id":"0000.0000.0007",
      "up-time":"20:40:33",
      "number-areas":1,
      "areas":[
        {
          "area":"10",
          "net":"10.0000.0000.0007.00",
          "tx-pdu-type":{
            "l1-iih":52234,
            "l1-lsp":1053,
            "l1-csnp":8269,
            "l1-psnp":1,
            "lsp-rxmt":0
          },
          "rx-pdu-type":{
            "l1-iih":52245,
            "l2-iih":26116,
            "l1-lsp":1388,
            "l1-csnp":8269
          },
          "levels":[
            {
              "id":1,
              "lsp0-regenerated":89,
              "lsp-purged":0,
              "spf":"no pending",
              "minimum-interval":1,
              "last-run-elapsed":"00:00:05",
              "last-run-duration-usec":192,
              "last-run-count":1454
            }
          ]
        }
      ]
    }
  ]
}

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
2024-10-23 13:27:45 +08:00
Russ White
a4ecc2f4d2
Merge pull request #17198 from donaldsharp/backout_stdout_changes
Revert "lib: Attach stdout to child only if --log=stdout and stdout F…
2024-10-22 16:35:05 -04:00
Russ White
8ccd538847
Merge pull request #17192 from donaldsharp/bgp_bmp_stream_leak
bgpd: Do not leak a stream with bmp code
2024-10-22 16:16:57 -04:00
David Lamparter
1530a35423 vtysh: fix find and list commands
I simply missed that `node->cmd_vector` is needed for `find` and `list`
to work correctly.

Fixes: #17043
Fixes: 4bc41193e8 ("vtysh, lib: preprocess CLI graphs")
Reported-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-22 20:43:59 +02:00
Louis Scalbert
dd10379b3e bgpd: fix allocating uninitialized bgp_labels
Memory was not zeroed at allocation.

> ==2604268== Conditional jump or move depends on uninitialised value(s)
> ==2604268==    at 0x26F026: bgp_labels_unintern (bgp_label.c:116)
> ==2604268==    by 0x30000C: adj_free (bgp_updgrp_adv.c:81)
> ==2604268==    by 0x3019EE: bgp_adj_out_remove_subgroup (bgp_updgrp_adv.c:728)
> ==2604268==    by 0x30537C: subgroup_withdraw_packet (bgp_updgrp_packet.c:1042)
> ==2604268==    by 0x2970AF: bgp_generate_updgrp_packets (bgp_packet.c:508)
> ==2604268==    by 0x49E06F1: event_call (event.c:2001)
> ==2604268==    by 0x495AB8B: frr_run (libfrr.c:1238)
> ==2604268==    by 0x200C4B: main (bgp_main.c:555)

Fixes: 3c86f776f0 ("bgpd: add bgp_labels hash")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
2024-10-22 18:24:04 +02:00
Jafar Al-Gharaibeh
0078472e19
Merge pull request #17180 from anlancs/zebra/review-move-dplane
zebra: drop NEWLINK event handling in the main thread
2024-10-22 10:29:49 -05:00
Donald Sharp
6a36b9ef49 Revert "lib: Attach stdout to child only if --log=stdout and stdout FD is a tty"
This reverts commit 0e3c5e8e59.
2024-10-22 11:13:07 -04:00
Russ White
98ec22ff59
Merge pull request #17174 from baozhen-H3C/202410180225
isisd: fix 'show isis route' and 'show isis fast-reroute summary' errors with vrf
2024-10-22 11:07:53 -04:00
Russ White
3152f4933e
Merge pull request #17166 from anlancs/zebra/review-remove-one
zebra: remove useless code
2024-10-22 11:06:50 -04:00
Russ White
df0dd1b39e
Merge pull request #17165 from opensourcerouting/fix/bgp_community_no_export_oad
bgpd: Do not filter no-export community for BGP OAD
2024-10-22 11:05:38 -04:00
Russ White
56944a53f1
Merge pull request #17151 from opensourcerouting/fix/send_link_bw_as_non-transitive_to_ebgp
bgpd: Handle non-transitive extended communities
2024-10-22 11:03:00 -04:00
David Lamparter
24eed7c2d2 accords: guidelines/terms for FRRouting trademarks
This attempts to establish a little bit of clarifying restrictions
around the FRRouting "identifiers", mostly as a reaction to FRRouting
now functioning almost like a "seal of approval" in some cases.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
2024-10-22 16:57:44 +02:00
Donald Sharp
9adcff1890 bgpd: Do not leak a stream with bmp code
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
2024-10-22 10:10:46 -04:00