summaryrefslogtreecommitdiffstats
path: root/net/ipv4/raw.c
diff options
context:
space:
mode:
authorDuan Jiong <duanj.fnst@cn.fujitsu.com>2013-09-20 18:21:25 +0800
committerDavid S. Miller <davem@davemloft.net>2013-09-24 10:15:49 -0400
commit8d65b1190ddc548b0411477f308d04f4595bac57 (patch)
tree5a27064eead0557336a558d3ddf8fc6e26fde048 /net/ipv4/raw.c
parent1a462d189280b560bd84af1407e4d848e262b3b3 (diff)
downloadop-kernel-dev-8d65b1190ddc548b0411477f308d04f4595bac57.zip
op-kernel-dev-8d65b1190ddc548b0411477f308d04f4595bac57.tar.gz
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 <duanj.fnst@cn.fujitsu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r--net/ipv4/raw.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c
index bfec521..193db03 100644
--- a/net/ipv4/raw.c
+++ b/net/ipv4/raw.c
@@ -218,8 +218,10 @@ static void raw_err(struct sock *sk, struct sk_buff *skb, u32 info)
if (type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED)
ipv4_sk_update_pmtu(skb, sk, info);
- else if (type == ICMP_REDIRECT)
+ else if (type == ICMP_REDIRECT) {
ipv4_sk_redirect(skb, sk);
+ return;
+ }
/* Report error on raw socket, if:
1. User requested ip_recverr.
OpenPOWER on IntegriCloud