]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit89015c18ff34a39e4679ddd9b058e74d7dde28e7
treec4b6ab6fa12d8158a492a61695cc584cb0080adf
parentc8781cf4a309ae4d1393f5878d4e51987665898c
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