Re: [PATCH] Use '@interface' for link-local DNS servers in the dnsmasq config



Hi Dan,

Excerpts from Dan Williams's message of 2011-08-20 00:47:59 +0200:
> Thanks!  Though we do risk buffer overflows because the buffer being
> passed into the function is only INET6_ADDRSTRLEN long, so we need to be
> more careful here when appending the interface name. I've reworked that
> a bit, can you test the attached patch and make sure it does the same
> thing yours does?  It's compile-tested but not run tested.  When I
> commit you'll still get credit, of course.  Thanks for looking into
> this.
Your version of the patch has a little flaw: It only handles the case where
inet_ntop() already returns an address with %interface in it (and replaces the
% with an @ sign). However, on Linux, inet_ntop() does not return a scope
% identifier at all. In this case, we append @interface.

I reworked the code and added a better comment, so hopefully the two cases are
clear now.

Best regards,
Michael

Attachment: 0001-dnsmasq-use-interface-for-link-local-DNS-servers-in-.patch
Description: Binary data



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]