On Wed, Jan 23, 2013 at 10:52:09PM +0100, Matthias Schiffer wrote:
On 01/23/2013 10:39 PM, Matthias Schiffer wrote:
ipv4_is_zeronet() checks if the first byte of the address is zero, to my knowledge there is no special funtion for checking for the unspecified address, as the case is trivial and independent of byte ordering.
It might make sense though to check for different types of addresses that are invalid for ARP (zeronet, loopback, multicast, etc.), but I wanted to keep the patch as simple as possible. If you think these should be filtered as well, I'll prepare a v2.
Matthias
Oh, I shouldn't top post. Well, continuing here now...
I just noticed that batadv_arp_get_type() already checks for loopback and multicast addresses, so adding ipv4_is_zeronet() should be enough. I'd keep that in batadv_dat_entry_add() though as the source of ARP replies with 0.0.0.0 destination is still valid and can be should to the DAT.
mh I would not split these checks if they are all logically connected. Better to leave the patch as it is, imho.
Cheers,