diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-12 06:27:49 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-12 06:27:49 +0200 |
commit | 55be7a9c6074f749d617a7fc1914c9a23505438c (patch) | |
tree | 507268878abc1c5f5476823264b6f9f8acefa205 /net/ipv4/ip_gre.c | |
parent | ipv4: Add ipv4_redirect() and ipv4_sk_redirect() helper functions. (diff) | |
download | linux-55be7a9c6074f749d617a7fc1914c9a23505438c.tar.xz linux-55be7a9c6074f749d617a7fc1914c9a23505438c.zip |
ipv4: Add redirect support to all protocol icmp error handlers.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/ip_gre.c')
-rw-r--r-- | net/ipv4/ip_gre.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c index 594cec35ac4d..0c3123566d76 100644 --- a/net/ipv4/ip_gre.c +++ b/net/ipv4/ip_gre.c @@ -528,6 +528,9 @@ static void ipgre_err(struct sk_buff *skb, u32 info) if (code != ICMP_EXC_TTL) return; break; + + case ICMP_REDIRECT: + break; } rcu_read_lock(); @@ -543,7 +546,11 @@ static void ipgre_err(struct sk_buff *skb, u32 info) t->parms.link, 0, IPPROTO_GRE, 0); goto out; } - + if (type == ICMP_REDIRECT) { + ipv4_redirect(skb, dev_net(skb->dev), t->parms.link, 0, + IPPROTO_GRE, 0); + goto out; + } if (t->parms.iph.daddr == 0 || ipv4_is_multicast(t->parms.iph.daddr)) goto out; |