Skip to content

Commit

Permalink
[IPV4]: Remove some dead code from ip_forward()
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Thomas Graf authored and David S. Miller committed Aug 29, 2005
1 parent 3e192be commit 9070683
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions net/ipv4/ip_forward.c
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ int ip_forward(struct sk_buff *skb)
* that reaches zero, we must reply an ICMP control message telling
* that the packet's lifetime expired.
*/

iph = skb->nh.iph;

if (iph->ttl <= 1)
if (skb->nh.iph->ttl <= 1)
goto too_many_hops;

if (!xfrm4_route_forward(skb))
goto drop;

iph = skb->nh.iph;
rt = (struct rtable*)skb->dst;

if (opt->is_strictroute && rt->rt_dst != rt->rt_gateway)
Expand Down

0 comments on commit 9070683

Please sign in to comment.