<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Jun 30, 2015 at 3:24 PM, Albert ARIBAUD <span dir="ltr"><<a href="mailto:albert.aribaud@free.fr" target="_blank">albert.aribaud@free.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Bonjour Michał,<br>
<br>
Le Tue, 30 Jun 2015 13:54:11 +0200, Michał Lipka <michal@lipka.email> a<br>
écrit :<br>
<div><div class="h5"><br>
> 2015-06-30 12:10 GMT+02:00 Maciej Soltysiak <<a href="mailto:maciej@soltysiak.com">maciej@soltysiak.com</a>>:<br>
><br>
> > On Tue, Jun 30, 2015 at 4:03 AM, <a href="mailto:wkitty42@gmail.com">wkitty42@gmail.com</a> <<a href="mailto:wkitty42@gmail.com">wkitty42@gmail.com</a>><br>
> > wrote:<br>
> ><br>
> >><br>
> >> On 06/29/2015 04:01 PM, Michał Lipka wrote:<br>
> >><br>
> >>><br>
> >>> 2015-06-25 16:02 GMT+02:00 <a href="mailto:wkitty42@gmail.com">wkitty42@gmail.com</a><br>
> >>>     does breaking the line work?<br>
> >>><br>
> >>>     eg:<br>
> >>>     dhcp-option=249,<a href="http://10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4" rel="noreferrer" target="_blank">10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4</a><br>
> >>>     <<a href="http://10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4" rel="noreferrer" target="_blank">http://10.0.0.1/32,1.2.3.4,192.168.13.15/32,1.2.3.4</a>>, \<br>
> >>>     <a href="http://192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4" rel="noreferrer" target="_blank">192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4</a><br>
> >>>     <<a href="http://192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4" rel="noreferrer" target="_blank">http://192.168.13.16/32,1.2.3.4,192.168.13.17/32,1.2.3.4</a>>, \<br>
> >>>     <a href="http://192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4" rel="noreferrer" target="_blank">192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4</a><br>
> >>>     <<a href="http://192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4" rel="noreferrer" target="_blank">http://192.168.13.18/32,1.2.3.4,192.168.13.19/32,1.2.3.4</a>>, \<br>
> >>>     <a href="http://192.168.13.20/32,1.2.3.4" rel="noreferrer" target="_blank">192.168.13.20/32,1.2.3.4</a> <<a href="http://192.168.13.20/32,1.2.3.4" rel="noreferrer" target="_blank">http://192.168.13.20/32,1.2.3.4</a>><br>
> >>><br>
> >>><br>
> >>> Thank you for this idea. Unfortunately it does not work. dnsmasq fails<br>
> >>> at first<br>
> >>> line which has no option:<br>
> >>><br>
> >><br>
> >> sounds like an option that should maybe be implemented... especially<br>
> >> since it is an apparent standard that so many tools do follow ;)<br>
> >><br>
> > I think dnsmasq has a 1024 characters for config lines. I browsed the<br>
> > source briefly last night but couldn't find it.<br>
> ><br>
><br>
> I checked it more precisely and it turned out that is not line length that<br>
> bothers dnsmasq. It's routes count.<br>
> I can set up to 28 routes in single dhcp-option line. It doesn't matter if<br>
> it will take 600 or 800 characters. If I set 29th route dnsmasq complains<br>
> about option too long:<br>
><br>
> dnsmasq: dhcp-option too long at line 320 of /etc/dnsmasq.conf<br>
> Can you check the code once again and try to find this limit (28) ? Why it<br>
> is like that?<br>
<br>
</div></div>Could it be that the total DHCP packet size goes over the maximum<br>
allowed size for an UDP frame?<br></blockquote><div>Perhaps. The offending code is related to the length of the dhcp option, not the number of routes per se:</div><div><br></div><div>  if (!is6 &&</div><div>      ((new->len > 255) ||</div><div>      (new->len > 253 && (new->flags & (DHOPT_VENDOR | DHOPT_ENCAPSULATE))) ||</div><div>       (new->len > 250 && (new->flags & DHOPT_RFC3925))))</div><div>    ret_err(_("dhcp-option too long"));</div><div><br></div><div>I guess you can stick more than 255 bytes in a dhcp packet, anyone knows if the limit is coming from RFCs or elsewhere?</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
Amicalement,<br>
<span class=""><font color="#888888">--<br>
Albert.</font></span></blockquote><div>Best regards, </div><div>Maciej</div><div><br></div></div></div></div>