From: Duan Jiong <djduanjiong@gmail.com>
To: Duan Jiong <duanj.fnst@cn.fujitsu.com>, davem@davemloft.net
Cc: netdev@vger.kernel.org, hannes@stressinduktion.org
Subject: Re: [PATCH 1/6] ipv6: del the statements for updating route in, (dccp|tcp|sctp)_v6_err
Date: Mon, 16 Sep 2013 20:31:28 +0800 [thread overview]
Message-ID: <5236FA20.2000705@gmail.com> (raw)
In-Reply-To: <5236F03F.5020407@cn.fujitsu.com>
Sorry, i forgot to add "v3" in title.
Thanks,
Duan
于 2013/9/16 19:49, Duan Jiong 写道:
> Because we will do route updating for redirect in nidsc layer. And
> when dealing with redirect message, the dccp and sctp should like
> tcp return directly.
>
> Signed-off-by: Duan Jiong <duanj.fnst@cn.fujitsu.com>
> ---
> net/dccp/ipv6.c | 10 +++-------
> net/ipv6/tcp_ipv6.c | 12 ++++--------
> net/sctp/input.c | 12 ------------
> net/sctp/ipv6.c | 6 +++---
> 4 files changed, 10 insertions(+), 30 deletions(-)
>
> diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
> index 9c61f9c..300840c 100644
> --- a/net/dccp/ipv6.c
> +++ b/net/dccp/ipv6.c
> @@ -98,6 +98,9 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> return;
> }
>
> + if (type == NDISC_REDIRECT)
> + return;
> +
> sk = inet6_lookup(net, &dccp_hashinfo,
> &hdr->daddr, dh->dccph_dport,
> &hdr->saddr, dh->dccph_sport, inet6_iif(skb));
> @@ -130,13 +133,6 @@ static void dccp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>
> np = inet6_sk(sk);
>
> - if (type == NDISC_REDIRECT) {
> - struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
> -
> - if (dst)
> - dst->ops->redirect(dst, sk, skb);
> - }
> -
> if (type == ICMPV6_PKT_TOOBIG) {
> struct dst_entry *dst = NULL;
>
> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
> index 5c71501..d3ca8a4 100644
> --- a/net/ipv6/tcp_ipv6.c
> +++ b/net/ipv6/tcp_ipv6.c
> @@ -346,6 +346,10 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> __u32 seq;
> struct net *net = dev_net(skb->dev);
>
> +
> + if (type == NDISC_REDIRECT)
> + return;
> +
> sk = inet6_lookup(net, &tcp_hashinfo, &hdr->daddr,
> th->dest, &hdr->saddr, th->source, skb->dev->ifindex);
>
> @@ -382,14 +386,6 @@ static void tcp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
>
> np = inet6_sk(sk);
>
> - if (type == NDISC_REDIRECT) {
> - struct dst_entry *dst = __sk_dst_check(sk, np->dst_cookie);
> -
> - if (dst)
> - dst->ops->redirect(dst, sk, skb);
> - goto out;
> - }
> -
> if (type == ICMPV6_PKT_TOOBIG) {
> /* We are not interested in TCP_LISTEN and open_requests
> * (SYN-ACKs send out by Linux are always <576bytes so
> diff --git a/net/sctp/input.c b/net/sctp/input.c
> index 5f20686..0d2d4b7 100644
> --- a/net/sctp/input.c
> +++ b/net/sctp/input.c
> @@ -413,18 +413,6 @@ void sctp_icmp_frag_needed(struct sock *sk, struct sctp_association *asoc,
> sctp_retransmit(&asoc->outqueue, t, SCTP_RTXR_PMTUD);
> }
>
> -void sctp_icmp_redirect(struct sock *sk, struct sctp_transport *t,
> - struct sk_buff *skb)
> -{
> - struct dst_entry *dst;
> -
> - if (!t)
> - return;
> - dst = sctp_transport_dst_check(t);
> - if (dst)
> - dst->ops->redirect(dst, sk, skb);
> -}
> -
> /*
> * SCTP Implementer's Guide, 2.37 ICMP handling procedures
> *
> diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c
> index da613ce..ee12d87 100644
> --- a/net/sctp/ipv6.c
> +++ b/net/sctp/ipv6.c
> @@ -151,6 +151,9 @@ static void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> int err;
> struct net *net = dev_net(skb->dev);
>
> + if (type == NDISC_REDIRECT)
> + return;
> +
> idev = in6_dev_get(skb->dev);
>
> /* Fix up skb to look at the embedded net header. */
> @@ -181,9 +184,6 @@ static void sctp_v6_err(struct sk_buff *skb, struct inet6_skb_parm *opt,
> goto out_unlock;
> }
> break;
> - case NDISC_REDIRECT:
> - sctp_icmp_redirect(sk, transport, skb);
> - break;
> default:
> break;
> }
next prev parent reply other threads:[~2013-09-16 12:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-16 11:47 [PATCH v3 0/6] ipv6: Do route updating for redirect in ndisc layer Duan Jiong
2013-09-16 11:49 ` [PATCH 1/6] ipv6: del the statements for updating route in, (dccp|tcp|sctp)_v6_err Duan Jiong
2013-09-16 12:31 ` Duan Jiong [this message]
2013-09-16 11:51 ` [PATCH v3 2/6] ipv6: just match on ICMPV6_PKT_TOOBIG in those err_handle Duan Jiong
2013-09-16 11:52 ` [PATCH v3 3/6] ipv6: del statements for dealing with NDISC_REDIRECT Duan Jiong
2013-09-16 11:52 ` [PATCH 4/6] ip6tnl: move route updating for redirect to ndisc layer Duan Jiong
2013-09-16 11:53 ` [PATCH v3 5/6] ipv6: modify the err to 0 when dealing with, NDISC_REDIRECT Duan Jiong
2013-09-16 11:53 ` [PATCH v3 6/6] ipv6: Do route updating for redirect in ndisc layer Duan Jiong
2013-09-16 12:22 ` [PATCH v3 0/6] " Daniel Borkmann
2013-09-16 14:08 ` Duan Jiong
2013-09-17 9:00 ` Daniel Borkmann
2013-09-17 13:52 ` Hannes Frederic Sowa
2013-09-16 12:41 ` Duan Jiong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5236FA20.2000705@gmail.com \
--to=djduanjiong@gmail.com \
--cc=davem@davemloft.net \
--cc=duanj.fnst@cn.fujitsu.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).