Skip to content

Commit 99deb6f

Browse files
Gerhard Muntinghgerhardqux
authored andcommitted
build/init.common: prevent arp responses on the wrong nic.
Having multiple NICs in the same segment that are going to be bonded is a common scenario in modern datacenters. The kernel should not respond to arp requests for ip addresses that are not for the specific NIC it arrives on. This patch prevents dhclient from dropping its ip address while renewing its dhcp lease. Closes #237
1 parent e954159 commit 99deb6f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

build/init.common

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,6 +567,11 @@ while true; do
567567
ip link add link ${iface} name ${vlan_iface} type vlan id ${vlan}
568568
iface=${vlan_iface}
569569
fi
570+
571+
# Prevent arp-flux: Do not respond to ARP requests that
572+
# are not for this specific interface
573+
sysctl net.ipv4.conf.$iface.arp_filter=1
574+
570575
case "$config" in
571576
"dhcp")
572577
DHCP_IFACES_COUNT=$(($DHCP_IFACES_COUNT + 1))

0 commit comments

Comments
 (0)