diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-12 00:27:49 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-12 00:27:49 -0400 |
commit | 55be7a9c6074f749d617a7fc1914c9a23505438c (patch) | |
tree | 507268878abc1c5f5476823264b6f9f8acefa205 /net/ipv4/ipip.c | |
parent | b42597e2f36e2043756aa7462faddf630962f061 (diff) |
ipv4: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ipip.c')
-rw-r--r-- | net/ipv4/ipip.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c index 715338a1b205..c2d0e6d8baaf 100644 --- a/net/ipv4/ipip.c +++ b/net/ipv4/ipip.c | |||
@@ -360,6 +360,8 @@ static int ipip_err(struct sk_buff *skb, u32 info) | |||
360 | if (code != ICMP_EXC_TTL) | 360 | if (code != ICMP_EXC_TTL) |
361 | return 0; | 361 | return 0; |
362 | break; | 362 | break; |
363 | case ICMP_REDIRECT: | ||
364 | break; | ||
363 | } | 365 | } |
364 | 366 | ||
365 | err = -ENOENT; | 367 | err = -ENOENT; |
@@ -376,6 +378,13 @@ static int ipip_err(struct sk_buff *skb, u32 info) | |||
376 | goto out; | 378 | goto out; |
377 | } | 379 | } |
378 | 380 | ||
381 | if (type == ICMP_REDIRECT) { | ||
382 | ipv4_redirect(skb, dev_net(skb->dev), t->dev->ifindex, 0, | ||
383 | IPPROTO_IPIP, 0); | ||
384 | err = 0; | ||
385 | goto out; | ||
386 | } | ||
387 | |||
379 | if (t->parms.iph.daddr == 0) | 388 | if (t->parms.iph.daddr == 0) |
380 | goto out; | 389 | goto out; |
381 | 390 | ||