Skip to content

Commit

Permalink
net: udp: do not report ICMP redirects to user space
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Duan Jiong authored and David S. Miller committed Sep 24, 2013
1 parent 9fe34f5 commit 1a462d1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion net/ipv4/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ void __udp4_lib_err(struct sk_buff *skb, u32 info, struct udp_table *udptable)
break;
case ICMP_REDIRECT:
ipv4_sk_redirect(skb, sk);
break;
goto out;
}

/*
Expand Down
4 changes: 3 additions & 1 deletion net/ipv6/udp.c
Original file line number Diff line number Diff line change
Expand Up @@ -525,8 +525,10 @@ void __udp6_lib_err(struct sk_buff *skb, struct inet6_skb_parm *opt,

if (type == ICMPV6_PKT_TOOBIG)
ip6_sk_update_pmtu(skb, sk, info);
if (type == NDISC_REDIRECT)
if (type == NDISC_REDIRECT) {
ip6_sk_redirect(skb, sk);
goto out;
}

np = inet6_sk(sk);

Expand Down

0 comments on commit 1a462d1

Please sign in to comment.