diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-01-24 18:18:26 +0100 |
---|---|---|
committer | Antonio Quartulli <ordex@autistici.org> | 2013-01-27 14:02:39 +0100 |
commit | 757dd82ea7008ddaccfecff3397bec3e3203a89e (patch) | |
tree | bd590a987bff0d4b4a680afc681d0e062acdd0ca /net | |
parent | 0d15becee56fdfc2e9a4374c46ea7cf7562a6f32 (diff) | |
download | linux-3.10-757dd82ea7008ddaccfecff3397bec3e3203a89e.tar.gz linux-3.10-757dd82ea7008ddaccfecff3397bec3e3203a89e.tar.bz2 linux-3.10-757dd82ea7008ddaccfecff3397bec3e3203a89e.zip |
batman-adv: check for more types of invalid IP addresses in DAT
There are more types of IP addresses that may appear in ARP packets that we
don't want to process. While some of these should never appear in sane ARP
packets, a 0.0.0.0 source is used for duplicate address detection and thus seen
quite often.
Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/distributed-arp-table.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c index ce0d2992381..ccb3c6c96ba 100644 --- a/net/batman-adv/distributed-arp-table.c +++ b/net/batman-adv/distributed-arp-table.c @@ -777,7 +777,9 @@ static uint16_t batadv_arp_get_type(struct batadv_priv *bat_priv, ip_src = batadv_arp_ip_src(skb, hdr_size); ip_dst = batadv_arp_ip_dst(skb, hdr_size); if (ipv4_is_loopback(ip_src) || ipv4_is_multicast(ip_src) || - ipv4_is_loopback(ip_dst) || ipv4_is_multicast(ip_dst)) + ipv4_is_loopback(ip_dst) || ipv4_is_multicast(ip_dst) || + ipv4_is_zeronet(ip_src) || ipv4_is_lbcast(ip_src) || + ipv4_is_zeronet(ip_dst) || ipv4_is_lbcast(ip_dst)) goto out; type = ntohs(arphdr->ar_op); |