Repository : ssh://git@open-mesh.org/batman-adv
On branch : maint
commit 0b75ad13f3f38d8d84e2f4af37c0e13d77040bc1 Author: Linus Lüssing linus.luessing@c0d3.blue Date: Tue Aug 23 03:13:03 2016 +0200
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: a4b88af77e28 ("batman-adv: ELP - adding basic infrastructure") Signed-off-by: Linus Lüssing linus.luessing@c0d3.blue Reviewed-by: Sven Eckelmann sven@narfation.org Signed-off-by: Marek Lindner mareklindner@neomailbox.ch
0b75ad13f3f38d8d84e2f4af37c0e13d77040bc1 net/batman-adv/bat_v_elp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/bat_v_elp.c b/net/batman-adv/bat_v_elp.c index df42eb1..63762b3 100644 --- a/net/batman-adv/bat_v_elp.c +++ b/net/batman-adv/bat_v_elp.c @@ -334,7 +334,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);