netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header
@ 2013-09-18 22:29 Ansis Atteka
  2013-09-18 22:29 ` [PATCH net v2 2/2] ip: generate unique IP identificator if local fragmentation is allowed Ansis Atteka
  2013-09-19 18:11 ` [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Ansis Atteka @ 2013-09-18 22:29 UTC (permalink / raw)
  To: netdev; +Cc: Ansis Atteka

skb->data already points to IP header, but for the sake of
consistency we can also use ip_hdr() to retrieve it.

Signed-off-by: Ansis Atteka <aatteka@nicira.com>
---
 net/ipv4/ip_output.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/ipv4/ip_output.c b/net/ipv4/ip_output.c
index 9ee17e3..eae2e26 100644
--- a/net/ipv4/ip_output.c
+++ b/net/ipv4/ip_output.c
@@ -1316,7 +1316,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
 	else
 		ttl = ip_select_ttl(inet, &rt->dst);
 
-	iph = (struct iphdr *)skb->data;
+	iph = ip_hdr(skb);
 	iph->version = 4;
 	iph->ihl = 5;
 	iph->tos = inet->tos;
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-09-19 18:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-18 22:29 [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header Ansis Atteka
2013-09-18 22:29 ` [PATCH net v2 2/2] ip: generate unique IP identificator if local fragmentation is allowed Ansis Atteka
2013-09-19 18:11   ` David Miller
2013-09-19 18:11 ` [PATCH net v2 1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header David Miller

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).