Message ID | 4796401.BXlLaoS7qO@cpaasch-mac |
---|---|
State | RFC, archived |
Delegated to: | David Miller |
Headers | show |
Hello. On 06-04-2013 13:18, Christoph Paasch wrote: > From: Christoph Paasch <christoph.paasch@uclouvain.be> > Date: Sat, 6 Apr 2013 10:21:01 +0200 > Subject: [PATCH] ipv6/tcp: Stop processing ICMPv6 redirect messages > Upon reception of an ICMPv6 Redirect message, we should not continue > inside tcp_v6_err. Otherwise, an error will be reported or request-socks > will be closed. > Adds also some parantheses to respect codingstyle guidelines. When you say "älso", it's often a good indicator there should be another patch -- like in this case. > Reported-by: Tetja Rediske <tetja@tetja.de> > Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be> > --- > net/ipv6/tcp_ipv6.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c > index 1033d2b..24434c5 100644 > --- a/net/ipv6/tcp_ipv6.c > +++ b/net/ipv6/tcp_ipv6.c > @@ -386,6 +386,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, > > if (dst) > dst->ops->redirect(dst, sk, skb); > + goto out; > } > > if (type == ICMPV6_PKT_TOOBIG) { > @@ -441,16 +442,18 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, > sk->sk_error_report(sk); /* Wake people up to see the error (see connect in sock.c) */ > > tcp_done(sk); > - } else > + } else { > sk->sk_err_soft = err; > + } > goto out; > } > > if (!sock_owned_by_user(sk) && np->recverr) { > sk->sk_err = err; > sk->sk_error_report(sk); > - } else > + } else { > sk->sk_err_soft = err; > + } > > out: > bh_unlock_sock(sk); WBR, Sergei -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 1033d2b..24434c5 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -386,6 +386,7 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, if (dst) dst->ops->redirect(dst, sk, skb); + goto out; } if (type == ICMPV6_PKT_TOOBIG) { @@ -441,16 +442,18 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt, sk->sk_error_report(sk); /* Wake people up to see the error (see connect in sock.c) */ tcp_done(sk); - } else + } else { sk->sk_err_soft = err; + } goto out; } if (!sock_owned_by_user(sk) && np->recverr) { sk->sk_err = err; sk->sk_error_report(sk); - } else + } else { sk->sk_err_soft = err; + } out: bh_unlock_sock(sk);