Skip to content

Commit

Permalink
bonding: don't add duplicate targets to arp_ip_target
Browse files Browse the repository at this point in the history
Print a warning and skip them.

Signed-off-by: Veaceslav Falico <vfalico@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Veaceslav Falico authored and David S. Miller committed Jun 25, 2013
1 parent 87a7b84 commit 0afee4e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 0afee4e

Please sign in to comment.