mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-06-02 23:35:10 +00:00
![]() Disallow the resolution to nexthops that are marked duplicate. When we are resolving to an ecmp group, it's possible this group has duplicates. I found this when I hit a bug where we can have groups resolving to each other and cause the resolved->next->next pointer to increase exponentially. Sufficiently large ecmp and zebra will grind to a hault. Like so: ``` D> 4.4.4.14/32 [150/0] via 1.1.1.1 (recursive), weight 1, 00:00:02 * via 1.1.1.1, dummy1 onlink, weight 1, 00:00:02 via 4.4.4.1 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.2 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.3 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.4 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.5 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.6 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.7 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.8 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.9 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.10 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.11 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.12 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.13 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.15 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1 onlink, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1 onlink, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 4.4.4.16 (recursive), weight 1, 00:00:02 via 1.1.1.1, dummy1 onlink, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 via 1.1.1.1, dummy1, weight 1, 00:00:02 D> 4.4.4.15/32 [150/0] via 1.1.1.1 (recursive), weight 1, 00:00:09 * via 1.1.1.1, dummy1 onlink, weight 1, 00:00:09 via 4.4.4.1 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.2 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.3 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.4 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.5 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.6 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.7 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.8 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.9 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.10 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.11 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.12 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.13 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.14 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 4.4.4.16 (recursive), weight 1, 00:00:09 via 1.1.1.1, dummy1 onlink, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 via 1.1.1.1, dummy1, weight 1, 00:00:09 D> 4.4.4.16/32 [150/0] via 1.1.1.1 (recursive), weight 1, 00:00:19 * via 1.1.1.1, dummy1 onlink, weight 1, 00:00:19 via 4.4.4.1 (recursive), weight 1, 00:00:19 via 1.1.1.1, dummy1, weight 1, 00:00:19 via 4.4.4.2 (recursive), weight 1, 00:00:19 ............... ................ and on... ``` You can repro the above via: ``` kernel routes: 1.1.1.1 dev dummy1 scope link 4.4.4.0/24 via 1.1.1.1 dev dummy1 ============================== config: nexthop-group doof nexthop 1.1.1.1 nexthop 4.4.4.1 nexthop 4.4.4.10 nexthop 4.4.4.11 nexthop 4.4.4.12 nexthop 4.4.4.13 nexthop 4.4.4.14 nexthop 4.4.4.15 nexthop 4.4.4.16 nexthop 4.4.4.2 nexthop 4.4.4.3 nexthop 4.4.4.4 nexthop 4.4.4.5 nexthop 4.4.4.6 nexthop 4.4.4.7 nexthop 4.4.4.8 nexthop 4.4.4.9 ! =========================== Then use sharpd to install 4.4.4.16 -> 4.4.4.1 pointing to that nexthop group in decending order. ``` With these changes it prevents the growing ecmp above by disallowing duplicates to be in the resolution decision. These nexthops are not installed anyways so why should we be resolving to them? Signed-off-by: Stephen Worley <sworley@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_memory.c | ||
zebra_memory.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.c | ||
zebra_routemap.h | ||
zebra_router.c | ||
zebra_router.h | ||
zebra_snmp.c | ||
zebra_srte.c | ||
zebra_srte.h | ||
zebra_vrf.c | ||
zebra_vrf.h | ||
zebra_vty.c | ||
zebra_vxlan_private.h | ||
zebra_vxlan.c | ||
zebra_vxlan.h | ||
zebra.conf.sample | ||
zserv.c | ||
zserv.h |