diff options
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-aliases | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases index a647044f..8a59dd0a 100755 --- a/sysconfig/network-scripts/ifup-aliases +++ b/sysconfig/network-scripts/ifup-aliases @@ -139,6 +139,7 @@ function ini_env () GATEWAY=$default_GATEWAY NO_ALIASROUTING=$default_NO_ALIASROUTING ONPARENT="" + ARPCHECK="" } function is_default_gateway () @@ -256,6 +257,14 @@ function new_interface () fi if [ "$setup_this" = "yes" ] ; then + [ "${parent_device}" != "lo" ] && [ "${ARPCHECK}" != "no" ] && \ + is_available ${parent_device} && \ + grep -qswi "up" /sys/class/net/${parent_device}/operstate && \ + if ! /sbin/arping -q -c 2 -w 3 -D -I ${parent_device} ${IPADDR} ; then + net_log $"Error, some other host already uses address ${IPADDR}." + return 1 + fi + /sbin/ip addr add ${IPADDR}/${PREFIX} brd ${BROADCAST} dev ${parent_device} label ${DEVICE} [ "$IPV6INIT" = "yes" ] && /etc/sysconfig/network-scripts/ifup-ipv6 ${DEVICE} |