Commit 9070683bdac59a3b26e2ce6dd0d05fbfcb3fc7d8

Authored by Thomas Graf
Committed by David S. Miller
1 parent 3e192beaf5

[IPV4]: Remove some dead code from ip_forward()

Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 5 deletions Side-by-side Diff

net/ipv4/ip_forward.c
... ... @@ -76,16 +76,12 @@
76 76 * that reaches zero, we must reply an ICMP control message telling
77 77 * that the packet's lifetime expired.
78 78 */
79   -
80   - iph = skb->nh.iph;
81   -
82   - if (iph->ttl <= 1)
  79 + if (skb->nh.iph->ttl <= 1)
83 80 goto too_many_hops;
84 81  
85 82 if (!xfrm4_route_forward(skb))
86 83 goto drop;
87 84  
88   - iph = skb->nh.iph;
89 85 rt = (struct rtable*)skb->dst;
90 86  
91 87 if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)