From: Alexander Aring <alex.aring@gmail.com>
To: alex.bluesman.smirnov@gmail.com
Cc: linux-zigbee-devel@lists.sourceforge.net, werner@almesberger.net,
dbaryshkov@gmail.com, netdev@vger.kernel.org,
Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH net-next 3/4] 6lowpan: set 6lowpan network and transport header
Date: Wed, 30 Oct 2013 09:18:23 +0100 [thread overview]
Message-ID: <1383121104-2515-4-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1383121104-2515-1-git-send-email-alex.aring@gmail.com>
This is necessary to access network header with the skb_network_header
function instead of calculate the position with mac_len, etc.
Do the same for the transport header, when we replace the IPv6 header
with the 6LoWPAN header.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
Acked-by: Werner Almesberger <werner@almesberger.net>
---
net/ieee802154/6lowpan.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index e6db1f5..58c07fd 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -654,7 +654,9 @@ static int lowpan_header_create(struct sk_buff *skb,
head[1] = iphc1;
skb_pull(skb, sizeof(struct ipv6hdr));
+ skb_reset_transport_header(skb);
memcpy(skb_push(skb, hc06_ptr - head), head, hc06_ptr - head);
+ skb_reset_network_header(skb);
lowpan_raw_dump_table(__func__, "raw skb data dump", skb->data,
skb->len);
--
1.8.4.2
next prev parent reply other threads:[~2013-10-30 8:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-30 8:18 [PATCH net-next 0/4] 6lowpan: cleanup header creation Alexander Aring
[not found] ` <1383121104-2515-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2013-10-30 8:18 ` [PATCH net-next 1/4] 6lowpan: remove unnecessary set of headers Alexander Aring
2013-10-30 8:18 ` [PATCH net-next 2/4] 6lowpan: set and use mac_len for mac header length Alexander Aring
2013-10-30 8:18 ` Alexander Aring [this message]
2013-10-30 8:18 ` [PATCH net-next 4/4] 6lowpan: cleanup skb copy data Alexander Aring
2013-10-30 21:19 ` [PATCH net-next 0/4] 6lowpan: cleanup header creation David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1383121104-2515-4-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=alex.bluesman.smirnov@gmail.com \
--cc=dbaryshkov@gmail.com \
--cc=linux-zigbee-devel@lists.sourceforge.net \
--cc=netdev@vger.kernel.org \
--cc=werner@almesberger.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).