]> git.puffer.fish Git - mirror/frr.git/log
mirror/frr.git
5 months agoMerge pull request #17434 from opensourcerouting/fix/bgp_color_parsing_ecomm
Donald Sharp [Fri, 15 Nov 2024 14:21:52 +0000 (09:21 -0500)]
Merge pull request #17434 from opensourcerouting/fix/bgp_color_parsing_ecomm

bgpd: Fix color extended community parsing

5 months agobgpd: Use tmp_as when parsing color extended community 17434/head
Donatas Abraitis [Fri, 15 Nov 2024 06:16:10 +0000 (08:16 +0200)]
bgpd: Use tmp_as when parsing color extended community

as is not initialized and it's assigned only later.

CID: 1601739

Fixes: 937cf4d ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoRevert "bgpd: Fix color extended community parsing"
Donatas Abraitis [Fri, 15 Nov 2024 06:14:32 +0000 (08:14 +0200)]
Revert "bgpd: Fix color extended community parsing"

This reverts commit 8e771bda840e189eed2851f63ad80cb1a235f40f.

5 months agoMerge pull request #17433 from donaldsharp/zebra_debug_assert
Jafar Al-Gharaibeh [Fri, 15 Nov 2024 03:52:49 +0000 (21:52 -0600)]
Merge pull request #17433 from donaldsharp/zebra_debug_assert

Zebra debug assert

5 months agoMerge pull request #17429 from opensourcerouting/fix/unsupported_commands_bgpd
Donald Sharp [Fri, 15 Nov 2024 00:47:44 +0000 (19:47 -0500)]
Merge pull request #17429 from opensourcerouting/fix/unsupported_commands_bgpd

bgpd: Drop unsupported commands

5 months agozebra: Put debug guards in zebra_vxlan.c 17433/head
Donald Sharp [Thu, 14 Nov 2024 21:08:47 +0000 (16:08 -0500)]
zebra: Put debug guards in zebra_vxlan.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agozebra: zebra_vxlan.c assert on dev escape problem
Donald Sharp [Thu, 14 Nov 2024 21:02:18 +0000 (16:02 -0500)]
zebra: zebra_vxlan.c assert on dev escape problem

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agozebra: Missed debug guard in zebra_evpn.c
Donald Sharp [Thu, 14 Nov 2024 20:59:36 +0000 (15:59 -0500)]
zebra: Missed debug guard in zebra_evpn.c

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Depracate no_synchronization_cmd, no_auto_summary_cmd commands 17429/head
Donatas Abraitis [Thu, 14 Nov 2024 14:12:19 +0000 (16:12 +0200)]
bgpd: Depracate no_synchronization_cmd, no_auto_summary_cmd commands

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17422 from opensourcerouting/fix/coverity_bgp_color
Mark Stapp [Thu, 14 Nov 2024 13:27:47 +0000 (08:27 -0500)]
Merge pull request #17422 from opensourcerouting/fix/coverity_bgp_color

bgpd: Fix color extended community parsing

5 months agoMerge pull request #17426 from mjstapp/fix_z_evpn_debug
Donatas Abraitis [Thu, 14 Nov 2024 07:06:57 +0000 (09:06 +0200)]
Merge pull request #17426 from mjstapp/fix_z_evpn_debug

zebra: fix unguarded debug in evpn code

5 months agoMerge pull request #17423 from opensourcerouting/fix/show_advertised_routes_plain_wit...
Donald Sharp [Wed, 13 Nov 2024 20:50:39 +0000 (15:50 -0500)]
Merge pull request #17423 from opensourcerouting/fix/show_advertised_routes_plain_with_addpath

bgpd: Show neighbor advertised paths including addpath

5 months agozebra: fix unguarded debug in evpn code 17426/head
Mark Stapp [Wed, 13 Nov 2024 18:49:28 +0000 (13:49 -0500)]
zebra: fix unguarded debug in evpn code

Guard a debug in the evpn code.

Signed-off-by: Mark Stapp <mjs@cisco.com>
5 months agobgpd: Reduce the nesting level for show_adj_route() 17423/head
Donatas Abraitis [Wed, 13 Nov 2024 11:36:01 +0000 (13:36 +0200)]
bgpd: Reduce the nesting level for show_adj_route()

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Show neighbor advertised paths including addpath
Donatas Abraitis [Wed, 13 Nov 2024 09:47:33 +0000 (11:47 +0200)]
bgpd: Show neighbor advertised paths including addpath

Without the patch only the best path is displayed.

With the patch, display all paths including addpaths, but only for non-JSON
output to avoid breaking existing output.

E.g.:

```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
     Network          Next Hop            Metric LocPrf Weight Path
 *>  172.16.16.254/32 192.168.2.3              0             0 65003 ?
 *   172.16.16.254/32 192.168.2.4              0             0 65004 ?
 *>  192.168.2.0/24   192.168.2.3              0             0 65003 ?
 *   192.168.2.0/24   192.168.2.4              0             0 65004 ?
```

Before it was:

```
munet> r2 shi vtysh -c 'sh ip bgp nei 192.168.2.3 advertised-routes'
     Network          Next Hop            Metric LocPrf Weight Path
 *>  172.16.16.254/32 192.168.2.3              0             0 65003 ?
 *>  192.168.2.0/24   192.168.2.3              0             0 65003 ?
```

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Fix color extended community parsing 17422/head
Donatas Abraitis [Wed, 13 Nov 2024 08:03:17 +0000 (10:03 +0200)]
bgpd: Fix color extended community parsing

CID: 1601739

Fixes: 937cf4db1738d768ed7dac8677d16f7585bb75de ("bgpd:support of color extended community color-only types")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17331 from Jafaral/ospf-instance
Russ White [Tue, 12 Nov 2024 23:00:46 +0000 (18:00 -0500)]
Merge pull request #17331 from Jafaral/ospf-instance

tests: add support for ospf instances  with unified configs

5 months agoMerge pull request #17205 from piotrjurkiewicz/patch-1
Jafar Al-Gharaibeh [Tue, 12 Nov 2024 22:13:27 +0000 (16:13 -0600)]
Merge pull request #17205 from piotrjurkiewicz/patch-1

debian: Add missing libprotobuf-dev to grpc profile

5 months agoMerge pull request #17297 from mjstapp/mjs_ifp_table
Donald Sharp [Tue, 12 Nov 2024 20:12:07 +0000 (15:12 -0500)]
Merge pull request #17297 from mjstapp/mjs_ifp_table

zebra, lib: use internal rbtree for per-NS tree of ifps

5 months agotests: add support for ospf instances with unified configs 17331/head
Jafar Al-Gharaibeh [Fri, 1 Nov 2024 06:12:20 +0000 (01:12 -0500)]
tests: add support for ospf instances  with unified configs

Signed-off-by: Jafar Al-Gharaibeh <jafar@atcorp.com>
5 months agoMerge pull request #17368 from louis-6wind/bgp_vpnv4_asbr-clarify
Russ White [Tue, 12 Nov 2024 16:40:01 +0000 (11:40 -0500)]
Merge pull request #17368 from louis-6wind/bgp_vpnv4_asbr-clarify

tests: clarify bgp_vpnv4_asbr

5 months agoMerge pull request #17410 from opensourcerouting/fix/bgpd_ebgp_multihop_set_unset
Russ White [Tue, 12 Nov 2024 16:02:22 +0000 (11:02 -0500)]
Merge pull request #17410 from opensourcerouting/fix/bgpd_ebgp_multihop_set_unset

BGP BFD session things

5 months agoMerge pull request #17374 from opensourcerouting/fix/rfc_9687
Russ White [Tue, 12 Nov 2024 14:59:06 +0000 (09:59 -0500)]
Merge pull request #17374 from opensourcerouting/fix/rfc_9687

Add two RFCs for BGP to the list

5 months agoMerge pull request #17366 from baozhen-H3C/202411061447
Russ White [Tue, 12 Nov 2024 14:55:47 +0000 (09:55 -0500)]
Merge pull request #17366 from baozhen-H3C/202411061447

isisd: fix crash when switching P2P after shutdowning LAN circuit

5 months agoMerge pull request #17344 from opensourcerouting/fix/reset_bgp_session_only_if_bfd_is...
Russ White [Tue, 12 Nov 2024 14:53:40 +0000 (09:53 -0500)]
Merge pull request #17344 from opensourcerouting/fix/reset_bgp_session_only_if_bfd_is_properly_working

bgpd: Reset BGP session only if it was a real BFD DOWN event

5 months agotests: Check if BFD session is created with update-source (interface) 17410/head
Donatas Abraitis [Tue, 12 Nov 2024 11:12:56 +0000 (13:12 +0200)]
tests: Check if BFD session is created with update-source (interface)

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Update source address for BFD session
Donatas Abraitis [Tue, 12 Nov 2024 11:09:09 +0000 (13:09 +0200)]
bgpd: Update source address for BFD session

If BFD is down, we should try to detect the source automatically from the given
interface.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17409 from krishna-samy/show_nexthop_json_fix
Donatas Abraitis [Mon, 11 Nov 2024 15:10:16 +0000 (17:10 +0200)]
Merge pull request #17409 from krishna-samy/show_nexthop_json_fix

bgpd: fix resolvedPrefix in show nexthop json output

5 months agotests: Check if BGP BFD session is created correctly with multihop/update-source
Donatas Abraitis [Mon, 11 Nov 2024 15:07:45 +0000 (17:07 +0200)]
tests: Check if BGP BFD session is created correctly with multihop/update-source

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Do not try to uninstall BFD session if the peer is not established
Donatas Abraitis [Mon, 11 Nov 2024 14:49:22 +0000 (16:49 +0200)]
bgpd: Do not try to uninstall BFD session if the peer is not established

Having something like:

```
 neighbor 192.168.1.222 ebgp-multihop 32
 neighbor 192.168.1.222 update-source 192.168.1.5
 neighbor 192.168.1.222 bfd
```

Won't work and the result is (empty):

```
$ show bfd peers
BFD Peers:
```

bgp_stop() is called in BGP FSM multiple times (even at startup) that
causes intermediate session interruption when update-source/ebgp-multihop
is triggered.

With this fix, the ordering does not matter and the BFD session's parameters
are updated correctly.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Do not use an existing peer pointer for ALL_LIST_ELEMENTS()
Donatas Abraitis [Mon, 11 Nov 2024 14:48:59 +0000 (16:48 +0200)]
bgpd: Do not use an existing peer pointer for ALL_LIST_ELEMENTS()

Use a separate `member` in this case.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: fix resolvedPrefix in show nexthop json output 17409/head
Krishnasamy R [Mon, 11 Nov 2024 09:59:31 +0000 (01:59 -0800)]
bgpd: fix resolvedPrefix in show nexthop json output

While populating  the nexthop info for "show bgp nexthop json", resolvedPrefix
is added in parent json object instead of json_nexthop object.
This results in displaying wrong resolvedPrefix for nexthops.
Fixing the same by adding resolvedPrefix to json_nexthop object, so that
the proper resolvedPrefix would be displayed for the respective nexthop

Signed-off-by: Krishnasamy R <krishnasamyr@nvidia.com>
5 months agoMerge pull request #17362 from raja-rajasekar/rajasekarr/src_proto_for_redist_cmd
Donatas Abraitis [Sat, 9 Nov 2024 20:01:44 +0000 (22:01 +0200)]
Merge pull request #17362 from raja-rajasekar/rajasekarr/src_proto_for_redist_cmd

bgpd: Fix for match source-protocol in route-map for redistribute cmd

5 months agobgpd: Fix for match source-protocol in route-map for redistribute cmd 17362/head
Rajasekar Raja [Mon, 21 Oct 2024 17:53:27 +0000 (10:53 -0700)]
bgpd: Fix for match source-protocol in route-map for redistribute cmd

A redistribute cmd can have a route-map attached to it and adding the
match source-protocol to that route-map means BGP to filter which
protocol routes to accept among the bunch of routes zebra is sending.

Fixing this since this wasnt implemented earlier.

Ticket :#4119692

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
Signed-off-by: Rajasekar Raja <rajasekarr@nvidia.com>
5 months agoMerge pull request #17386 from opensourcerouting/fix/initialize_mbefore
Donald Sharp [Fri, 8 Nov 2024 16:15:04 +0000 (11:15 -0500)]
Merge pull request #17386 from opensourcerouting/fix/initialize_mbefore

lib: Initialize mbefore for route_map_apply_ext()

5 months agoMerge pull request #17384 from donaldsharp/bgp_withdraw_and_unlikely
Donatas Abraitis [Fri, 8 Nov 2024 07:20:19 +0000 (09:20 +0200)]
Merge pull request #17384 from donaldsharp/bgp_withdraw_and_unlikely

Bgp withdraw and unlikely

5 months agoMerge pull request #17341 from zice312963205/zly_tcpmss
Donatas Abraitis [Fri, 8 Nov 2024 07:11:41 +0000 (09:11 +0200)]
Merge pull request #17341 from zice312963205/zly_tcpmss

bgpd:support tcp-mss for neighbor group

5 months agolib: Initialize mbefore for route_map_apply_ext() 17386/head
Donatas Abraitis [Fri, 8 Nov 2024 07:00:34 +0000 (09:00 +0200)]
lib: Initialize mbefore for route_map_apply_ext()

CID 1601478: Uninitialized variables  (UNINIT)
Using uninitialized value "mbefore.real.tv_usec" when calling "event_consumed_time".

Fixes: 3e3a666331e1e44683b17ab1fd78afc47c5d2677 ("lib: Add ability to track time in individual routemaps")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agoMerge pull request #17231 from guoguojia2021/guozhongfeng_alibaba
Donatas Abraitis [Fri, 8 Nov 2024 06:56:21 +0000 (08:56 +0200)]
Merge pull request #17231 from guoguojia2021/guozhongfeng_alibaba

bgpd:support of color extended community color-only types

5 months agoMerge pull request #12109 from donaldsharp/routemap_time_spent
Russ White [Thu, 7 Nov 2024 18:19:11 +0000 (13:19 -0500)]
Merge pull request #12109 from donaldsharp/routemap_time_spent

lib: Add ability to track time in individual routemaps

5 months agobgpd: Add unlikely for debugs in bgp_update() 17384/head
Donald Sharp [Thu, 7 Nov 2024 16:55:56 +0000 (11:55 -0500)]
bgpd: Add unlikely for debugs in bgp_update()

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Mark debugs as unlikely in bgp_withdraw
Donald Sharp [Thu, 7 Nov 2024 16:50:23 +0000 (11:50 -0500)]
bgpd: Mark debugs as unlikely in bgp_withdraw

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: In bgp_withdraw attempt to avoid a if statement on every pass
Donald Sharp [Thu, 7 Nov 2024 16:31:59 +0000 (11:31 -0500)]
bgpd: In bgp_withdraw attempt to avoid a if statement on every pass

We have this:

if ( (safi == SAFI_UNICAST) && ...)
    do stuff
if ( (safi == SAFI_MPLS_VPN) && ... )
    do stuff

this leads to having to test safi multiple times if safi is
SAFI_UNICAST.  Let's make it a else if as that we know that
the safi is going to not change.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agobgpd: Pass in the prefix instead of looking it up again
Donald Sharp [Thu, 7 Nov 2024 16:29:51 +0000 (11:29 -0500)]
bgpd: Pass in the prefix instead of looking it up again

In an attempt to make the code faster let's just pass
in the prefix instead of having to do a lookup a majillion
times again after we already have it.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #17376 from opensourcerouting/fix/stale_routes_with_addpath
Donald Sharp [Thu, 7 Nov 2024 16:04:56 +0000 (11:04 -0500)]
Merge pull request #17376 from opensourcerouting/fix/stale_routes_with_addpath

bgpd: Clear stale routes with multiple paths

5 months agoMerge pull request #17244 from donaldsharp/high_ecmp_test
Donatas Abraitis [Thu, 7 Nov 2024 15:15:24 +0000 (17:15 +0200)]
Merge pull request #17244 from donaldsharp/high_ecmp_test

tests: Add a topology that supports a large number of ecmp

5 months agotests: Check if stale routes with addpath are marked with LLGR community 17376/head
Donatas Abraitis [Thu, 7 Nov 2024 12:01:39 +0000 (14:01 +0200)]
tests: Check if stale routes with addpath are marked with LLGR community

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agotests: Check if routes with addpath are cleared if they are stale
Donatas Abraitis [Thu, 7 Nov 2024 11:17:12 +0000 (13:17 +0200)]
tests: Check if routes with addpath are cleared if they are stale

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Set LLGR stale routes for all the paths including addpath
Donatas Abraitis [Thu, 7 Nov 2024 11:08:35 +0000 (13:08 +0200)]
bgpd: Set LLGR stale routes for all the paths including addpath

Without this patch we set only the first path for the route (if multiple exist)
as LLGR stale and stop doing that for the rest of the paths, which is wrong.

Fixes: 1479ed2fb35f4a5ae1017201a7ee37ba2727163a ("bgpd: Implement LLGR helper mode")
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Clear all paths including addpath once GR expires
Donatas Abraitis [Thu, 7 Nov 2024 11:04:54 +0000 (13:04 +0200)]
bgpd: Clear all paths including addpath once GR expires

We iterated over all bgp_path_info's, but once we remove the path, we didn't
check for other paths under the same bgp_dest.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agodoc:the doc of extcomumnity color 17231/head
guozhongfeng.gzf [Thu, 7 Nov 2024 02:32:16 +0000 (10:32 +0800)]
doc:the doc of extcomumnity color

Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
5 months agotests:support of color extended community color-only types
guozhongfeng.gzf [Thu, 24 Oct 2024 12:07:15 +0000 (20:07 +0800)]
tests:support of color extended community color-only types

Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
5 months agobgpd:support of color extended community color-only types
guozhongfeng.gzf [Thu, 24 Oct 2024 12:05:23 +0000 (20:05 +0800)]
bgpd:support of color extended community color-only types

Add support of color extended community color-only types, RFC 9256.
The type only support 00 01 10.

configuration example:
!
frr version 10.3-dev-my-manual-build
frr defaults traditional
hostname router3
!
route-map color permit 1
 set extcommunity color 10:100 01:200 00:300
exit
!
vrf Vrf1
exit-vrf
!
interface lo
 ipv6 address 3::3/128
exit
!
router bgp 3
 bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 no bgp ebgp-requires-policy
 no bgp default ipv4-unicast
 bgp bestpath as-path multipath-relax
 timers bgp 10 30
 neighbor 100.13.13.1 remote-as 1
 neighbor 100.13.13.1 advertisement-interval 0
 neighbor 100.23.23.2 remote-as 2
 neighbor 100.23.23.2 advertisement-interval 0
 neighbor 1000:3000::1 remote-as 1
 neighbor 1000:3000::1 ebgp-multihop
 neighbor 1000:3000::1 update-source 1000:3000::3
 neighbor 1000:3000::1 capability extended-nexthop
 neighbor 2000:3000::2 remote-as 2
 neighbor 2000:3000::2 ebgp-multihop
 neighbor 2000:3000::2 update-source 2000:3000::3
 neighbor 2000:3000::2 capability extended-nexthop
 !
 address-family ipv4 unicast
  neighbor 100.13.13.1 activate
  neighbor 100.23.23.2 activate
 exit-address-family
 !
 address-family ipv6 unicast
  redistribute connected route-map color
  neighbor 1000:3000::1 activate
  neighbor 2000:3000::2 activate
 exit-address-family
exit
!
end

Signed-off-by: guozhongfeng.gzf <guozhongfeng.gzf@alibaba-inc.com>
5 months agodoc: Add missing RFCs for BGP to the list 17374/head
Donatas Abraitis [Thu, 7 Nov 2024 09:25:52 +0000 (11:25 +0200)]
doc: Add missing RFCs for BGP to the list

* RFC 9687
* RFC 7311

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd: Add SendHoldTimer_Expires event to bgp_fsm_rfc_codes
Donatas Abraitis [Thu, 7 Nov 2024 09:20:06 +0000 (11:20 +0200)]
bgpd: Add SendHoldTimer_Expires event to bgp_fsm_rfc_codes

Not really used, but since we have it, let's update it as a pointer.

This event comes from https://datatracker.ietf.org/doc/html/rfc9687

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agobgpd:support tcp-mss for neighbor group 17341/head
hanyu.zly [Mon, 4 Nov 2024 08:21:09 +0000 (16:21 +0800)]
bgpd:support tcp-mss for neighbor group

Signed-off-by: hanyu.zly <hanyu.zly@alibaba-inc.com>
5 months agotests: clarify bgp_vpnv4_asbr 17368/head
Louis Scalbert [Tue, 5 Nov 2024 15:33:02 +0000 (16:33 +0100)]
tests: clarify bgp_vpnv4_asbr

Clarify bgp_vpnv4_asbr. Cosmetic change.

Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
5 months agoisisd: fix crash when switching P2P after shutdowning LAN circuit 17366/head
baozhen-H3C [Wed, 6 Nov 2024 12:17:03 +0000 (20:17 +0800)]
isisd: fix crash when switching P2P after shutdowning LAN circuit

When shutdown a LAN-type circuit, and if the current device is not the DIS (assuming it is a level-1 device), the isis_circuit_down() function will not call the isis_dr_resign() function to clear the circuit->u.bc.run_dr_elect[0] bit (this bit is set on interfaces in the isis_run_dr() function). After switching the link to a P2P type, since u.p2p and u.bc form a union, and circuit->u.bc.snpa = "\000\000\000\000\000" and circuit->u.bc.run_dr_elect = "\001", this results in circuit->u.p2p.neighbor = 0x1000000000000. Consequently, the value of adj->sysid accesses a wild pointer, causing the current crash.

The backtrace is as follows:
(gdb) bt
#0  0x00007fbd30e55fe1 in raise () from /lib/x86_64-linux-gnu/libpthread.so.0
#1  0x00007fbd30f76b29 in core_handler (signo=11, siginfo=0x7ffc60b7a270,
    context=0x7ffc60b7a140) at ../lib/sigevent.c:261
#2  <signal handler called>
#3  0x00007fbd30dddba4 in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#4  0x0000562aec46617f in isis_spf_run_lfa (area=0x562aee3a56d0, spftree=0x562aee3a51a0)
    at ../isisd/isis_lfa.c:2403
#5  0x0000562aec483854 in isis_run_spf_with_protection (area=0x562aee3a56d0,
    spftree=0x562aee3a51a0) at ../isisd/isis_spf.c:1891
#6  0x0000562aec483b05 in isis_run_spf_cb (thread=0x7ffc60b7b000)
    at ../isisd/isis_spf.c:1953
#7  0x00007fbd30f900bb in thread_call (thread=0x7ffc60b7b000) at ../lib/thread.c:1990
#8  0x00007fbd30f2897b in frr_run (master=0x562aee0833c0) at ../lib/libfrr.c:1198
#9  0x0000562aec454d6d in main (argc=5, argv=0x7ffc60b7b228, envp=0x7ffc60b7b258)
    at ../isisd/isis_main.c:273
(gdb) f 4
#4  0x0000562aec46617f in isis_spf_run_lfa (area=0x562aee3a56d0, spftree=0x562aee3a51a0)
    at ../isisd/isis_lfa.c:2403
2403    ../isisd/isis_lfa.c: No such file or directory.
(gdb) p circuit->u.p2p.neighbor
$1 = (struct isis_adjacency *) 0x1000000000000
(gdb) p adj->sysid
Cannot access memory at address 0x1000000000006
(gdb) p circuit->u.bc
$2 = {snpa = "\000\000\000\000\000", run_dr_elect = "\001", t_run_dr = {0x0, 0x0},
  t_send_lan_hello = {0x0, 0x0}, adjdb = {0x0, 0x0}, lan_neighs = {0x0, 0x0},
  is_dr = "\000", l1_desig_is = "\000\000\000\000\000\000",
  l2_desig_is = "\000\000\000\000\000\000", t_refresh_pseudo_lsp = {0x0, 0x0}}
(gdb)

The backtrace provided above pertains to version 8.5.4, but it seems that the same issue exists in the code of the master branch as well.

Signed-off-by: baozhen-H3C <bao.zhen@h3c.com>
5 months agoMerge pull request #17363 from acooks-at-bda/fix-redundant-null-ptr-check-CID-1599962
Donatas Abraitis [Wed, 6 Nov 2024 06:10:00 +0000 (08:10 +0200)]
Merge pull request #17363 from acooks-at-bda/fix-redundant-null-ptr-check-CID-1599962

ospf6d: remove redundant null ptr check

5 months agoMerge pull request #17364 from acooks-at-bda/fix-redundant-null-ptr-check-CID-1599957
Donatas Abraitis [Wed, 6 Nov 2024 06:09:20 +0000 (08:09 +0200)]
Merge pull request #17364 from acooks-at-bda/fix-redundant-null-ptr-check-CID-1599957

ospf6d: remove redundant null ptr check in ospf6_link_lsa_get_prefix_str() - CID 1599957

5 months agoospf6d: remove redundant null ptr check 17364/head
Andrew Cooks [Wed, 6 Nov 2024 01:06:31 +0000 (11:06 +1000)]
ospf6d: remove redundant null ptr check

Fix defect flagged by Coverity:

*** CID 1599957:  Null pointer dereferences  (REVERSE_INULL)
/ospf6d/ospf6_intra.c: 581 in ospf6_link_lsa_get_prefix_str()
575                                                int buflen, int pos)
576     {
577             struct ospf6_link_lsa *link_lsa = lsa_after_header(lsa->header);
578             struct ospf6_prefix *prefix = nth_prefix(lsa->header, pos);
579             struct in6_addr in6 = { 0 };
580
>>>     CID 1599957:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "lsa" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
581             if (!lsa || !prefix || !buf || buflen < (1 + INET6_ADDRSTRLEN))
582                     return NULL;
583
584             /* position zero is used for the lladdr in the body of the LSA */
585             if (pos == 0) {
586                     inet_ntop(AF_INET6, &link_lsa->linklocal_addr, buf, buflen);

The check for lsa being not-null happens in ospf6_lsdb_show() and
first dereference happens in ospf6_lsa_show_summary()

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
5 months agoospf6d: remove redundant null ptr check 17363/head
Andrew Cooks [Wed, 6 Nov 2024 00:50:53 +0000 (10:50 +1000)]
ospf6d: remove redundant null ptr check

Fix defect flagged by Coverity:

*** CID 1599962:  Null pointer dereferences  (REVERSE_INULL)
/ospf6d/ospf6_intra.c: 775 in ospf6_intra_prefix_lsa_get_prefix_str()
769     {
770             struct ospf6_prefix *prefix = nth_prefix(lsa->header, pos);
771             struct in6_addr in6 = { 0 };
772             char tbuf[16];
773
774             /* ensure buflen >= INET6_ADDRSTRLEN + '/128\0' */
>>>     CID 1599962:  Null pointer dereferences  (REVERSE_INULL)
>>>     Null-checking "lsa" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
775             if (!lsa || !prefix || !buf || buflen < (5 + INET6_ADDRSTRLEN))
776                     return NULL;
777
778             memcpy(&in6, OSPF6_PREFIX_BODY(prefix),
779                    OSPF6_PREFIX_SPACE(prefix->prefix_length));
780             inet_ntop(AF_INET6, &in6, buf, buflen);

The check for lsa being not-null happens in ospf6_lsdb_show() and
first dereference happens in ospf6_lsa_show_summary()

Signed-off-by: Andrew Cooks <acooks.at.bda@gmail.com>
5 months agoMerge pull request #17346 from LabNConsulting/aceelindem/fix_ospf_refresh_interval_assert
Jafar Al-Gharaibeh [Tue, 5 Nov 2024 19:30:24 +0000 (13:30 -0600)]
Merge pull request #17346 from LabNConsulting/aceelindem/fix_ospf_refresh_interval_assert

ospfd: Fix assert in LSA refresh interval setting

5 months agobgpd: Reset BGP session only if it was a real BFD DOWN event 17344/head
Donatas Abraitis [Tue, 5 Nov 2024 13:51:58 +0000 (15:51 +0200)]
bgpd: Reset BGP session only if it was a real BFD DOWN event

Without this patch we always see a double-reset, e.g.:

```
2024/11/04 12:42:43.010 BGP: [VQY9X-CQZKG] bgp_peer_bfd_update_source: address [0.0.0.0->172.18.0.3] to [172.18.0.2->172.18.0.3]
2024/11/04 12:42:43.010 BGP: [X8BD9-8RKN4] bgp_peer_bfd_update_source: interface none to eth0
2024/11/04 12:42:43.010 BFD: [MSVDW-Y8Z5Q] ptm-del-dest: deregister peer [mhop:no peer:172.18.0.3 local:0.0.0.0 vrf:default cbit:0x00 minimum-ttl:255]
2024/11/04 12:42:43.010 BFD: [NYF5K-SE3NS] ptm-del-session: [mhop:no peer:172.18.0.3 local:0.0.0.0 vrf:default] refcount=0
2024/11/04 12:42:43.010 BFD: [NW21R-MRYNT] session-delete: mhop:no peer:172.18.0.3 local:0.0.0.0 vrf:default
2024/11/04 12:42:43.010 BGP: [P3D3N-3277A] 172.18.0.3 [FSM] Timer (routeadv timer expire)
2024/11/04 12:42:43.010 BFD: [YA0Q5-C0BPV] control-packet: no session found [mhop:no peer:172.18.0.3 local:172.18.0.2 port:11]
2024/11/04 12:42:43.010 BFD: [MSVDW-Y8Z5Q] ptm-add-dest: register peer [mhop:no peer:172.18.0.3 local:172.18.0.2 vrf:default cbit:0x00 minimum-ttl:255]
2024/11/04 12:42:43.011 BFD: [PSB4R-8T1TJ] session-new: mhop:no peer:172.18.0.3 local:172.18.0.2 vrf:default ifname:eth0
2024/11/04 12:42:43.011 BGP: [Q4BCV-6FHZ5] zclient_bfd_session_update: 172.18.0.2/32 -> 172.18.0.3/32 (interface eth0) VRF default(0) (CPI bit no): Down
2024/11/04 12:42:43.011 BGP: [MKVHZ-7MS3V] bfd_session_status_update: neighbor 172.18.0.3 vrf default(0) bfd state Up -> Down
2024/11/04 12:42:43.011 BGP: [HZN6M-XRM1G] %NOTIFICATION: sent to neighbor 172.18.0.3 6/10 (Cease/BFD Down) 0 bytes
2024/11/04 12:42:43.011 BGP: [QFMSE-NPSNN] zclient_bfd_session_update:   sessions updated: 1
2024/11/04 12:42:43.011 BGP: [ZWCSR-M7FG9] 172.18.0.3 [FSM] BGP_Stop (Established->Clearing), fd 22
```

Reset is due to the source address change.

With this patch, we reset the session only if it's a _REAL_ BFD down event, which
means we trigger session reset if BFD session is established earlier than BGP.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
5 months agolib: Add ability to track time in individual routemaps 12109/head
Donald Sharp [Mon, 10 Oct 2022 14:56:51 +0000 (10:56 -0400)]
lib: Add ability to track time in individual routemaps

Add the abilty to track how much time is spent in routemaps.
Example of the new output:

eva# show route-map
ZEBRA:
route-map: FOO Invoked: 1000000 (323 milliseconds total) Optimization: enabled Processed Change: false
 deny, sequence 10 Invoked 1000000 (320 milliseconds total)
  Match clauses:
  Set clauses:
  Call clause:
  Action:
    Exit routemap

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #17326 from anlancs/fix/zebra-no-ifp-down
Russ White [Tue, 5 Nov 2024 15:20:36 +0000 (10:20 -0500)]
Merge pull request #17326 from anlancs/fix/zebra-no-ifp-down

zebra: fix missing kernel routes

5 months agoMerge pull request #17319 from opensourcerouting/fix/no_ospf_router-id
Russ White [Tue, 5 Nov 2024 15:19:44 +0000 (10:19 -0500)]
Merge pull request #17319 from opensourcerouting/fix/no_ospf_router-id

ospfd: Use router_id what Zebra has if we remove a static router_id

5 months agotests: Add a topology that supports a large number of ecmp 17244/head
Donald Sharp [Fri, 25 Oct 2024 15:28:45 +0000 (11:28 -0400)]
tests: Add a topology that supports a large number of ecmp

Add a basic topology that allows the testing of BGP and zebra
at scale.  I built this to help me find and fix problems with
a large number of bgp peers.  Since I plan to keep using this
and as I understand it there are future plans to take this
higher, I would like to add this as a test that people can invoke
with this command:

sudo -E python3 -m pytest -s -vv --topology-only

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #17305 from opensourcerouting/fix/bgp_community_list_numbered
Russ White [Tue, 5 Nov 2024 15:16:07 +0000 (10:16 -0500)]
Merge pull request #17305 from opensourcerouting/fix/bgp_community_list_numbered

bgpd: Treat numbered community-list only if it's in a range 1-500

5 months agoMerge pull request #16750 from donaldsharp/table_display_is_not_vrf_based_in_some_cases
Jafar Al-Gharaibeh [Tue, 5 Nov 2024 15:10:39 +0000 (09:10 -0600)]
Merge pull request #16750 from donaldsharp/table_display_is_not_vrf_based_in_some_cases

zebra: Don't display the vrf if not using namespace based vrfs

5 months agoMerge pull request #17115 from LabNConsulting/jmuthii/nhrpd-retry-resolution-topotest
Russ White [Tue, 5 Nov 2024 15:10:12 +0000 (10:10 -0500)]
Merge pull request #17115 from LabNConsulting/jmuthii/nhrpd-retry-resolution-topotest

nhrpd: fix passphrase handling, add topotest for resolution request

5 months agoospfd: Fix assert in LSA refresh interval setting 17346/head
Acee [Tue, 5 Nov 2024 15:03:28 +0000 (10:03 -0500)]
ospfd: Fix assert in LSA refresh interval setting

Under certain timing conditions, the current logic asserts in
ospf_lsa_refresh_delay(). While this isn't readily reproducible,
the only explanation is that the conversion from struct timeval
to milliseconds is 0 due to rounding off the microseconds.

Signed-off-by: Acee <aceelindem@gmail.com>
5 months agozebra: Remove large indentation level in do_show_route_helper 16750/head
Donald Sharp [Mon, 4 Nov 2024 18:02:36 +0000 (13:02 -0500)]
zebra: Remove large indentation level in do_show_route_helper

CI is complaining about the large level of indentation.
Make it a bit better.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agozebra: Don't display the vrf if not using namespace based vrfs
Donald Sharp [Thu, 5 Sep 2024 13:11:04 +0000 (09:11 -0400)]
zebra: Don't display the vrf if not using namespace based vrfs

Currently when doing a `show ip route table XXXX`, zebra is displaying
the current default vrf as the vrf we are in.  We are displaying a
table not a vrf.  This is only true if you are not using namespace
based vrf's, so modify the output to display accordingly.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agoMerge pull request #16960 from donaldsharp/zebra_nhg_startup_issue
Mark Stapp [Mon, 4 Nov 2024 16:49:30 +0000 (11:49 -0500)]
Merge pull request #16960 from donaldsharp/zebra_nhg_startup_issue

zebra: On startup actually allow for nhe's to be early

5 months agoMerge pull request #17332 from nabahr/fix-import-test
Donald Sharp [Sun, 3 Nov 2024 22:54:20 +0000 (17:54 -0500)]
Merge pull request #17332 from nabahr/fix-import-test

tests: Remove unnecessary fields from expected JSON

5 months agoMerge pull request #17333 from cscarpitta/fix/fix-srv6-docs-misspelling
Donald Sharp [Sun, 3 Nov 2024 22:53:37 +0000 (17:53 -0500)]
Merge pull request #17333 from cscarpitta/fix/fix-srv6-docs-misspelling

doc: Fix a couple of misspellings in zebra documentation

5 months agoMerge pull request #17334 from cscarpitta/fix/fix-wrong-srv6-debug-macros
Donald Sharp [Sun, 3 Nov 2024 22:53:05 +0000 (17:53 -0500)]
Merge pull request #17334 from cscarpitta/fix/fix-wrong-srv6-debug-macros

zebra: Fix incorrect debug macros

5 months agoMerge pull request #17335 from cscarpitta/fix/bgp-use-ipv6-max-bitlen
Donald Sharp [Sun, 3 Nov 2024 22:51:20 +0000 (17:51 -0500)]
Merge pull request #17335 from cscarpitta/fix/bgp-use-ipv6-max-bitlen

bgpd: Replace 128 with `IPV6_MAX_BITLEN`

5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN6 SIDs 17335/head
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:43 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN6 SIDs

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN4 SIDs
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:32 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 VPN4 SIDs

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agobgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 functions
Carmine Scarpitta [Sun, 3 Nov 2024 07:54:03 +0000 (08:54 +0100)]
bgpd: Use `IPV6_MAX_BITLEN` when deleting SRv6 functions

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic` 17334/head
Carmine Scarpitta [Sun, 3 Nov 2024 07:45:03 +0000 (08:45 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:44:41 +0000 (08:44 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:44:23 +0000 (08:44 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:55 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:38 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:43:17 +0000 (08:43 +0100)]
zebra: Fix wrong debug macro in `release_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`
Carmine Scarpitta [Sun, 3 Nov 2024 07:42:58 +0000 (08:42 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_dynamic`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`
Carmine Scarpitta [Sun, 3 Nov 2024 07:42:36 +0000 (08:42 +0100)]
zebra: Fix wrong debug macro in `alloc_srv6_sid_func_explicit`

`ZEBRA_DEBUG_SRV6` is not the correct macro to evaluate if SRv6 debug is enabled or not.

The correct macro is `IS_ZEBRA_DEBUG_SRV6`.

Fix this by replacing `ZEBRA_DEBUG_SRV6` with `IS_ZEBRA_DEBUG_SRV6`.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling SRv6 formats command 17333/head
Carmine Scarpitta [Sun, 3 Nov 2024 06:51:04 +0000 (07:51 +0100)]
doc: Fix misspelling SRv6 formats command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling locator format command
Carmine Scarpitta [Sun, 3 Nov 2024 06:50:11 +0000 (07:50 +0100)]
doc: Fix misspelling locator format command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling behavior usid command
Carmine Scarpitta [Sun, 3 Nov 2024 06:49:06 +0000 (07:49 +0100)]
doc: Fix misspelling behavior usid command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agodoc: Fix misspelling locator prefix command
Carmine Scarpitta [Sun, 3 Nov 2024 06:48:44 +0000 (07:48 +0100)]
doc: Fix misspelling locator prefix command

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
5 months agozebra: Delay some processing until after startup is finished 16960/head
Donald Sharp [Mon, 30 Sep 2024 16:41:06 +0000 (12:41 -0400)]
zebra: Delay some processing until after startup is finished

Currently zebra starts the graceful restart timer as well as
allows connections from clients before all data is read in
from the kernel as well as the possiblity of allowing client
connections before this happens as well.

Let's move the graceful restart timer start till after this is
done as well as not allowing client connections till then as well.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
5 months agotests: Remove unnecessary fields from expected JSON 17332/head
Nathan Bahr [Fri, 1 Nov 2024 16:46:41 +0000 (16:46 +0000)]
tests: Remove unnecessary fields from expected JSON

Signed-off-by: Nathan Bahr <nbahr@atcorp.com>
5 months agoMerge pull request #17312 from donaldsharp/remove_in6addr_cmp
Donatas Abraitis [Fri, 1 Nov 2024 16:06:04 +0000 (18:06 +0200)]
Merge pull request #17312 from donaldsharp/remove_in6addr_cmp

Remove in6addr cmp

5 months agoMerge pull request #17280 from donaldsharp/remove_event_master_free_unused
Donatas Abraitis [Fri, 1 Nov 2024 16:03:44 +0000 (18:03 +0200)]
Merge pull request #17280 from donaldsharp/remove_event_master_free_unused

Remove event master free unused

5 months agoMerge pull request #17194 from LabNConsulting/aceelindem/ospf-ls-refresh-interval-fix
Russ White [Fri, 1 Nov 2024 15:37:32 +0000 (11:37 -0400)]
Merge pull request #17194 from LabNConsulting/aceelindem/ospf-ls-refresh-interval-fix

ospfd: Fix opaque LSA refresh interval and modify LSA cmds.

5 months agotest: add test case for kernel blackhole routes 17326/head
anlan_cs [Fri, 1 Nov 2024 07:16:09 +0000 (15:16 +0800)]
test: add test case for kernel blackhole routes

The test verifies that a kernel blackhole route is not affected by
interface's link change.

Signed-off-by: anlan_cs <anlan_cs@126.com>