mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-29 10:01:25 +00:00
bonding: make arp_ip_target parameter checks consistent with sysfs
The module can be loaded with arp_ip_target="255.255.255.255" which makes it impossible to remove as the function in sysfs checks for that value, so we make the parameter checks consistent with sysfs. v2: Fix formatting v3: Make description text < 75 columns Signed-off-by: Nikolay Aleksandrov <nikolay@redhat.com> Signed-off-by: Jay Vosburgh <fubar@us.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
fbb0c41b81
commit
90fb6250c5
1 changed files with 3 additions and 2 deletions
|
@ -4670,12 +4670,13 @@ static int bond_check_params(struct bond_params *params)
|
||||||
arp_ip_count++) {
|
arp_ip_count++) {
|
||||||
/* not complete check, but should be good enough to
|
/* not complete check, but should be good enough to
|
||||||
catch mistakes */
|
catch mistakes */
|
||||||
if (!isdigit(arp_ip_target[arp_ip_count][0])) {
|
__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)) {
|
||||||
pr_warning("Warning: bad arp_ip_target module parameter (%s), ARP monitoring will not be performed\n",
|
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[arp_ip_count]);
|
||||||
arp_interval = 0;
|
arp_interval = 0;
|
||||||
} else {
|
} else {
|
||||||
__be32 ip = in_aton(arp_ip_target[arp_ip_count]);
|
|
||||||
arp_target[arp_ip_count] = ip;
|
arp_target[arp_ip_count] = ip;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue