Skip to content

Commit 0afee4e

Browse files
Veaceslav Falicodavem330
authored andcommitted
bonding: don't add duplicate targets to arp_ip_target
Print a warning and skip them. Signed-off-by: Veaceslav Falico <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 87a7b84 commit 0afee4e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/net/bonding/bond_main.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4588,7 +4588,11 @@ static int bond_check_params(struct bond_params *params)
45884588
arp_ip_target[i]);
45894589
arp_interval = 0;
45904590
} else {
4591-
arp_target[arp_ip_count++] = ip;
4591+
if (bond_get_targets_ip(arp_target, ip) == -1)
4592+
arp_target[arp_ip_count++] = ip;
4593+
else
4594+
pr_warning("Warning: duplicate address %pI4 in arp_ip_target, skipping\n",
4595+
&ip);
45924596
}
45934597
}
45944598

0 commit comments

Comments
 (0)