Subject: Re: [PATCH net-next 1/2] net: neighbour: Add mcast_resolicit to configure the number of multicast resolicitations in PROBE state.

From: YOSHIFUJI Hideaki <[email-masked]>
Date: Mon, 30 Mar 2015 09:04:50 +0900

Hi,

yzhu1 wrote:
>> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
>> index 0e8b32e..3de6542 100644
>> --- a/net/core/neighbour.c
>> +++ b/net/core/neighbour.c
>> @@ -817,10 +817,9 @@ out:
>>   static __inline__ int neigh_max_probes(struct neighbour *n)
>>   {
>>       struct neigh_parms *p = n->parms;
>> -    int max_probes = NEIGH_VAR(p, UCAST_PROBES) + NEIGH_VAR(p, APP_PROBES);
>> -    if (!(n->nud_state & NUD_PROBE))
>> -        max_probes += NEIGH_VAR(p, MCAST_PROBES);
>> -    return max_probes;
>> +    return NEIGH_VAR(p, UCAST_PROBES) + NEIGH_VAR(p, APP_PROBES) +
>> +           (n->nud_state & NUD_PROBE ? NEIGH_VAR(p, MCAST_REPROBES) :
>> +            NEIGH_VAR(p, MCAST_PROBES));
>>   }
> Hi, YOSHIFUJI Hideaki
> 
> In my opinion, maybe the above should be implemented in ipv4 source code since
> this problem is only related with ipv4. But the neigh_max_probes is called in ipv6.

It is intentionally designed so that it could be used for other
protocols as well as IPv4.  For example, if the knob for IPv6
is set to non-zero, it becomes "non-compliant", but it works.

-- 
Hideaki Yoshifuji <[email-masked]>
Technical Division, MIRACLE LINUX CORPORATION