diff options
Diffstat (limited to 'net/ipv4/ip_forward.c')
-rw-r--r-- | net/ipv4/ip_forward.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index 369e721c4bab..467ebedb99ba 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -74,7 +74,7 @@ int ip_forward(struct sk_buff *skb) | |||
74 | * that reaches zero, we must reply an ICMP control message telling | 74 | * that reaches zero, we must reply an ICMP control message telling |
75 | * that the packet's lifetime expired. | 75 | * that the packet's lifetime expired. |
76 | */ | 76 | */ |
77 | if (skb->nh.iph->ttl <= 1) | 77 | if (ip_hdr(skb)->ttl <= 1) |
78 | goto too_many_hops; | 78 | goto too_many_hops; |
79 | 79 | ||
80 | if (!xfrm4_route_forward(skb)) | 80 | if (!xfrm4_route_forward(skb)) |
@@ -88,7 +88,7 @@ int ip_forward(struct sk_buff *skb) | |||
88 | /* We are about to mangle packet. Copy it! */ | 88 | /* We are about to mangle packet. Copy it! */ |
89 | if (skb_cow(skb, LL_RESERVED_SPACE(rt->u.dst.dev)+rt->u.dst.header_len)) | 89 | if (skb_cow(skb, LL_RESERVED_SPACE(rt->u.dst.dev)+rt->u.dst.header_len)) |
90 | goto drop; | 90 | goto drop; |
91 | iph = skb->nh.iph; | 91 | iph = ip_hdr(skb); |
92 | 92 | ||
93 | /* Decrease ttl after skb cow done */ | 93 | /* Decrease ttl after skb cow done */ |
94 | ip_decrease_ttl(iph); | 94 | ip_decrease_ttl(iph); |