Pārlūkot izejas kodu

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

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>
Ansis Atteka 12 gadi atpakaļ
vecāks
revīzija
749154aa56
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      net/ipv4/ip_output.c

+ 1 - 1
net/ipv4/ip_output.c

@@ -1316,7 +1316,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;