diff options
author | Veaceslav Falico <vfalico@redhat.com> | 2013-06-24 11:49:30 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-06-25 16:58:38 -0700 |
commit | 0afee4e8b9fe4b5f58734b2f28e980dd58d3e3cb (patch) | |
tree | 39369efaa210c7dbf4dab5df4cb2612f15202def | |
parent | 87a7b84b588c2ddbde890890855aef18ec34174e (diff) |
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>
-rw-r--r-- | drivers/net/bonding/bond_main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 976d28e3498..1645130c0a6 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); } } |