From 1220f8d207200b218afa6eec105850e68d55d8c8 Mon Sep 17 00:00:00 2001 From: Gerhard Muntingh Date: Tue, 14 Apr 2015 15:59:37 +0200 Subject: [PATCH] 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 --- build/init.common | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build/init.common b/build/init.common index 2f2cc1993..c1e962b97 100644 --- a/build/init.common +++ b/build/init.common @@ -567,6 +567,11 @@ while true; do ip link add link ${iface} name ${vlan_iface} type vlan id ${vlan} iface=${vlan_iface} fi + + # Prevent arp-flux: Do not respond to ARP requests that + # are not for this specific interface + sysctl net.ipv4.conf.$iface.arp_filter=1 + case "$config" in "dhcp") DHCP_IFACES_COUNT=$(($DHCP_IFACES_COUNT + 1))