Commit cd176b57 authored by Ansis Atteka's avatar Ansis Atteka Committed by Greg Kroah-Hartman

ip: use ip_hdr() in __ip_make_skb() to retrieve IP header

[ Upstream commit 749154aa ]

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: default avatarAnsis Atteka <aatteka@nicira.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f25e4f35
...@@ -1324,7 +1324,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk, ...@@ -1324,7 +1324,7 @@ struct sk_buff *__ip_make_skb(struct sock *sk,
else else
ttl = ip_select_ttl(inet, &rt->dst); ttl = ip_select_ttl(inet, &rt->dst);
iph = (struct iphdr *)skb->data; iph = ip_hdr(skb);
iph->version = 4; iph->version = 4;
iph->ihl = 5; iph->ihl = 5;
iph->tos = inet->tos; iph->tos = inet->tos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment