From: Veaceslav Falico Date: Mon, 24 Jun 2013 09:49:30 +0000 (+0200) Subject: bonding: don't add duplicate targets to arp_ip_target X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=0afee4e8b9fe4b5f58734b2f28e980dd58d3e3cb;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git bonding: don't add duplicate targets to arp_ip_target Print a warning and skip them. Signed-off-by: Veaceslav Falico Signed-off-by: David S. Miller --- diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 976d28e3498a..1645130c0a60 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -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); } }