diff options
author | David Kaspar [Dee'Kej] <dkaspar@redhat.com> | 2017-07-10 18:16:35 +0200 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-07-14 17:40:45 +0200 |
commit | 3f7368cf2615978fc4b89b63613ada20bafb6124 (patch) | |
tree | 24f73bb4a501d63ea9793a801aa2e5aa0b94a3d9 /sysconfig | |
parent | f2004639bd68b11e3eeb206afc4416ea434cc087 (diff) | |
download | initscripts-3f7368cf2615978fc4b89b63613ada20bafb6124.tar initscripts-3f7368cf2615978fc4b89b63613ada20bafb6124.tar.gz initscripts-3f7368cf2615978fc4b89b63613ada20bafb6124.tar.bz2 initscripts-3f7368cf2615978fc4b89b63613ada20bafb6124.tar.xz initscripts-3f7368cf2615978fc4b89b63613ada20bafb6124.zip |
ARPUPDATE introduced
The ARPUPDATE option has been introduced. It defaults to 'yes'.
By setting the ARPUPDATE to 'no', administrator can disable
updating neighbouring computers with ARP information about current
NIC. This is especially needed when using LVS Load Balancing with
Direct routing enabled.
Resolves: RHBZ#1440888
Diffstat (limited to 'sysconfig')
-rwxr-xr-x | sysconfig/network-scripts/ifup-aliases | 4 | ||||
-rwxr-xr-x | sysconfig/network-scripts/ifup-eth | 2 | ||||
-rw-r--r-- | sysconfig/network-scripts/network-functions | 6 |
3 files changed, 10 insertions, 2 deletions
diff --git a/sysconfig/network-scripts/ifup-aliases b/sysconfig/network-scripts/ifup-aliases index 2e21e6de..ead89ceb 100755 --- a/sysconfig/network-scripts/ifup-aliases +++ b/sysconfig/network-scripts/ifup-aliases @@ -127,6 +127,7 @@ eval ` ( echo default_GATEWAY=$GATEWAY\;; echo default_NO_ALIASROUTING=$NO_ALIASROUTING\;; echo default_ARPCHECK=$ARPCHECK\;; + echo default_ARPUPDATE=$ARPUPDATE\;; ) ` [ -z "$default_GATEWAY" ] && default_GATEWAY=$network_GATEWAY @@ -141,6 +142,7 @@ function ini_env () NO_ALIASROUTING=$default_NO_ALIASROUTING ONPARENT="" ARPCHECK=$default_ARPCHECK + ARPUPDATE=$default_ARPUPDATE } function is_default_gateway () @@ -276,7 +278,7 @@ function new_interface () /sbin/ip addr add ${IPADDR}/${PREFIX} brd ${BROADCAST} dev ${parent_device} label ${DEVICE} # update ARP cache of neighboring computers: - if [ "${REALDEVICE}" != "lo" ]; then + 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 & fi diff --git a/sysconfig/network-scripts/ifup-eth b/sysconfig/network-scripts/ifup-eth index 12cb2a6c..5dd68161 100755 --- a/sysconfig/network-scripts/ifup-eth +++ b/sysconfig/network-scripts/ifup-eth @@ -270,7 +270,7 @@ else fi # update ARP cache of neighboring computers - if [ "${REALDEVICE}" != "lo" ]; then + if ! is_false "${arpupdate[$idx]}" && [ "${REALDEVICE}" != "lo" ]; then /sbin/arping -q -A -c 1 -I ${REALDEVICE} ${ipaddr[$idx]} ( sleep 2; /sbin/arping -q -U -c 1 -I ${REALDEVICE} ${ipaddr[$idx]} ) > /dev/null 2>&1 < /dev/null & diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index e7be1120..b623b0c1 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -188,6 +188,7 @@ expand_config () netmask[$i]=$(eval echo '$'NETMASK$idx) broadcast[$i]=$(eval echo '$'BROADCAST$idx) arpcheck[$i]=$(eval echo '$'ARPCHECK$idx) + arpupdate[$i]=$(eval echo '$'ARPUPDATE$idx) if [ "${prefix[$i]}x" != "x" ]; then val=$(/bin/ipcalc --netmask "${ipaddr[$i]}/${prefix[$i]}") @@ -214,6 +215,11 @@ expand_config () arpcheck[$i]=${arpcheck[$i],,*} fi + if [ "${arpupdate[$i]}x" != "x" ]; then + arpupdate[$i]=${arpupdate[$i]##ARPUPDATE=} + arpupdate[$i]=${arpupdate[$i],,*} + fi + i=$((i+1)) done |