* [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: fix elp packet data reservation
@ 2016-08-23 1:13 Linus Lüssing
2016-08-23 6:32 ` Sven Eckelmann
0 siblings, 1 reply; 3+ messages in thread
From: Linus Lüssing @ 2016-08-23 1:13 UTC (permalink / raw)
To: b.a.t.m.a.n
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>
---
Changes in v2:
* just switch from skb_push() to skb_put()
=> skb_put() actually returns the right point in the skb and is
equivalent to a second skb->data assignment after skb_put() in this case
* batamn-adv -> batman-adv
* explicitly directed to maint
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);
--
2.1.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: fix elp packet data reservation 2016-08-23 1:13 [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: fix elp packet data reservation Linus Lüssing @ 2016-08-23 6:32 ` Sven Eckelmann 2016-08-26 9:13 ` Marek Lindner 0 siblings, 1 reply; 3+ messages in thread From: Sven Eckelmann @ 2016-08-23 6:32 UTC (permalink / raw) To: b.a.t.m.a.n [-- Attachment #1: Type: text/plain, Size: 508 bytes --] On Dienstag, 23. August 2016 03:13:03 CEST Linus Lüssing wrote: > 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> Kind regards, Sven [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 819 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: fix elp packet data reservation 2016-08-23 6:32 ` Sven Eckelmann @ 2016-08-26 9:13 ` Marek Lindner 0 siblings, 0 replies; 3+ messages in thread From: Marek Lindner @ 2016-08-26 9:13 UTC (permalink / raw) To: b.a.t.m.a.n [-- Attachment #1: Type: text/plain, Size: 624 bytes --] On Tuesday, August 23, 2016 8:32:26 AM HKT Sven Eckelmann wrote: > On Dienstag, 23. August 2016 03:13:03 CEST Linus Lüssing wrote: > > 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> Applied in revision 0b75ad1. Thanks, Marek [-- Attachment #2: This is a digitally signed message part. --] [-- Type: application/pgp-signature, Size: 455 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-08-26 9:13 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2016-08-23 1:13 [B.A.T.M.A.N.] [PATCH maint v2] batman-adv: fix elp packet data reservation Linus Lüssing 2016-08-23 6:32 ` Sven Eckelmann 2016-08-26 9:13 ` Marek Lindner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).