diff mbox

[net,v2,1/2] ip: use ip_hdr() in __ip_make_skb() to retrieve IP header

Message ID 1379543393-7446-1-git-send-email-aatteka@nicira.com
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Ansis Atteka Sept. 18, 2013, 10:29 p.m. UTC
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(-)

Comments

David Miller Sept. 19, 2013, 6:11 p.m. UTC | #1
From: Ansis Atteka <aatteka@nicira.com>
Date: Wed, 18 Sep 2013 15:29:52 -0700

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

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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;