Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zebra: Kernel routes are not updated properly in zebra RIB / nhg nexthop check is wrong #13561 #17045

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DennyAgussy
Copy link

Kernel routes are not updated properly in zebra RIB / nhg nexthop check is wrong: #13561

Introduction:
Zebra is not restoring the routes properly as mentioned in the bug-13561. When we do flush on an interface having the default route, zebra is still advertising the default route which it shouldn't. As we flush the interface the default route should unadvertised in vtysh -c "show ip route".

Implementation details:
To overcome this issue we have added a check. Which helps in checking whether the interface has at least one connected route. If the interface has a connected route then it will skip the intermediate checks and go directly to "skip_check: ". With this check in place everything is working - where default route is being unadvertised in vtysh -c "show ip route".

Necessary unit testing and topotests have been done.

Thanks
Denny Agussy
Nandini D

Signed-off-by: DennyAgussy <gkruparaju@msystechnologies.com>
@donaldsharp
Copy link
Member

put the discussion in the actual commit message then we can look at this. I'm pretty dubious about making this chagne as that I believe it would break some onlink routes

@@ -2648,7 +2648,7 @@ static unsigned nexthop_active_check(struct route_node *rn,

ifp = if_lookup_by_index(nexthop->ifindex, nexthop->vrf_id);

if (ifp && ifp->vrf->vrf_id == vrf_id && if_is_up(ifp)) {
if (ifp && ifp->vrf->vrf_id == vrf_id && if_is_up(ifp) && if_connected_count(ifp->connected)) {
SET_FLAG(nexthop->flags, NEXTHOP_FLAG_ACTIVE);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if it is enough. what happens if, for a given ipv4 route, you remove all ipv4 addresses, knowing that you have 1 ipv6 address left? or the opposite for a given ipv6 route.

should not we involve the 'v6-with-v4-nexthop' flag into this control too ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? The kernel is telling us that it has a valid route. What does it matter that there are any addresses on the interface? I can have a route without any addresses on an interface especially with a onlink attribute

@DennyAgussy DennyAgussy changed the title zebra: Handle routes appropriately zebra: Kernel routes are not updated properly in zebra RIB / nhg nexthop check is wrong #13561 Oct 15, 2024
@DennyAgussy
Copy link
Author

DennyAgussy commented Nov 1, 2024

put the discussion in the actual commit message then we can look at this. I'm pretty dubious about making this chagne as that I believe it would break some onlink routes

@donaldsharp

### I have tested whether ONLINK routes will get break with the fix and master branch with two scenarios mentioned below and also let's know if we have include any additional cases :

  1. Scenario 1(When we have an IP and the nexthop is onlink)
  2. Scenario 2(When interface has no IP and next-hop is onlink)

Tested on Master-branch(56495a8):
When tested on master we noticed in scenario 1 there is a misbehavior. When we have IP on an interface and the nexthop is ONLINK and we flush the addresses on the interface. IP’s removal implies that there is no more direct path or interface for the route to anchor on.

Config:

  • ip addr add 11.11.11.2/24 dev eth1
  • ip link set dev eth1 up
  • ip route add 192.168.2.0/24 via 11.11.11.1 dev eth1 onlink
  • ip route
    default via 172.17.0.1 dev eth0
    11.11.11.0/24 dev eth1 proto kernel scope link src 11.11.11.2
    172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
    192.168.2.0/24 via 11.11.11.1 dev eth1 onlink
  • vtysh -c "show ip route"
    K>* 0.0.0.0/0 [0/0] via 172.17.0.1, eth0, weight 1, 00:18:03
    C>* 11.11.11.0/24 is directly connected, eth1, weight 1, 00:00:18
    L>* 11.11.11.2/32 is directly connected, eth1, weight 1, 00:00:18
    C>* 172.17.0.0/16 is directly connected, eth0, weight 1, 00:18:03
    L>* 172.17.0.4/32 is directly connected, eth0, weight 1, 00:18:03
    K>* 192.168.2.0/24 [0/0] via 11.11.11.1, eth1 onlink, weight 1, 00:00:18
  • ip addr flush dev eth1
  • ip route
    default via 172.17.0.1 dev eth0
    172.17.0.0/16 dev eth0 proto kernel scope link src 172.17.0.4
  • vtysh -c "show ip route"
    K>* 0.0.0.0/0 [0/0] via 172.17.0.1, eth0, weight 1, 00:20:34
    C>* 172.17.0.0/16 is directly connected, eth0, weight 1, 00:20:34
    L>* 172.17.0.4/32 is directly connected, eth0, weight 1, 00:20:34
    K>* 192.168.2.0/24 [0/0] via 11.11.11.1, eth1 onlink, weight 1, 00:02:49

Is this a bug scenario?

Logs after flush:

2024/10/31 13:30:18 ZEBRA: [KMXEB-K771Y] netlink_parse_info: netlink-dp-in (NS 0) type RTM_DELADDR(21), len=80, seq=1730381420, pid=176
2024/10/31 13:30:18 ZEBRA: [RGWF1-EHXT1] netlink_interface_addr_dplane: RTM_DELADDR nsid 0 ifindex 47 flags 0x80:
2024/10/31 13:30:18 ZEBRA: [XMC8C-4ZFJ9]   IFA_LOCAL     11.11.11.2/24
2024/10/31 13:30:18 ZEBRA: [ME3M2-X6YT9]   IFA_ADDRESS   11.11.11.2/24
2024/10/31 13:30:18 ZEBRA: [Y9HR3-XD5TG]   IFA_LABEL     eth1
2024/10/31 13:30:18 ZEBRA: [P2VPT-508WP]   IFA_CACHEINFO pref -1, valid -1
2024/10/31 13:30:18 ZEBRA: [KMXEB-K771Y] netlink_parse_info: netlink-listen (NS 0) type RTM_DELROUTE(25), len=60, seq=0, pid=0
2024/10/31 13:30:18 ZEBRA: [SKNFJ-G938V] RTM_DELROUTE ipv4 unicast proto kernel NS 0
2024/10/31 13:30:18 ZEBRA: [K2A4T-TS83H] RTM_DELROUTE 11.11.11.0/24 vrf default(0) table_id: 254 metric: 0 Admin Distance: 0
2024/10/31 13:30:18 ZEBRA: [KM97R-CRJ8Y] Route 11.11.11.0/24(default) (delete) queued for processing into sub-queue Early Route Processing
2024/10/31 13:30:18 ZEBRA: [KMXEB-K771Y] netlink_parse_info: netlink-listen (NS 0) type RTM_DELROUTE(25), len=60, seq=0, pid=0
2024/10/31 13:30:18 ZEBRA: [SKNFJ-G938V] RTM_DELROUTE ipv4 broadcast proto kernel NS 0
2024/10/31 13:30:18 ZEBRA: [J3J81-V75NW] Route rtm_type: broadcast(3) intentionally ignoring
2024/10/31 13:30:18 ZEBRA: [KMXEB-K771Y] netlink_parse_info: netlink-listen (NS 0) type RTM_DELROUTE(25), len=60, seq=0, pid=0
2024/10/31 13:30:18 ZEBRA: [SKNFJ-G938V] RTM_DELROUTE ipv4 local proto kernel NS 0
2024/10/31 13:30:18 ZEBRA: [J3J81-V75NW] Route rtm_type: local(2) intentionally ignoring
2024/10/31 13:30:18 ZEBRA: [K8FXY-V65ZJ] Intf dplane ctx 0x7f39e0027100, op INTF_ADDR_DEL, ifindex (47), result QUEUED
2024/10/31 13:30:18 ZEBRA: [MZPZA-W042K] zebra_if_addr_update_ctx: INTF_ADDR_DEL: ifindex eth1(47), addr 11.11.11.2/24
2024/10/31 13:30:18 ZEBRA: [XN0NB-2NSYE] MESSAGE: ZEBRA_INTERFACE_ADDRESS_DELETE 11.11.11.2/24 on eth1 vrf default(0)
2024/10/31 13:30:18 ZEBRA: [KM97R-CRJ8Y] Route 11.11.11.0/24(default) (delete) queued for processing into sub-queue Early Route Processing
2024/10/31 13:30:18 ZEBRA: [KM97R-CRJ8Y] Route 11.11.11.0/24(default) (delete) queued for processing into sub-queue Early Route Processing
2024/10/31 13:30:18 ZEBRA: [KM97R-CRJ8Y] Route 11.11.11.2/32(default) (delete) queued for processing into sub-queue Early Route Processing
2024/10/31 13:30:18 ZEBRA: [KM97R-CRJ8Y] Route 11.11.11.2/32(default) (delete) queued for processing into sub-queue Early Route Processing
2024/10/31 13:30:18 ZEBRA: [QQWTF-ZKJDD] rib_update: Scheduled VRF (ALL), event RIB_UPDATE_KERNEL
2024/10/31 13:30:18 ZEBRA: [M8JMF-J6PZV] rib_update_handle_vrf_all: Handling VRF (ALL) event RIB_UPDATE_KERNEL
2024/10/31 13:30:18 ZEBRA: [QR5K4-A1079] rib_update_table: IPv4 VRF default Table 254 event RIB_UPDATE_KERNEL Route type: wildcard
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):0.0.0.0/0: queued rn 0x5561a6217e60 into sub-queue Kernel Routes
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):192.168.2.0/24: queued rn 0x5561a6339b20 into sub-queue Kernel Routes
2024/10/31 13:30:18 ZEBRA: [QR5K4-A1079] rib_update_table: IPv4 VRF default Table 254 event RIB_UPDATE_KERNEL Route type: wildcard
2024/10/31 13:30:18 ZEBRA: [QR5K4-A1079] rib_update_table: IPv6 VRF default Table 254 event RIB_UPDATE_KERNEL Route type: wildcard
2024/10/31 13:30:18 ZEBRA: [QR5K4-A1079] rib_update_table: IPv6 VRF default Table 254 event RIB_UPDATE_KERNEL Route type: wildcard
2024/10/31 13:30:18 ZEBRA: [HTVTP-7ZG8C] process_subq_early_route_delete: (default:254):11.11.11.0/24: via 0.0.0.0 ifindex 47 type 1 doesn't exist in rib
2024/10/31 13:30:18 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a63385a0 (0[]), refcnt 0, NH directly connected, eth1
2024/10/31 13:30:18 ZEBRA: [HA0PY-0J478] rib_delnode: (default:254):11.11.11.0/24: rn 0x5561a63394a0, re 0x5561a633a240, removing
2024/10/31 13:30:18 ZEBRA: [Q4T2G-E2SQF] rib_delnode: dumping RE entry 0x5561a633a240 for 11.11.11.0/24 vrf default(0)
2024/10/31 13:30:18 ZEBRA: [K32P5-SH2K9] 11.11.11.0/24(default): uptime == 189390, type == 2, instance == 0, table == 254
2024/10/31 13:30:18 ZEBRA: [GQ29C-F43AX] 11.11.11.0/24(default): metric == 0, mtu == 0, distance == 0, flags == Selected status == Installed 
2024/10/31 13:30:18 ZEBRA: [R84HW-Y2BKD] 11.11.11.0/24(default): tag == 0, nexthop_num == 1, nexthop_active_num == 1
2024/10/31 13:30:18 ZEBRA: [PCMVY-A1F4N] 11.11.11.0/24(default): NH eth1[47] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:18 ZEBRA: [VHS8D-STZWZ] 11.11.11.0/24(default): dump complete
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):11.11.11.0/24: queued rn 0x5561a63394a0 into sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a6339010 (0[]), refcnt 0, NH directly connected, eth1
2024/10/31 13:30:18 ZEBRA: [HA0PY-0J478] rib_delnode: (default:254):11.11.11.0/24 (MRIB): rn 0x5561a6311790, re 0x5561a633a150, removing
2024/10/31 13:30:18 ZEBRA: [Q4T2G-E2SQF] rib_delnode: dumping RE entry 0x5561a633a150 for 11.11.11.0/24 vrf default(0)
2024/10/31 13:30:18 ZEBRA: [K32P5-SH2K9] 11.11.11.0/24(default): uptime == 189390, type == 2, instance == 0, table == 254
2024/10/31 13:30:18 ZEBRA: [GQ29C-F43AX] 11.11.11.0/24(default): metric == 0, mtu == 0, distance == 0, flags == Selected status == Installed 
2024/10/31 13:30:18 ZEBRA: [R84HW-Y2BKD] 11.11.11.0/24(default): tag == 0, nexthop_num == 1, nexthop_active_num == 1
2024/10/31 13:30:18 ZEBRA: [PCMVY-A1F4N] 11.11.11.0/24(default): NH eth1[47] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:18 ZEBRA: [VHS8D-STZWZ] 11.11.11.0/24(default): dump complete
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):11.11.11.0/24 (MRIB): queued rn 0x5561a6311790 into sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a6375070 (0[]), refcnt 0, NH directly connected, eth1
2024/10/31 13:30:18 ZEBRA: [HA0PY-0J478] rib_delnode: (default:254):11.11.11.2/32: rn 0x5561a6339700, re 0x5561a62444a0, removing
2024/10/31 13:30:18 ZEBRA: [Q4T2G-E2SQF] rib_delnode: dumping RE entry 0x5561a62444a0 for 11.11.11.2/32 vrf default(0)
2024/10/31 13:30:18 ZEBRA: [K32P5-SH2K9] 11.11.11.2/32(default): uptime == 189390, type == 3, instance == 0, table == 254
2024/10/31 13:30:18 ZEBRA: [GQ29C-F43AX] 11.11.11.2/32(default): metric == 0, mtu == 0, distance == 0, flags == Selected status == Installed 
2024/10/31 13:30:18 ZEBRA: [R84HW-Y2BKD] 11.11.11.2/32(default): tag == 0, nexthop_num == 1, nexthop_active_num == 1
2024/10/31 13:30:18 ZEBRA: [PCMVY-A1F4N] 11.11.11.2/32(default): NH eth1[47] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:18 ZEBRA: [VHS8D-STZWZ] 11.11.11.2/32(default): dump complete
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):11.11.11.2/32: queued rn 0x5561a6339700 into sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a6339e80 (0[]), refcnt 0, NH directly connected, eth1
2024/10/31 13:30:18 ZEBRA: [HA0PY-0J478] rib_delnode: (default:254):11.11.11.2/32 (MRIB): rn 0x5561a6339930, re 0x5561a633c0f0, removing
2024/10/31 13:30:18 ZEBRA: [Q4T2G-E2SQF] rib_delnode: dumping RE entry 0x5561a633c0f0 for 11.11.11.2/32 vrf default(0)
2024/10/31 13:30:18 ZEBRA: [K32P5-SH2K9] 11.11.11.2/32(default): uptime == 189390, type == 3, instance == 0, table == 254
2024/10/31 13:30:18 ZEBRA: [GQ29C-F43AX] 11.11.11.2/32(default): metric == 0, mtu == 0, distance == 0, flags == Selected status == Installed 
2024/10/31 13:30:18 ZEBRA: [R84HW-Y2BKD] 11.11.11.2/32(default): tag == 0, nexthop_num == 1, nexthop_active_num == 1
2024/10/31 13:30:18 ZEBRA: [PCMVY-A1F4N] 11.11.11.2/32(default): NH eth1[47] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:18 ZEBRA: [VHS8D-STZWZ] 11.11.11.2/32(default): dump complete
2024/10/31 13:30:18 ZEBRA: [SYXBT-ZPEFC] rib_meta_queue_add: (default:254):11.11.11.2/32 (MRIB): queued rn 0x5561a6339930 into sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a633a310 (0[]), refcnt 0, NH directly connected, eth1
2024/10/31 13:30:18 ZEBRA: [WYX2S-4PN9G] default(0:254:1):11.11.11.0/24: Processing rn 0x5561a63394a0
2024/10/31 13:30:18 ZEBRA: [KJ5DQ-3PGDB] default(0:254:1):11.11.11.0/24: Examine re 0x5561a633a240 (connected) status: Removed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:18 ZEBRA: [P9ZB1-6NJZM] default(0:254:1):11.11.11.0/24: After processing: old_selected 0x5561a633a240 new_selected 0x0 old_fib 0x5561a633a240 new_fib 0x0
2024/10/31 13:30:18 ZEBRA: [X8377-PYAKV] (default:254):11.11.11.0/24: Redist del: re 0x5561a633a240 (0:connected), new re 0x0 (0:None)
2024/10/31 13:30:18 ZEBRA: [S59C1-4C5PP] default(0:254):11.11.11.0/24: Deleting route rn 0x5561a63394a0, re 0x5561a633a240 (connected)
2024/10/31 13:30:18 ZEBRA: [HZ7BM-3P3HS] rib_process: (default:254):11.11.11.0/24: rn 0x5561a63394a0, removing re 0x5561a633a240
2024/10/31 13:30:18 ZEBRA: [XDKQQ-BJZ0M] rib_unlink: (default:254):11.11.11.0/24: rn 0x5561a63394a0, re 0x5561a633a240
2024/10/31 13:30:18 ZEBRA: [WDEB1-93HCZ] zebra_nhg_decrement_ref: nhe 0x5561a6339ba0 (11[if 47 vrfid 0]) 4 => 3
2024/10/31 13:30:18 ZEBRA: [J1MXG-0722F] rib_gc_dest: (default:?):11.11.11.0/24: removing dest from table
2024/10/31 13:30:18 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.0/24 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:18 ZEBRA: [N744R-XB3J9] 11.11.11.0/24 has no tracking NHTs. Bailing
2024/10/31 13:30:18 ZEBRA: [HH6N2-PDCJS] default(0:0):11.11.11.0/24 rn 0x5561a63394a0 dequeued from sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [WYX2S-4PN9G] default(0:254:2):11.11.11.0/24: Processing rn 0x5561a6311790
2024/10/31 13:30:18 ZEBRA: [KJ5DQ-3PGDB] default(0:254:2):11.11.11.0/24: Examine re 0x5561a633a150 (connected) status: Removed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:18 ZEBRA: [P9ZB1-6NJZM] default(0:254:2):11.11.11.0/24: After processing: old_selected 0x5561a633a150 new_selected 0x0 old_fib 0x5561a633a150 new_fib 0x0
2024/10/31 13:30:18 ZEBRA: [X8377-PYAKV] (default:254):11.11.11.0/24: Redist del: re 0x5561a633a150 (0:connected), new re 0x0 (0:None)
2024/10/31 13:30:18 ZEBRA: [S59C1-4C5PP] default(0:254):11.11.11.0/24: Deleting route rn 0x5561a6311790, re 0x5561a633a150 (connected)
2024/10/31 13:30:18 ZEBRA: [HZ7BM-3P3HS] rib_process: (default:254):11.11.11.0/24 (MRIB): rn 0x5561a6311790, removing re 0x5561a633a150
2024/10/31 13:30:18 ZEBRA: [XDKQQ-BJZ0M] rib_unlink: (default:254):11.11.11.0/24 (MRIB): rn 0x5561a6311790, re 0x5561a633a150
2024/10/31 13:30:18 ZEBRA: [WDEB1-93HCZ] zebra_nhg_decrement_ref: nhe 0x5561a6339ba0 (11[if 47 vrfid 0]) 3 => 2
2024/10/31 13:30:18 ZEBRA: [J1MXG-0722F] rib_gc_dest: (default:?):11.11.11.0/24 (MRIB): removing dest from table
2024/10/31 13:30:18 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.0/24 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:18 ZEBRA: [N744R-XB3J9] 11.11.11.0/24 has no tracking NHTs. Bailing
2024/10/31 13:30:18 ZEBRA: [HH6N2-PDCJS] default(0:0):11.11.11.0/24 rn 0x5561a6311790 dequeued from sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [WYX2S-4PN9G] default(0:254:1):11.11.11.2/32: Processing rn 0x5561a6339700
2024/10/31 13:30:18 ZEBRA: [KJ5DQ-3PGDB] default(0:254:1):11.11.11.2/32: Examine re 0x5561a62444a0 (local) status: Removed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:18 ZEBRA: [P9ZB1-6NJZM] default(0:254:1):11.11.11.2/32: After processing: old_selected 0x5561a62444a0 new_selected 0x0 old_fib 0x5561a62444a0 new_fib 0x0
2024/10/31 13:30:18 ZEBRA: [X8377-PYAKV] (default:254):11.11.11.2/32: Redist del: re 0x5561a62444a0 (0:local), new re 0x0 (0:None)
2024/10/31 13:30:18 ZEBRA: [S59C1-4C5PP] default(0:254):11.11.11.2/32: Deleting route rn 0x5561a6339700, re 0x5561a62444a0 (local)
2024/10/31 13:30:18 ZEBRA: [HZ7BM-3P3HS] rib_process: (default:254):11.11.11.2/32: rn 0x5561a6339700, removing re 0x5561a62444a0
2024/10/31 13:30:18 ZEBRA: [XDKQQ-BJZ0M] rib_unlink: (default:254):11.11.11.2/32: rn 0x5561a6339700, re 0x5561a62444a0
2024/10/31 13:30:18 ZEBRA: [WDEB1-93HCZ] zebra_nhg_decrement_ref: nhe 0x5561a6339ba0 (11[if 47 vrfid 0]) 2 => 1
2024/10/31 13:30:18 ZEBRA: [J1MXG-0722F] rib_gc_dest: (default:?):11.11.11.2/32: removing dest from table
2024/10/31 13:30:18 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.2/32 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:18 ZEBRA: [N744R-XB3J9] 11.11.11.2/32 has no tracking NHTs. Bailing
2024/10/31 13:30:18 ZEBRA: [HH6N2-PDCJS] default(0:0):11.11.11.2/32 rn 0x5561a6339700 dequeued from sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [WYX2S-4PN9G] default(0:254:2):11.11.11.2/32: Processing rn 0x5561a6339930
2024/10/31 13:30:18 ZEBRA: [KJ5DQ-3PGDB] default(0:254:2):11.11.11.2/32: Examine re 0x5561a633c0f0 (local) status: Removed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:18 ZEBRA: [P9ZB1-6NJZM] default(0:254:2):11.11.11.2/32: After processing: old_selected 0x5561a633c0f0 new_selected 0x0 old_fib 0x5561a633c0f0 new_fib 0x0
2024/10/31 13:30:18 ZEBRA: [X8377-PYAKV] (default:254):11.11.11.2/32: Redist del: re 0x5561a633c0f0 (0:local), new re 0x0 (0:None)
2024/10/31 13:30:18 ZEBRA: [S59C1-4C5PP] default(0:254):11.11.11.2/32: Deleting route rn 0x5561a6339930, re 0x5561a633c0f0 (local)
2024/10/31 13:30:18 ZEBRA: [HZ7BM-3P3HS] rib_process: (default:254):11.11.11.2/32 (MRIB): rn 0x5561a6339930, removing re 0x5561a633c0f0
2024/10/31 13:30:18 ZEBRA: [XDKQQ-BJZ0M] rib_unlink: (default:254):11.11.11.2/32 (MRIB): rn 0x5561a6339930, re 0x5561a633c0f0
2024/10/31 13:30:18 ZEBRA: [WDEB1-93HCZ] zebra_nhg_decrement_ref: nhe 0x5561a6339ba0 (11[if 47 vrfid 0]) 1 => 0
2024/10/31 13:30:18 ZEBRA: [J1MXG-0722F] rib_gc_dest: (default:?):11.11.11.2/32 (MRIB): removing dest from table
2024/10/31 13:30:18 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.2/32 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:18 ZEBRA: [N744R-XB3J9] 11.11.11.2/32 has no tracking NHTs. Bailing
2024/10/31 13:30:18 ZEBRA: [HH6N2-PDCJS] default(0:0):11.11.11.2/32 rn 0x5561a6339930 dequeued from sub-queue Connected Routes
2024/10/31 13:30:18 ZEBRA: [WYX2S-4PN9G] default(0:254:1):0.0.0.0/0: Processing rn 0x5561a6217e60
2024/10/31 13:30:18 ZEBRA: [KJ5DQ-3PGDB] default(0:254:1):0.0.0.0/0: Examine re 0x5561a63384d0 (kernel) status: Changed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:18 ZEBRA: [VTD0C-NR53W] nexthop_active_update: re 0x5561a63384d0 nhe 0x5561a633bc90 (7[172.17.0.1 if 45 vrfid 0]), curr_nhe 0x5561a633a150
2024/10/31 13:30:18 ZEBRA: [T9JWA-N8HM5] nexthop_active_check: re 0x5561a63384d0, nexthop 172.17.0.1, via eth0
2024/10/31 13:30:51 ZEBRA: [ZG85Y-SBJH3] nexthop_active_update: re 0x5561a63384d0 curr_active 1
2024/10/31 13:30:51 ZEBRA: [WEXBA-A02TB] zebra_nhe_find: id 0, lookup 0x5561a633a150, vrf 0, type 29, depends 0x0 => Found 0x5561a633bc90(7[172.17.0.1 if 45 vrfid 0])
2024/10/31 13:30:51 ZEBRA: [MGYCQ-XGZST] zebra_nhg_rib_find_nhe: rt_nhe 0x5561a633a150(0[]) => nhe 0x5561a633bc90(7[172.17.0.1 if 45 vrfid 0])
2024/10/31 13:30:51 ZEBRA: [ZH3FQ-TE9NV] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 new id: 7 old id: 7
2024/10/31 13:30:51 ZEBRA: [N13TA-PJWZX] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 NEW
2024/10/31 13:30:51 ZEBRA: [PCMVY-A1F4N] 0.0.0.0/0(default): NH 172.17.0.1[45] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:51 ZEBRA: [PZXWJ-T5FBT] zebra_nhg_rib_compare_old_nhe: 0.0.0.0/0 OLD
2024/10/31 13:30:51 ZEBRA: [PCMVY-A1F4N] 0.0.0.0/0(default): NH 172.17.0.1[45] vrf default(0) wgt 1, with flags ACTIVE FIB 
2024/10/31 13:30:51 ZEBRA: [JP70Y-8F42W] zebra_nhg_nexthop_compare: 0.0.0.0/0 Comparing via 172.17.0.1, eth0(3) to old: via 172.17.0.1, eth0(3)
2024/10/31 13:30:51 ZEBRA: [KHC3S-GTA7G] zebra_nhg_nexthop_compare: 0.0.0.0/0 New and old are same, continuing search
2024/10/31 13:30:51 ZEBRA: [TA11D-70QSK] zebra_nhg_rib_compare_old_nhe:0.0.0.0/0 They are the same, using the old nhg entry
2024/10/31 13:30:51 ZEBRA: [J6P4K-BSDDN] nexthop_active_update: re 0x5561a63384d0 CHANGED: nhe 0x5561a633bc90 (7[172.17.0.1 if 45 vrfid 0]) => new_nhe 0x5561a633bc90 (7[172.17.0.1 if 45 vrfid 0])
2024/10/31 13:30:51 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a633a150 (0[]), refcnt 0, NH 172.17.0.1, via eth0
2024/10/31 13:30:51 ZEBRA: [P9ZB1-6NJZM] default(0:254:1):0.0.0.0/0: After processing: old_selected 0x5561a63384d0 new_selected 0x5561a63384d0 old_fib 0x5561a63384d0 new_fib 0x5561a63384d0
2024/10/31 13:30:51 ZEBRA: [X2YHK-SWH93] default(0:254):0.0.0.0/0: Updating route rn 0x5561a6217e60, re 0x5561a63384d0 (kernel)
2024/10/31 13:30:51 ZEBRA: [PJXNX-HZST8] zebra_nhg_install_kernel: valid flag set for nh 7[172.17.0.1 if 45 vrfid 0]
2024/10/31 13:30:51 ZEBRA: [HH6N2-PDCJS] default(0:254):0.0.0.0/0 rn 0x5561a6217e60 dequeued from sub-queue Kernel Routes
2024/10/31 13:30:51 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: connected about prefix 11.11.11.0/24(254) 3 vrf: default
2024/10/31 13:30:51 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.0/24 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:51 ZEBRA: [N744R-XB3J9] 11.11.11.0/24 has no tracking NHTs. Bailing
2024/10/31 13:30:51 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: connected about prefix 11.11.11.0/24(254) 3 vrf: default
2024/10/31 13:30:51 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.0/24 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:51 ZEBRA: [N744R-XB3J9] 11.11.11.0/24 has no tracking NHTs. Bailing
2024/10/31 13:30:51 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: local about prefix 11.11.11.2/32(254) 3 vrf: default
2024/10/31 13:30:51 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.2/32 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:51 ZEBRA: [N744R-XB3J9] 11.11.11.2/32 has no tracking NHTs. Bailing
2024/10/31 13:30:51 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: local about prefix 11.11.11.2/32(254) 3 vrf: default
2024/10/31 13:30:51 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 11.11.11.2/32 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:51 ZEBRA: [N744R-XB3J9] 11.11.11.2/32 has no tracking NHTs. Bailing
2024/10/31 13:30:51 ZEBRA: [GHWHS-ZKQM5] update_from_ctx: default(0:254):0.0.0.0/0: SELECTED, re 0x5561a63384d0
2024/10/31 13:30:51 ZEBRA: [TS3SH-1276M] default(0:254):0.0.0.0/0 update_from_ctx(): no fib nhg
2024/10/31 13:30:51 ZEBRA: [HKQXC-4STSK] default(0:254):0.0.0.0/0 update_from_ctx(): rib nhg matched, changed 'false'
2024/10/31 13:30:51 ZEBRA: [Z1MP1-RFGJA] (0:254):0.0.0.0/0(0): Redist update re 0x5561a63384d0 (kernel), old 0x5561a63384d0 (kernel)
2024/10/31 13:30:51 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: kernel about prefix 0.0.0.0/0(254) 2 vrf: default
2024/10/31 13:30:51 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 0.0.0.0/0 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:30:51 ZEBRA: [WYX2S-4PN9G] default(0:254:1):192.168.2.0/24: Processing rn 0x5561a6339b20
2024/10/31 13:30:51 ZEBRA: [KJ5DQ-3PGDB] default(0:254:1):192.168.2.0/24: Examine re 0x5561a6338c90 (kernel) status: Changed Installed flags: Selected dist 0 metric 0
2024/10/31 13:30:51 ZEBRA: [VTD0C-NR53W] nexthop_active_update: re 0x5561a6338c90 nhe 0x5561a63395c0 (8[11.11.11.1 if 47 vrfid 0]), curr_nhe 0x5561a63383d0
2024/10/31 13:30:51 ZEBRA: [T9JWA-N8HM5] nexthop_active_check: re 0x5561a6338c90, nexthop 11.11.11.1, via eth1
2024/10/31 13:31:05 ZEBRA: [ZG85Y-SBJH3] nexthop_active_update: re 0x5561a6338c90 curr_active 1
2024/10/31 13:31:05 ZEBRA: [WEXBA-A02TB] zebra_nhe_find: id 0, lookup 0x5561a63383d0, vrf 0, type 29, depends 0x0 => Found 0x5561a63395c0(8[11.11.11.1 if 47 vrfid 0])
2024/10/31 13:31:05 ZEBRA: [MGYCQ-XGZST] zebra_nhg_rib_find_nhe: rt_nhe 0x5561a63383d0(0[]) => nhe 0x5561a63395c0(8[11.11.11.1 if 47 vrfid 0])
2024/10/31 13:31:05 ZEBRA: [ZH3FQ-TE9NV] zebra_nhg_rib_compare_old_nhe: 192.168.2.0/24 new id: 8 old id: 8
2024/10/31 13:31:05 ZEBRA: [N13TA-PJWZX] zebra_nhg_rib_compare_old_nhe: 192.168.2.0/24 NEW
2024/10/31 13:31:05 ZEBRA: [PCMVY-A1F4N] 192.168.2.0/24(default): NH 11.11.11.1[47] vrf default(0) wgt 1, with flags ACTIVE FIB ONLINK 
2024/10/31 13:31:05 ZEBRA: [PZXWJ-T5FBT] zebra_nhg_rib_compare_old_nhe: 192.168.2.0/24 OLD
2024/10/31 13:31:05 ZEBRA: [PCMVY-A1F4N] 192.168.2.0/24(default): NH 11.11.11.1[47] vrf default(0) wgt 1, with flags ACTIVE FIB ONLINK 
2024/10/31 13:31:05 ZEBRA: [JP70Y-8F42W] zebra_nhg_nexthop_compare: 192.168.2.0/24 Comparing via 11.11.11.1, eth1(11) to old: via 11.11.11.1, eth1(11)
2024/10/31 13:31:05 ZEBRA: [KHC3S-GTA7G] zebra_nhg_nexthop_compare: 192.168.2.0/24 New and old are same, continuing search
2024/10/31 13:31:05 ZEBRA: [TA11D-70QSK] zebra_nhg_rib_compare_old_nhe:192.168.2.0/24 They are the same, using the old nhg entry
2024/10/31 13:31:05 ZEBRA: [J6P4K-BSDDN] nexthop_active_update: re 0x5561a6338c90 CHANGED: nhe 0x5561a63395c0 (8[11.11.11.1 if 47 vrfid 0]) => new_nhe 0x5561a63395c0 (8[11.11.11.1 if 47 vrfid 0])
2024/10/31 13:31:05 ZEBRA: [VKWCR-QB19H] zebra_nhg_free: nhe 0x5561a63383d0 (0[]), refcnt 0, NH 11.11.11.1, via eth1
2024/10/31 13:31:05 ZEBRA: [P9ZB1-6NJZM] default(0:254:1):192.168.2.0/24: After processing: old_selected 0x5561a6338c90 new_selected 0x5561a6338c90 old_fib 0x5561a6338c90 new_fib 0x5561a6338c90
2024/10/31 13:31:05 ZEBRA: [X2YHK-SWH93] default(0:254):192.168.2.0/24: Updating route rn 0x5561a6339b20, re 0x5561a6338c90 (kernel)
2024/10/31 13:31:05 ZEBRA: [PJXNX-HZST8] zebra_nhg_install_kernel: valid flag set for nh 8[11.11.11.1 if 47 vrfid 0]
2024/10/31 13:31:05 ZEBRA: [HH6N2-PDCJS] default(0:254):192.168.2.0/24 rn 0x5561a6339b20 dequeued from sub-queue Kernel Routes
2024/10/31 13:31:05 ZEBRA: [GHWHS-ZKQM5] update_from_ctx: default(0:254):192.168.2.0/24: SELECTED, re 0x5561a6338c90
2024/10/31 13:31:05 ZEBRA: [TS3SH-1276M] default(0:254):192.168.2.0/24 update_from_ctx(): no fib nhg
2024/10/31 13:31:05 ZEBRA: [HKQXC-4STSK] default(0:254):192.168.2.0/24 update_from_ctx(): rib nhg matched, changed 'false'
2024/10/31 13:31:05 ZEBRA: [Z1MP1-RFGJA] (0:254):192.168.2.0/24(0): Redist update re 0x5561a6338c90 (kernel), old 0x5561a6338c90 (kernel)
2024/10/31 13:31:05 ZEBRA: [HJ9N6-4BMYX] Not Notifying Owner: kernel about prefix 192.168.2.0/24(254) 2 vrf: default
2024/10/31 13:31:05 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 192.168.2.0/24 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:31:05 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 128.0.0.0/1 Being examined for Nexthop Tracking Count: 0
2024/10/31 13:31:05 ZEBRA: [PS6CZ-GQDN1] zebra_rib_evaluate_rn_nexthops: 0.0.0.0/0 Being examined for Nexthop Tracking Count: 0

scenario 2 will of course works as expected.

On the branch we did fix:

We have tested the same two scenarios, the behavior is same as the Master branch(Not breaking any route in scenario 2). Also behaves the same in scenario 1.

Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants