[Dnsmasq-discuss] Adding Route Information Option to prefixes in RA

Simon Kelley simon at thekelleys.org.uk
Sat Sep 6 18:12:25 BST 2014


On 01/09/14 07:59, Ilya Ponetaev wrote:
> The RFC is definitely unclear about size of prefix to be sended, but as
> I concluded from it the only restriction is that we must set net and
> host bits of prefix to zero. But on the other hand previous approach
> leads to wasting resources, so I reworked code to send only necessary data.

That's good. When I came to apply this, I found one more thing that
needs to be thought about. The default router preference in the RA
header can be configured in dnsmasq. I guess that the route preference
in the route information option should take the same value, as the route
is always via the same router as the default router.

(There's no need to send another patch, I can easily make the change, I
just want to ask people if they agree with my reasoning.)



Cheers,

Simon.



> 
> On 08/31/2014 01:59 AM, Simon Kelley wrote:
> 
>>
>> In principle, this is fine.
>>
>> Just based on reading the RFC (which isn't very clear) I think the
>> strategy of always sending the prefix as full-sized may not be valid, or
>> at least may confuse some hosts.
>>
>>
>>
>> Prefix Length
>>                 8-bit unsigned integer.  The number of leading bits in
>>                 the Prefix that are valid.  The value ranges from 0 to
>>                 128.  The Prefix field is 0, 8, or 16 octets depending on
>>                 Length.
>>
>> I read this as saying that if the prefix length is <= 64, then the
>> Prefix field should be 8 octets long and the total option length should
>> be 2*8 octets, and if the prefix-length is zero, the total option length
>> should be 1 unit if 8 octets, just for the header.
>>
>> So I don't think it's necessarily legit to always make the option length
>> 24 octets, certainly reducing the option length for short prefix is
>> definitely OK, so we should do that, to confirm to the principle of "be
>> conservative about what you send"
>>
>> Cheers,
>>
>> Simon.
>>
> 
> 
> 
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
> 




More information about the Dnsmasq-discuss mailing list