You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dnsmasq allows in configuration files only to quote strings using a pair of double qutoes ("). Inside the quotes some escape sequences using back slash are allowed.
The implementation (dnsmasq:src/option.c function read_file()) is super hairy and hard to understand. The quote handling is done by replacing the backslash with the escaped value and calling memmove(p, p+1, strlen(p+1)+1) so it is potentially quadratic (why?!)
Since I think this would not be straight forward to implement (particularly with angstrom) and none of the example configs have quoted strings I suggest we investigate if it makes sense to not implement this feature. Particularly, it would be interesting to look for configurations that use quotes to determine the value of this feature. In the meantime I suggest we don't implement this feature.
The text was updated successfully, but these errors were encountered:
Grepping the Dnsmasq man page for quote I found they suggest using quotes for --txt-record if the TXT record data contains commas. Another place is in --dhcp-option for e.g. vendor extensions. The example uses a string that looks like an ip address (1.2.3.4) but is to be interpreted literally. Dnsmasq will parse things that look like ip addresses as ip addresses if unquoted.
Now, in command line arguments it seems quotes are not allowed (or interpreted). It's unclear to me what you're supposed to do then in the above examples.
So far I think we can continue not implementing quotes.
dnsmasq allows in configuration files only to quote strings using a pair of double qutoes (
"
). Inside the quotes some escape sequences using back slash are allowed.The implementation (dnsmasq:src/option.c function read_file()) is super hairy and hard to understand. The quote handling is done by replacing the backslash with the escaped value and calling
memmove(p, p+1, strlen(p+1)+1)
so it is potentially quadratic (why?!)Since I think this would not be straight forward to implement (particularly with angstrom) and none of the example configs have quoted strings I suggest we investigate if it makes sense to not implement this feature. Particularly, it would be interesting to look for configurations that use quotes to determine the value of this feature. In the meantime I suggest we don't implement this feature.
The text was updated successfully, but these errors were encountered: