summaryrefslogtreecommitdiff
path: root/net/batman-adv/bat_v_elp.c
diff options
context:
space:
mode:
authorLinus Lüssing <linus.luessing@c0d3.blue>2016-08-23 04:13:03 +0300
committerSimon Wunderlich <sw@simonwunderlich.de>2016-08-26 16:22:31 +0300
commit1e5d343b8f23770e8ac5d31f5c439826bdb35148 (patch)
treeac547b89ea8af754e0671ed70610907d8ce63e2e /net/batman-adv/bat_v_elp.c
parent936523441bb64cdc9a5b263e8fd2782e70313a57 (diff)
downloadlinux-1e5d343b8f23770e8ac5d31f5c439826bdb35148.tar.xz
batman-adv: fix elp packet data reservation
The skb_reserve() call only reserved headroom for the mac header, but not the elp packet header itself. Fixing this by using skb_put()'ing towards the skb tail instead of skb_push()'ing towards the skb head. Fixes: d6f94d91f766 ("batman-adv: ELP - adding basic infrastructure") Signed-off-by: Linus Lüssing <linus.luessing@c0d3.blue> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
Diffstat (limited to 'net/batman-adv/bat_v_elp.c')
-rw-r--r--net/batman-adv/bat_v_elp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c
index 7d170010beb9..ee08540ce503 100644
--- a/net/batman-adv/bat_v_elp.c
+++ b/net/batman-adv/bat_v_elp.c
@@ -335,7 +335,7 @@ int batadv_v_elp_iface_enable(struct batadv_hard_iface *hard_iface)
goto out;
skb_reserve(hard_iface->bat_v.elp_skb, ETH_HLEN + NET_IP_ALIGN);
- elp_buff = skb_push(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN);
+ elp_buff = skb_put(hard_iface->bat_v.elp_skb, BATADV_ELP_HLEN);
elp_packet = (struct batadv_elp_packet *)elp_buff;
memset(elp_packet, 0, BATADV_ELP_HLEN);