Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 376117
b: refs/heads/master
c: 5a5c5fd
h: refs/heads/master
i:
  376115: a670a36
v: v3
  • Loading branch information
nikolay@redhat.com authored and David S. Miller committed May 20, 2013
1 parent dc78e59 commit af7d354
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: acca2674a71816c5c9d0caa81fecd33b491fd68f
refs/heads/master: 5a5c5fd48e3bcd57572e9a7a4964ed8f38a20b87
19 changes: 8 additions & 11 deletions trunk/drivers/net/bonding/bond_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -4471,7 +4471,7 @@ int bond_parse_parm(const char *buf, const struct bond_parm_tbl *tbl)

static int bond_check_params(struct bond_params *params)
{
int arp_validate_value, fail_over_mac_value, primary_reselect_value;
int arp_validate_value, fail_over_mac_value, primary_reselect_value, i;

/*
* Convert string parameters.
Expand Down Expand Up @@ -4651,19 +4651,18 @@ static int bond_check_params(struct bond_params *params)
arp_interval = BOND_LINK_ARP_INTERV;
}

for (arp_ip_count = 0;
(arp_ip_count < BOND_MAX_ARP_TARGETS) && arp_ip_target[arp_ip_count];
arp_ip_count++) {
for (arp_ip_count = 0, i = 0;
(arp_ip_count < BOND_MAX_ARP_TARGETS) && arp_ip_target[i]; i++) {
/* not complete check, but should be good enough to
catch mistakes */
__be32 ip = in_aton(arp_ip_target[arp_ip_count]);
if (!isdigit(arp_ip_target[arp_ip_count][0]) ||
ip == 0 || ip == htonl(INADDR_BROADCAST)) {
__be32 ip = in_aton(arp_ip_target[i]);
if (!isdigit(arp_ip_target[i][0]) || ip == 0 ||
ip == htonl(INADDR_BROADCAST)) {
pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n",
arp_ip_target[arp_ip_count]);
arp_ip_target[i]);
arp_interval = 0;
} else {
arp_target[arp_ip_count] = ip;
arp_target[arp_ip_count++] = ip;
}
}

Expand Down Expand Up @@ -4697,8 +4696,6 @@ static int bond_check_params(struct bond_params *params)
if (miimon) {
pr_info("MII link monitoring set to %d ms\n", miimon);
} else if (arp_interval) {
int i;

pr_info("ARP monitoring set to %d ms, validate %s, with %d target(s):",
arp_interval,
arp_validate_tbl[arp_validate_value].modename,
Expand Down

0 comments on commit af7d354

Please sign in to comment.