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] ipv6: Do route updating for redirect in ndisc layer
Date: Wed, 11 Sep 2013 15:04:35 +0800	[thread overview]
Message-ID: <52301603.7030906@cn.fujitsu.com> (raw)
In-Reply-To: <20130910225023.GB4794@order.stressinduktion.org>

于 2013年09月11日 06:50, Hannes Frederic Sowa 写道:
> On Mon, Sep 09, 2013 at 03:09:56PM +0800, Duan Jiong wrote:
>> diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
>> index 5c71501..61fe8e5 100644
>> --- a/net/ipv6/tcp_ipv6.c
>> +++ b/net/ipv6/tcp_ipv6.c
>> @@ -382,14 +382,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;
>> -	}
>> -
> 
> You dropped the "goto out" here in case of an NDISC_REDIRECT, so this sends an
> EPROTO further up the socket layer. Was this intended?
> 

I'm sorry, i didn't notice the variable err was assigned to EPROTO.
I only thought that message should be sent to the socket layer, because
i found that in function sctp_v6_err().

In addition, the rfc 4443 said the Redirect Message is not the ICMPv6 Error
Message, so i think we shouldn't call those err_handler function, in other
words we shouldn't call the icmpv6_notify().

How do you think of this?

> Also:
> 
> In some _err() functions there is this check, e.g. ah6.c:
> 
>     621         if (type != ICMPV6_DEST_UNREACH &&
>     622             type != ICMPV6_PKT_TOOBIG &&
>     623             type != NDISC_REDIRECT)
>     624                 return;
> 
> It could actually be adjusted now as we don't handle NDISC_REDIRECTs here any
> more. I don't see any side-effects down the code in these functions. We could
> also only just match on ICMPV6_PKT_TOOBIG. Can you confirm?
> 

Yes, i agree this. 

Thanks,
  Duan

  reply	other threads:[~2013-09-11  7:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-09  7:09 [PATCH] ipv6: Do route updating for redirect in ndisc layer Duan Jiong
2013-09-10 22:50 ` Hannes Frederic Sowa
2013-09-11  7:04   ` Duan Jiong [this message]
2013-09-11 23:17     ` Hannes Frederic Sowa
2013-09-12  1:16       ` Vlad Yasevich
2013-09-12 12:07         ` Daniel Borkmann

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=52301603.7030906@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