From c9ae9dec7869a6dbf48fac8e5238279690022b87 Mon Sep 17 00:00:00 2001
Package: ifupdown-extra
Version: 0.14
From: Guillem Jover <guillem@debian.org>
Date: Sat, 6 Dec 2008 05:34:29 +0200
Debbug: 507949
Status: applied
Subject: [PATCH] Support multi-address interfaces

---
 if-up-scripts/check-duplicate-ip |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/if-up-scripts/check-duplicate-ip b/if-up-scripts/check-duplicate-ip
index d66de04..56a044d 100755
--- a/if-up-scripts/check-duplicate-ip
+++ b/if-up-scripts/check-duplicate-ip
@@ -81,10 +81,12 @@ do_arping() {
 		fi
 	fi
 
-	[ "$VERBOSITY" -eq 1 ] && $OUTPUT "DEBUG: Sending arp pings through $IFACE to detect other systems using $IF_ADDRESS"
-	if ! $ARPING -q -c $ARP_COUNT -w $ARP_TIMEOUT -D -I $IFACE $IF_ADDRESS ; then
-		$OUTPUT "ERROR: Duplicate address $IF_ADDRESS assigned in the network where $IFACE is connected to"
-	fi
+	for ADDR in $IF_ADDRESS; do
+		[ "$VERBOSITY" -eq 1 ] && $OUTPUT "DEBUG: Sending arp pings through $IFACE to detect other systems using $ADDR"
+		if ! $ARPING -q -c $ARP_COUNT -w $ARP_TIMEOUT -D -I $IFACE $ADDR ; then
+			$OUTPUT "ERROR: Duplicate address $ADDR assigned in the network where $IFACE is connected to"
+		fi
+	done
 }
 
 # Check our IFACE name, if it does not start with eth, bail out
-- 
1.6.0.1

