bonding: don't add duplicate targets to arp_ip_target

Print a warning and skip them.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Veaceslav Falico 2013-06-24 11:49:30 +02:00 committed by David S. Miller
parent 87a7b84b58
commit 0afee4e8b9
1 changed files with 5 additions and 1 deletions

View File

@ -4588,7 +4588,11 @@ static int bond_check_params(struct bond_params *params)
arp_ip_target[i]);
arp_interval = 0;
} else {
arp_target[arp_ip_count++] = ip;
if (bond_get_targets_ip(arp_target, ip) == -1)
arp_target[arp_ip_count++] = ip;
else
pr_warning("Warning: duplicate address %pI4 in arp_ip_target, skipping\n",
&ip);
}
}