On 02/22/2013 02:23 PM, Laine Stump wrote:
> In most examples of dhcp-option, I see that the option value isn't
> quoted. The exceptions seem to be:
>
> 1) when there is a space in the option value, it is quoted to preserve
> the space
> 2) For option 252 to include an "empty" option,
> http://www.thekelleys.org.uk/dnsmasq/docs/dnsmasq.conf.example does this:
>
> dhcp-option=252,"\n"
>
> So now I'm wondering if the quotes in the above situation are necessary,
> or if they're superfluous. Would this:
>
> dhcp-option=252,\n
>
> end up sending the same packet, or something different?
In response to myself after experimenting - the former sends a single
newline character, the latter literally sends the two characters '\' and
'n'. Bah.
So I suppose it's reasonable to add quotes any time there is an escape
("\") character. Any other metacharacter that would require quotes?
>
> Also, what happens wrt quotes when there are multiple, comma separated
> values, eg:
>
> dhcp-option=121,192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8
>
> Could that be safely quoted as:
>
> dhcp-option=121,"192.168.1.0/24,1.2.3.4,10.0.0.0/8,5.6.7.8"
>
> ?
>
> I guess the basic question is "what, aside from spaces, must be quoted
> in a dhcp option value?"
>
> (I'm asking this because we're adding support for dhcp options to
> libvirt's networks, and the person who submitted the patch had it always
> quoting the values.)
>
> Another question I have: which options are legal for DHCP6, and are they
> only used for DHCP6 if they are listed as
>
> dhcp-option=option6:
>
> or are the plain dhcp-options also used for DHCP6 (when they don't
> involve IP addresses anyway)?
>
> ___
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss@lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
>
___
Dnsmasq-discuss mailing list
Dnsmasq-discuss@lists.thekelleys.org.uk
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss