public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Duan Jiong <duanj.fnst@cn•fujitsu.com>
To: hannes@stressinduktion•org
Cc: davem@davemloft•net, netdev@vger•kernel.org
Subject: Re: [PATCH 10/11] ipv6: move route updating for redirect to ndisc layer
Date: Fri, 13 Sep 2013 09:38:39 +0800	[thread overview]
Message-ID: <52326C9F.5070700@cn.fujitsu.com> (raw)
In-Reply-To: <20130912220435.GC2101@order.stressinduktion.org>

于 2013年09月13日 06:04, Hannes Frederic Sowa 写道:
> On Thu, Sep 12, 2013 at 06:51:49PM +0800, Duan Jiong wrote:
>> From: Duan Jiong <duanj.fnst@cn•fujitsu.com>
>>
>> And when dealing with redirect message, the err shoud
>> be assigned to 0.
>>
>> Signed-off-by: Duan Jiong <duanj.fnst@cn•fujitsu.com>
>> ---
>>  net/ipv6/raw.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c
>> index 58916bb..6138199 100644
>> --- a/net/ipv6/raw.c
>> +++ b/net/ipv6/raw.c
>> @@ -336,7 +336,7 @@ static void rawv6_err(struct sock *sk, struct sk_buff *skb,
>>  		harderr = (np->pmtudisc == IPV6_PMTUDISC_DO);
>>  	}
>>  	if (type == NDISC_REDIRECT)
>> -		ip6_sk_redirect(skb, sk);
>> +		err = 0;
>>  	if (np->recverr) {
>>  		u8 *payload = skb->data;
>>  		if (!inet->hdrincl)
> 
> Hm, I don't like the cirumstance that we first call icmpv6_err_convert at
> first and get back a bogus error value and later on convert it to something
> meaningful.
> 
> Either:
> a) Don't call icmpv6_err_convert at all for redirects. Then we could
>    place a WARN_ON(type == NDISC_REDIRECT) into this function to find future
>    missuse of this function with redirects or
> 
> b) handle the update of the NDISC_REDIRECT error code directly in
>    icmpv6_err_convert.
> 
> Also that you used the same headings for some commits shows that you could
> perhaps squash them into one patch.
> 
> Otherwise I'm fine with the changes, thanks.
> 

Thanks for you help, i will modify my patch.

Thanks,
  Duan

  reply	other threads:[~2013-09-13  1:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-12 10:41 [PATCH 00/11] ipv6: Do route updating for redirect in ndisc layer Duan Jiong
2013-09-12 10:43 ` [PATCH 01/11] " Duan Jiong
2013-09-12 21:54   ` Hannes Frederic Sowa
2013-09-12 10:44 ` [PATCH 02/11] dccp: move route updating for redirect to " Duan Jiong
2013-09-12 10:45 ` [PATCH 03/11] ipv6: " Duan Jiong
2013-09-12 10:46 ` [PATCH 04/11] " Duan Jiong
2013-09-12 19:03   ` David Miller
2013-09-12 10:47 ` [PATCH 05/11] " Duan Jiong
2013-09-12 10:49 ` [PATCH 06/11] ip6tnl: " Duan Jiong
2013-09-12 10:49 ` [PATCH 07/11] ipv6: " Duan Jiong
2013-09-12 10:50 ` [PATCH 08/11] " Duan Jiong
2013-09-12 10:51 ` [PATCH 09/11] sctp: " Duan Jiong
2013-09-12 12:33   ` Daniel Borkmann
2013-09-12 10:51 ` [PATCH 10/11] ipv6: " Duan Jiong
2013-09-12 22:04   ` Hannes Frederic Sowa
2013-09-13  1:38     ` Duan Jiong [this message]
2013-09-12 10:52 ` [PATCH 11/11] " 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=52326C9F.5070700@cn.fujitsu.com \
    --to=duanj.fnst@cn$(echo .)fujitsu.com \
    --cc=davem@davemloft$(echo .)net \
    --cc=hannes@stressinduktion$(echo .)org \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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