]> git.baikalelectronics.ru Git - kernel.git/commit
bonding: add arp_ip_target checks when install the module
authordingtianhong <dingtianhong@huawei.com>
Wed, 4 Dec 2013 10:59:31 +0000 (18:59 +0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 6 Dec 2013 01:58:14 +0000 (20:58 -0500)
commit024684a93360357d313b36085a577b1478a4b1a0
treec4b6ab6fa12d8158a492a61695cc584cb0080adf
parentf0f1018e4b2fb0a048048e73573b8534f2050607
bonding: add arp_ip_target checks when install the module

When I install the bonding with the wrong arp_ip_target,
just like arp_ip_target=500.500.500.500, the arp_ip_target
was transfored to 245.245.245.244 and stored in the ip
target success, it is uncorrect, so I add checks to avoid
adding wrong address.

The in4_pton() will set wrong ip address to 0.0.0.0 and
return 0, also use the micro IS_IP_TARGET_UNUSABLE_ADDRESS
to simplify the code.

Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bonding/bond_main.c