[Dnsmasq-discuss] how to configure lot of static routes

Maciej Soltysiak maciej at soltysiak.com
Tue Jun 30 11:10:10 BST 2015


On Tue, Jun 30, 2015 at 4:03 AM, wkitty42 at gmail.com <wkitty42 at gmail.com>
wrote:

>
> On 06/29/2015 04:01 PM, Michał Lipka wrote:
>
>>
>> 2015-06-25 16:02 GMT+02:00 wkitty42 at gmail.com
>>     does breaking the line work?
>>
>>     eg:
>>     dhcp-option=249,10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4
>>     <http://10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4>, \
>>     192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4
>>     <http://192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4>, \
>>     192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4
>>     <http://192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4>, \
>>     192.168.13.20/32,1.2.3.4 <http://192.168.13.20/32,1.2.3.4>
>>
>>
>> Thank you for this idea. Unfortunately it does not work. dnsmasq fails at
>> first
>> line which has no option:
>>
>
> sounds like an option that should maybe be implemented... especially since
> it is an apparent standard that so many tools do follow ;)
>
I think dnsmasq has a 1024 characters for config lines. I browsed the
source briefly last night but couldn't find it.
Anyway, I too hit this when I configure dummy zones to return NXDOMAIN.
What I do to get around this is to use mutliple directives, e.g.:
server=/doubleclick.net/...bla bla bla bla bla /
server=/nextline.goes.here/more.domains.to.return.nxdomain.for/

Would it work if you did something similar:
dhcp-option=249,routes go here,routes go here,
dhcp-option=249,more routes go here,...
dhcp-option=249,even more routes go here,...

So that each line is less than 1024 characters?

Best regards,
Maciej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20150630/0381d82f/attachment.html>


More information about the Dnsmasq-discuss mailing list