summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2016-02-28 11:38:52 +0100
committerAntonio Quartulli <a@unstable.cc>2016-05-10 12:26:43 +0200
commit7142fc107274a0ebfd31e995de61e71a1e84770f (patch)
tree33e2434430de4ea990269a4bbe73ca7d7fdf0916 /net
parentbatman-adv: Remove unused parameter recv_if of batadv_interface_rx (diff)
downloadlinux-7142fc107274a0ebfd31e995de61e71a1e84770f.tar.xz
linux-7142fc107274a0ebfd31e995de61e71a1e84770f.zip
batman-adv: Remove hdr_size skb size check in batadv_interface_rx
The callers of batadv_interface_rx have to make sure that enough data can be pulled from the skb when they read the batman-adv header. The only two functions using it are either calling pskb_may_pull with hdr_size directly (batadv_recv_bcast_packet) or indirectly via batadv_check_unicast_packet (batadv_recv_unicast_packet). Reported-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <a@unstable.cc>
Diffstat (limited to 'net')
-rw-r--r--net/batman-adv/soft-interface.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index dc9a61a5122d..d72f88707736 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -413,10 +413,6 @@ void batadv_interface_rx(struct net_device *soft_iface,
batadv_bcast_packet = (struct batadv_bcast_packet *)skb->data;
is_bcast = (batadv_bcast_packet->packet_type == BATADV_BCAST);
- /* check if enough space is available for pulling, and pull */
- if (!pskb_may_pull(skb, hdr_size))
- goto dropped;
-
skb_pull_rcsum(skb, hdr_size);
skb_reset_mac_header(skb);