Skip to content

Commit

Permalink
ip: use ip_hdr() in __ip_make_skb() to retrieve IP header
Browse files Browse the repository at this point in the history
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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ansis Atteka authored and David S. Miller committed Sep 19, 2013
1 parent 279f438 commit 749154a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/ipv4/ip_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 749154a

Please sign in to comment.