net: raw: 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: Duan Jiong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
Duan Jiong 2013-09-20 18:21:25 +08:00 • committed by David S. Miller
commit 8d65b1190d
2 changed files with 6 additions and 2 deletions

View file

@ -335,8 +335,10 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb,
ip6_sk_update_pmtu(skb, sk, info);
harderr = (np->pmtudisc == IPV6_PMTUDISC_DO);
}
if (type == NDISC_REDIRECT)
if (type == NDISC_REDIRECT) {
ip6_sk_redirect(skb, sk);
return;
}
if (np->recverr) {
u8 *payload = skb->data;
if (!inet->hdrincl)