]> git.ipfire.org Git - people/ms/network.git/commitdiff
network: Fix duplicate check.
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 31 Jul 2010 18:52:29 +0000 (20:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 31 Jul 2010 18:52:29 +0000 (20:52 +0200)
functions.ipv4
hooks/zones/bridge.configs/ipv4-static

index 04b49a68e3ea3f0ae6e0f121f84eedc6104b4814..74c524a4ce972533d6ceb6e2276be9b00137f76c 100644 (file)
@@ -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() {
index 5793321c9a9bb3fa5c3019359dda8c9a53209b2b..c9462d5e141ac6083c1ac86bd7a6fe5494faab66 100755 (executable)
@@ -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