Skip to content

Commit

Permalink
build/init.common: prevent arp responses on the wrong nic.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Gerhard Muntingh authored and gerhardqux committed May 5, 2015
1 parent 429f52f commit f8682b4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build/init.common
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit f8682b4

Please sign in to comment.