Commit 1a462d18 authored by Duan Jiong's avatar Duan Jiong Committed by David S. Miller

net: udp: do not report ICMP redirects to user space

Redirect isn't an error condition, it should leave
the error handler without touching the socket.
Signed-off-by: default avatarDuan Jiong <duanj.fnst@cn.fujitsu.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9fe34f5d
...@@ -658,7 +658,7 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable) ...@@ -658,7 +658,7 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable)
break; break;
case ICMP_REDIRECT: case ICMP_REDIRECT:
ipv4_sk_redirect(skb, sk); ipv4_sk_redirect(skb, sk);
break; goto out;
} }
/* /*
......
...@@ -525,8 +525,10 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt, ...@@ -525,8 +525,10 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
if (type == ICMPV6_PKT_TOOBIG) if (type == ICMPV6_PKT_TOOBIG)
ip6_sk_update_pmtu(skb, sk, info); ip6_sk_update_pmtu(skb, sk, info);
if (type == NDISC_REDIRECT) if (type == NDISC_REDIRECT) {
ip6_sk_redirect(skb, sk); ip6_sk_redirect(skb, sk);
goto out;
}
np = inet6_sk(sk); np = inet6_sk(sk);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment