2015-07-30 8:45 GMT+08:00 YOSHIFUJI Hideaki
<hideaki.yoshif...@miraclelinux.com>:

>>> How about ignoring hop limit without message is configured value is
>>> larger than 255, BTW?
>>
>> Although set accept_ra_min_hop_limit great than 255 is meaningless,  there
>> is also no need to check it since icmp6_hop_limit will not larger than 255. 
>> so
>>
>> +               if (in6_dev->cnf.accept_ra_min_hop_limit <= 255 &&
>> +                   in6_dev->cnf.accept_ra_min_hop_limit <=
>> ra_msg->icmph.icmp6_hop_limit )
>>                         in6_dev->cnf.hop_limit = 
>> ra_msg->icmph.icmp6_hop_limit;
>>
>> is  duplicated check. How do you think?
>
> How about checking in6_dev->cnf.accept_ra_min_hop_limit by outer if, then?
>
>
> if (in6_dev->cnf.accept_ra_min_hop_limit < 256 &&
>     ra_msg->icmph.icmp6_hop_limit) {
> ...
> }

Then let's move all the if check outside, I will send a v4 patch for you review.

Thanks
Hangbin
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to