linux/drivers/net/bonding
Wang Weidong f9de11a165 bonding: add ip checks when store ip target
I met a Bug when I add ip target with the wrong ip address:

echo +500.500.500.500 > /sys/class/net/bond0/bonding/arp_ip_target

the wrong ip address will transfor to 245.245.245.244 and add
to 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, it will return by
the next check and will not add to ip target.

v2
According Veaceslav's opinion, simplify the code.

v3
According Veaceslav's opinion, add broadcast check and make a micro
definition to package it.

v4
Solve the problem of the format which David point out.

Suggested-by: Veaceslav Falico <vfalico@redhat.com>
Suggested-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-11-15 17:44:43 -05:00
..
bond_3ad.c Revert "Merge branch 'bonding_monitor_locking'" 2013-10-28 00:11:22 -04:00
bond_3ad.h bonding: fix multiple 3ad mode sysfs race conditions 2013-05-19 23:25:49 -07:00
bond_alb.c Revert "Merge branch 'bonding_monitor_locking'" 2013-10-28 00:11:22 -04:00
bond_alb.h bonding: rework rlb_next_rx_slave() to use bond_for_each_slave() 2013-09-26 16:02:05 -04:00
bond_debugfs.c bonding: delete migrated IP addresses from the rlb hash table 2012-11-30 12:07:27 -05:00
bond_main.c bonding: extend round-robin mode with packets_per_slave 2013-11-07 15:10:21 -05:00
bond_netlink.c bonding: bond_get_size() returns wrong size 2013-11-02 02:08:54 -04:00
bond_options.c bonding: move active_slave getting into separate function 2013-10-19 18:58:45 -04:00
bond_procfs.c bonding: don't use bond_next_slave() in bond_info_seq_next() 2013-09-28 15:28:06 -07:00
bond_sysfs.c bonding: add ip checks when store ip target 2013-11-15 17:44:43 -05:00
bonding.h bonding: add ip checks when store ip target 2013-11-15 17:44:43 -05:00
Makefile bonding: move mode setting into separate function 2013-10-19 18:58:45 -04:00