From 6c9689c792ac7771159794ee24ab99bd746318d9 Mon Sep 17 00:00:00 2001 From: Jan Macku Date: Fri, 12 Feb 2021 10:15:21 +0100 Subject: network scripts: Avoid infinite loop of arping Introduced in the bonding driver (commit ae46f184bc1f) now reports transmission failures. Before that, it silently dropped the packet and replied with success error code. The arping of iputils retries endlessly when a transmission error occurs. This patch fix this behavior. --- network-scripts/ifup-aliases | 5 +++-- network-scripts/ifup-eth | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/network-scripts/ifup-aliases b/network-scripts/ifup-aliases index 971ce208..6178c080 100755 --- a/network-scripts/ifup-aliases +++ b/network-scripts/ifup-aliases @@ -280,8 +280,9 @@ function new_interface () # update ARP cache of neighboring computers: if ! is_false "${ARPUPDATE}" && [ "${REALDEVICE}" != "lo" ]; then - /sbin/arping -q -A -c 1 -I ${parent_device} ${IPADDR} - ( sleep 2; /sbin/arping -q -U -c 1 -I ${parent_device} ${IPADDR} ) > /dev/null 2>&1 < /dev/null & + /sbin/arping -q -A -c 1 -w ${ARPING_UPDATE_WAIT:-3} -I ${parent_device} ${IPADDR} + ( sleep 2; + /sbin/arping -q -U -c 1 -w ${ARPING_UPDATE_WAIT:-3} -I ${parent_device} ${IPADDR} ) > /dev/null 2>&1 < /dev/null & fi ! is_false "$IPV6INIT" && \ diff --git a/network-scripts/ifup-eth b/network-scripts/ifup-eth index 730e08fd..2f58d195 100755 --- a/network-scripts/ifup-eth +++ b/network-scripts/ifup-eth @@ -302,9 +302,9 @@ else # update ARP cache of neighboring computers if ! is_false "${arpupdate[$idx]}" && [ "${REALDEVICE}" != "lo" ]; then - /sbin/arping -q -A -c 1 -I ${REALDEVICE} ${ipaddr[$idx]} + /sbin/arping -q -A -c 1 -w ${ARPING_UPDATE_WAIT:-3} -I ${REALDEVICE} ${ipaddr[$idx]} ( sleep 2; - /sbin/arping -q -U -c 1 -I ${REALDEVICE} ${ipaddr[$idx]} ) > /dev/null 2>&1 < /dev/null & + /sbin/arping -q -U -c 1 -w ${ARPING_UPDATE_WAIT:-3} -I ${REALDEVICE} ${ipaddr[$idx]} ) > /dev/null 2>&1 < /dev/null & fi # set lifetime of address to forever -- cgit v1.2.1