From: Michael Tremer Date: Sat, 31 Jul 2010 18:52:29 +0000 (+0200) Subject: network: Fix duplicate check. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11d98ea796a7c01e7c642dc9e16aec3679dd1582;p=ipfire-3.x.git network: Fix duplicate check. --- diff --git a/pkgs/core/network/src/functions.ipv4 b/pkgs/core/network/src/functions.ipv4 index 04b49a68e..74c524a4c 100644 --- a/pkgs/core/network/src/functions.ipv4 +++ b/pkgs/core/network/src/functions.ipv4 @@ -61,10 +61,10 @@ function ipv4_detect_duplicate() { if ! arping -q -c 2 -w 3 -D -I ${device} ${address}; then log DEBUG "Detected duplicate address '${address}' on device '${device}'." - return ${EXIT_ERROR} + return ${EXIT_OK} fi - return ${EXIT_OK} + return ${EXIT_ERROR} } function ipv4_update_neighbours() { diff --git a/pkgs/core/network/src/hooks/zones/bridge.configs/ipv4-static b/pkgs/core/network/src/hooks/zones/bridge.configs/ipv4-static index 5793321c9..c9462d5e1 100755 --- a/pkgs/core/network/src/hooks/zones/bridge.configs/ipv4-static +++ b/pkgs/core/network/src/hooks/zones/bridge.configs/ipv4-static @@ -79,7 +79,7 @@ function _up() { if ! zone_has_ipv4 ${zone} ${ADDRESS}/${PREFIX}; then if ipv4_detect_duplicate ${zone} ${ADDRESS}; then - error_log "Duplicate address detected on zone '${zone}' (${address})." + error_log "Duplicate address detected on zone '${zone}' (${ADDRESS})." error_log "Cannot continue." exit ${EXIT_ERROR} fi