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

Simon Kelley simon at thekelleys.org.uk
Sat Aug 30 22:59:58 BST 2014


On 29/08/14 11:48, Ilya Ponetaev wrote:
> Hi
> When we use dnsmasq with RA enabled, it's obvious that prefixes
> announced in RA should be routed through the same router that dnsmasq runs.
> This patch adds Route Information Option (RFC 4191 ch 2.3) to every
> announced prefix.
> 
> 

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.




More information about the Dnsmasq-discuss mailing list