mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-03 22:37:49 +00:00
![]() The rib_lookup_and_pushup function, from what I can tell, was used more when static route processing and connected routes were more closely integrated in zebra. The goal was when we were adding a new address to remove the connected route and then allow processing of the new address. With the re-org a few years ago to seperate out connected routes as well as static routes, I believe this is no longer needed. on BSD, without this code change we have this log: 2021/08/05 14:33:38 ZEBRA: [QEVVE-G3FQQ] rib_meta_queue_add: (0:0):10.40.30.0/24: queued rn 0x802022bb0 into sub-queue 4 2021/08/05 14:33:38 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 200 Type: RTM_DELETE 2021/08/05 14:33:38 ZEBRA: [V3NSB-BPKBD] Kernel: GATEWAY DONE PROTO1 2021/08/05 14:33:38 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 15 2021/08/05 14:33:38 ZEBRA: [MJD4M-0AAAR] Kernel: pid 53305, rtm_addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:33:38 ZEBRA: [Y9Y5K-JJ7NT] rtm_read: got rtm of type 2 (RTM_DELETE) addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:33:38 ZEBRA: [V17DT-1FJEN] kernel_rtm: 10.40.30.0/24: successfully did NH 9.8.6.7 2021/08/05 14:33:38 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 164 Type: RTM_NEWADDR 2021/08/05 14:33:38 ZEBRA: [V3NSB-BPKBD] Kernel: 2021/08/05 14:33:38 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 4664 2021/08/05 14:33:38 ZEBRA: [MJD4M-0AAAR] Kernel: pid 0, rtm_addrs {DST} 2021/08/05 14:33:38 ZEBRA: [M09CX-TKB4N] ifam_read_mesg: ifindex 1, ifname vtnet0, ifam_addrs {NETMASK,IFP,IFA,BRD}, ifam_flags 0x0, addr 10.40.30.1/24 broad 10.40.30.255 dst (unspec) gateway (unspec) 2021/08/05 14:33:38 ZEBRA: [MFYWV-KH3MC] rib_add_multipath_nhe: (0:0):10.40.30.0/24: Inserting route rn 0x802022bb0, re 0x8032973a0 (connected) existing 0x0, same_count 0 2021/08/05 14:33:38 ZEBRA: [Q4T2G-E2SQF] rib_add_multipath_nhe: dumping RE entry 0x8032973a0 for 10.40.30.0/24 vrf default(0) 2021/08/05 14:33:38 ZEBRA: [M5M58-9PD2R] 10.40.30.0/24: uptime == 1379355, type == 2, instance == 0, table == 0 2021/08/05 14:33:38 ZEBRA: [RVZMM-N7DME] 10.40.30.0/24: metric == 1, mtu == 0, distance == 0, flags == None status == None 2021/08/05 14:33:38 ZEBRA: [Q1NW5-NWY7P] 10.40.30.0/24: nexthop_num == 1, nexthop_active_num == 0 2021/08/05 14:33:38 ZEBRA: [TFHQ8-TC30H] 10.40.30.0/24: NH vtnet0[1] vrf default(0) with flags 2021/08/05 14:33:38 ZEBRA: [SCETK-GQ9E4] 10.40.30.0/24: dump complete 2021/08/05 14:33:38 ZEBRA: [QEVVE-G3FQQ] rib_meta_queue_add: (0:0):10.40.30.0/24: queued rn 0x802022bb0 into sub-queue 2 2021/08/05 14:33:38 ZEBRA: [MFYWV-KH3MC] rib_add_multipath_nhe: (0:?):10.40.30.0/24 (MRIB): Inserting route rn 0x802022f30, re 0x803297340 (connected) existing 0x0, same_count 0 2021/08/05 14:33:38 ZEBRA: [Q4T2G-E2SQF] rib_add_multipath_nhe: dumping RE entry 0x803297340 for 10.40.30.0/24 vrf default(0) 2021/08/05 14:33:38 ZEBRA: [M5M58-9PD2R] 10.40.30.0/24: uptime == 1379355, type == 2, instance == 0, table == 0 2021/08/05 14:33:38 ZEBRA: [RVZMM-N7DME] 10.40.30.0/24: metric == 1, mtu == 0, distance == 0, flags == None status == None 2021/08/05 14:33:38 ZEBRA: [Q1NW5-NWY7P] 10.40.30.0/24: nexthop_num == 1, nexthop_active_num == 0 2021/08/05 14:33:38 ZEBRA: [TFHQ8-TC30H] 10.40.30.0/24: NH vtnet0[1] vrf default(0) with flags 2021/08/05 14:33:38 ZEBRA: [SCETK-GQ9E4] 10.40.30.0/24: dump complete 2021/08/05 14:33:38 ZEBRA: [GCGMT-SQR82] rib_link: (0:?):10.40.30.0/24 (MRIB): rn 0x802022f30 adding dest 2021/08/05 14:33:38 ZEBRA: [QEVVE-G3FQQ] rib_meta_queue_add: (0:0):10.40.30.0/24 (MRIB): queued rn 0x802022f30 into sub-queue 2 2021/08/05 14:33:38 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 240 Type: RTM_ADD 2021/08/05 14:33:38 ZEBRA: [V3NSB-BPKBD] Kernel: UP PINNED 2021/08/05 14:33:38 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 0 2021/08/05 14:33:38 ZEBRA: [MJD4M-0AAAR] Kernel: pid 0, rtm_addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:33:38 ZEBRA: [K0KVE-2GJA1] default(0:0):10.40.30.0/24: Processing rn 0x802022bb0 2021/08/05 14:33:38 ZEBRA: [RWCK7-TX4HT] default(0:0):10.40.30.0/24: Examine re 0x8032973a0 (connected) status: Changed flags: None dist 0 metric 1 2021/08/05 14:33:38 ZEBRA: [RWCK7-TX4HT] default(0:0):10.40.30.0/24: Examine re 0x8032970a0 (static) status: None flags: Recursion RR Distance dist 1 metric 0 2021/08/05 14:33:38 ZEBRA: [NYYJJ-0Q8QG] default(0:0):10.40.30.0/24: After processing: old_selected 0x0 new_selected 0x8032973a0 old_fib 0x0 new_fib 0x8032973a0 2021/08/05 14:33:38 ZEBRA: [RT9DY-ZS2KN] default(0:0):10.40.30.0/24: Adding route rn 0x802022bb0, re 0x8032973a0 (connected) 2021/08/05 14:33:38 ZEBRA: [PP3BZ-RABJN] default(0:0):10.40.30.0/24: rn 0x802022bb0 dequeued from sub-queue 2 2021/08/05 14:33:38 ZEBRA: [K0KVE-2GJA1] default(0:0):10.40.30.0/24: Processing rn 0x802022f30 2021/08/05 14:33:38 ZEBRA: [RWCK7-TX4HT] default(0:0):10.40.30.0/24: Examine re 0x803297340 (connected) status: Changed flags: None dist 0 metric 1 2021/08/05 14:33:38 ZEBRA: [NYYJJ-0Q8QG] default(0:0):10.40.30.0/24: After processing: old_selected 0x0 new_selected 0x803297340 old_fib 0x0 new_fib 0x803297340 2021/08/05 14:33:38 ZEBRA: [RT9DY-ZS2KN] default(0:0):10.40.30.0/24: Adding route rn 0x802022f30, re 0x803297340 (connected) 2021/08/05 14:33:38 ZEBRA: [PP3BZ-RABJN] default(0:0):10.40.30.0/24: rn 0x802022f30 dequeued from sub-queue 2 2021/08/05 14:33:38 ZEBRA: [K0KVE-2GJA1] default(0:0):10.40.30.0/24: Processing rn 0x802022bb0 2021/08/05 14:33:38 ZEBRA: [RWCK7-TX4HT] default(0:0):10.40.30.0/24: Examine re 0x8032973a0 (connected) status: Queued flags: Selected dist 0 metric 1 2021/08/05 14:33:38 ZEBRA: [RWCK7-TX4HT] default(0:0):10.40.30.0/24: Examine re 0x8032970a0 (static) status: None flags: Recursion RR Distance dist 1 metric 0 2021/08/05 14:33:38 ZEBRA: [NYYJJ-0Q8QG] default(0:0):10.40.30.0/24: After processing: old_selected 0x8032973a0 new_selected 0x8032973a0 old_fib 0x8032973a0 new_fib 0x8032973a0 2021/08/05 14:33:38 ZEBRA: [PP3BZ-RABJN] default(0:0):10.40.30.0/24: rn 0x802022bb0 dequeued from sub-queue 4 2021/08/05 14:33:38 ZEBRA: [GHWHS-ZKQM5] update_from_ctx: default(0:0):10.40.30.0/24: SELECTED, re 0x8032973a0 2021/08/05 14:33:38 ZEBRA: [TS3SH-1276M] default(0:0):10.40.30.0/24 update_from_ctx(): no fib nhg 2021/08/05 14:33:38 ZEBRA: [HKQXC-4STSK] default(0:0):10.40.30.0/24 update_from_ctx(): rib nhg matched, changed 'false' 2021/08/05 14:33:38 ZEBRA: [HBZNK-5H1X0] (0:0):10.40.30.0/24: Redist update re 0x8032973a0 (connected), old 0x0 (None) 2021/08/05 14:33:38 ZEBRA: [GHWHS-ZKQM5] update_from_ctx: default(0:0):10.40.30.0/24: SELECTED, re 0x8032973a0 2021/08/05 14:33:38 ZEBRA: [TS3SH-1276M] default(0:0):10.40.30.0/24 update_from_ctx(): no fib nhg 2021/08/05 14:33:38 ZEBRA: [HKQXC-4STSK] default(0:0):10.40.30.0/24 update_from_ctx(): rib nhg matched, changed 'false' 2021/08/05 14:33:38 ZEBRA: [HBZNK-5H1X0] (0:0):10.40.30.0/24: Redist update re 0x8032973a0 (connected), old 0x0 (None) With this code change: 2021/08/05 14:41:24 ZEBRA: [MFYWV-KH3MC] rib_add_multipath_nhe: (0:?):10.10.40.0/24: Inserting route rn 0x802022f30, re 0x8021cbe60 (static) existing 0x0, same_count 0 2021/08/05 14:41:24 ZEBRA: [RT9DY-ZS2KN] default(0:0):10.10.40.0/24: Adding route rn 0x802022f30, re 0x8021cbe60 (static) 2021/08/05 14:41:24 ZEBRA: [V17DT-1FJEN] kernel_rtm: 10.10.40.0/24: successfully did NH 9.8.6.7 2021/08/05 14:41:24 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 200 Type: RTM_ADD 2021/08/05 14:41:24 ZEBRA: [V3NSB-BPKBD] Kernel: UP GATEWAY DONE PROTO1 2021/08/05 14:41:24 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 0 2021/08/05 14:41:24 ZEBRA: [MJD4M-0AAAR] Kernel: pid 60818, rtm_addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:41:24 ZEBRA: [Y9Y5K-JJ7NT] rtm_read: got rtm of type 1 (RTM_ADD) addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:41:24 ZEBRA: [TS3SH-1276M] default(0:0):10.10.40.0/24 update_from_ctx(): no fib nhg 2021/08/05 14:41:24 ZEBRA: [HKQXC-4STSK] default(0:0):10.10.40.0/24 update_from_ctx(): rib nhg matched, changed 'true' 2021/08/05 14:41:24 ZEBRA: [HBZNK-5H1X0] (0:0):10.10.40.0/24: Redist update re 0x8021cbe60 (static), old 0x0 (None) 2021/08/05 14:42:06 ZEBRA: [ZJ4AV-JEMJ3] dplane_intf_addr_set 2021/08/05 14:42:06 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 164 Type: RTM_NEWADDR 2021/08/05 14:42:06 ZEBRA: [V3NSB-BPKBD] Kernel: 2021/08/05 14:42:06 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 4664 2021/08/05 14:42:06 ZEBRA: [MJD4M-0AAAR] Kernel: pid 0, rtm_addrs {DST} 2021/08/05 14:42:06 ZEBRA: [M09CX-TKB4N] ifam_read_mesg: ifindex 1, ifname vtnet0, ifam_addrs {NETMASK,IFP,IFA,BRD}, ifam_flags 0x0, addr 10.10.40.3/24 broad 10.10.40.255 dst (unspec) gateway (unspec) 2021/08/05 14:42:06 ZEBRA: [MFYWV-KH3MC] rib_add_multipath_nhe: (0:0):10.10.40.0/24: Inserting route rn 0x802022f30, re 0x80308c4c0 (connected) existing 0x0, same_count 0 2021/08/05 14:42:06 ZEBRA: [MFYWV-KH3MC] rib_add_multipath_nhe: (0:?):10.10.40.0/24 (MRIB): Inserting route rn 0x802023160, re 0x80308c460 (connected) existing 0x0, same_count 0 2021/08/05 14:42:06 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 240 Type: RTM_ADD 2021/08/05 14:42:06 ZEBRA: [V3NSB-BPKBD] Kernel: UP PINNED 2021/08/05 14:42:06 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 0 2021/08/05 14:42:06 ZEBRA: [MJD4M-0AAAR] Kernel: pid 0, rtm_addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:42:06 ZEBRA: [RG9Y6-E93A0] default(0:0):10.10.40.0/24: Updating route rn 0x802022f30, re 0x80308c4c0 (connected) old 0x8021cbe60 (static) 2021/08/05 14:42:06 ZEBRA: [RT9DY-ZS2KN] default(0:0):10.10.40.0/24: Adding route rn 0x802023160, re 0x80308c460 (connected) 2021/08/05 14:42:06 ZEBRA: [THSYN-E2XFY][EC 100663299] rtm_write: write : Address already in use (48) 2021/08/05 14:42:06 ZEBRA: [RV5F2-MQGZG][EC 100663303] kernel_rtm: 10.10.40.0/24: rtm_write() unexpectedly returned -5 for command RTM_DELETE 2021/08/05 14:42:06 ZEBRA: [ZPR30-5G1FB] Kernel: Len: 200 Type: RTM_DELETE 2021/08/05 14:42:06 ZEBRA: [V3NSB-BPKBD] Kernel: UP PROTO1 2021/08/05 14:42:06 ZEBRA: [HDTM1-ENZNM] Kernel: message seq 1 2021/08/05 14:42:06 ZEBRA: [MJD4M-0AAAR] Kernel: pid 60818, rtm_addrs {DST,GATEWAY,NETMASK} 2021/08/05 14:42:06 ZEBRA: [XASXT-GF69Y] kernel_rtm: No useful nexthops were found in RIB prefix 10.10.40.0/24 2021/08/05 14:42:06 ZEBRA: [TS3SH-1276M] default(0:0):10.10.40.0/24 update_from_ctx(): no fib nhg 2021/08/05 14:42:06 ZEBRA: [HKQXC-4STSK] default(0:0):10.10.40.0/24 update_from_ctx(): rib nhg matched, changed 'false' 2021/08/05 14:42:06 ZEBRA: [HBZNK-5H1X0] (0:0):10.10.40.0/24: Redist update re 0x80308c4c0 (connected), old 0x8021cbe60 (static) netstat -rn: 10.10.40.0/24 link#1 U vtnet0 10.10.40.3 link#1 UHS lo0 show ip route: C>* 10.10.40.0/24 [0/1] is directly connected, vtnet0, 00:18:48 S 10.10.40.0/24 [1/0] via 9.8.6.7, vtnet0, weight 1, 00:19:30 Signed-off-by: Donald Sharp <sharpd@nvidia.com> |
||
---|---|---|
.. | ||
.gitignore | ||
connected.c | ||
connected.h | ||
debug_nl.c | ||
debug.c | ||
debug.h | ||
dplane_fpm_nl.c | ||
if_ioctl.c | ||
if_netlink.c | ||
if_netlink.h | ||
if_sysctl.c | ||
interface.c | ||
interface.h | ||
ioctl.c | ||
ioctl.h | ||
ipforward_proc.c | ||
ipforward_sysctl.c | ||
ipforward.h | ||
irdp_interface.c | ||
irdp_main.c | ||
irdp_packet.c | ||
irdp.h | ||
kernel_netlink.c | ||
kernel_netlink.h | ||
kernel_socket.c | ||
kernel_socket.h | ||
label_manager.c | ||
label_manager.h | ||
main.c | ||
Makefile | ||
redistribute.c | ||
redistribute.h | ||
rib.h | ||
router-id.c | ||
router-id.h | ||
rt_netlink.c | ||
rt_netlink.h | ||
rt_socket.c | ||
rt.h | ||
rtadv.c | ||
rtadv.h | ||
rtread_netlink.c | ||
rtread_sysctl.c | ||
rule_netlink.c | ||
rule_netlink.h | ||
rule_socket.c | ||
sample_plugin.c | ||
subdir.am | ||
table_manager.c | ||
table_manager.h | ||
testrib.conf | ||
zapi_msg.c | ||
zapi_msg.h | ||
zebra_dplane.c | ||
zebra_dplane.h | ||
zebra_errors.c | ||
zebra_errors.h | ||
zebra_evpn_mac.c | ||
zebra_evpn_mac.h | ||
zebra_evpn_mh.c | ||
zebra_evpn_mh.h | ||
zebra_evpn_neigh.c | ||
zebra_evpn_neigh.h | ||
zebra_evpn_vxlan.h | ||
zebra_evpn.c | ||
zebra_evpn.h | ||
zebra_fpm_dt.c | ||
zebra_fpm_netlink.c | ||
zebra_fpm_private.h | ||
zebra_fpm_protobuf.c | ||
zebra_fpm.c | ||
zebra_gr.c | ||
zebra_l2.c | ||
zebra_l2.h | ||
zebra_mlag_private.c | ||
zebra_mlag_vty.c | ||
zebra_mlag_vty.h | ||
zebra_mlag.c | ||
zebra_mlag.h | ||
zebra_mpls_netlink.c | ||
zebra_mpls_null.c | ||
zebra_mpls_openbsd.c | ||
zebra_mpls_vty.c | ||
zebra_mpls.c | ||
zebra_mpls.h | ||
zebra_mroute.c | ||
zebra_mroute.h | ||
zebra_nb_config.c | ||
zebra_nb_rpcs.c | ||
zebra_nb_state.c | ||
zebra_nb.c | ||
zebra_nb.h | ||
zebra_netns_id.c | ||
zebra_netns_id.h | ||
zebra_netns_notify.c | ||
zebra_netns_notify.h | ||
zebra_nhg_private.h | ||
zebra_nhg.c | ||
zebra_nhg.h | ||
zebra_ns.c | ||
zebra_ns.h | ||
zebra_opaque.c | ||
zebra_opaque.h | ||
zebra_pbr.c | ||
zebra_pbr.h | ||
zebra_ptm_redistribute.c | ||
zebra_ptm_redistribute.h | ||
zebra_ptm.c | ||
zebra_ptm.h | ||
zebra_pw.c | ||
zebra_pw.h | ||
zebra_rib.c | ||
zebra_rnh.c | ||
zebra_rnh.h | ||
zebra_routemap_nb_config.c | ||
zebra_routemap_nb.c | ||
zebra_routemap_nb.h | ||
zebra_routemap.c | ||
zebra_routemap.h | ||
zebra_router.c | ||
zebra_router.h | ||
zebra_snmp.c | ||
zebra_srte.c | ||
zebra_srte.h | ||
zebra_srv6_vty.c | ||
zebra_srv6_vty.h | ||
zebra_srv6.c | ||
zebra_srv6.h | ||
zebra_vrf.c | ||
zebra_vrf.h | ||
zebra_vty.c | ||
zebra_vxlan_private.h | ||
zebra_vxlan.c | ||
zebra_vxlan.h | ||
zserv.c | ||
zserv.h |