[Dnsmasq-discuss] dropped dhcp6 packet logging revisited

Gene Czarcinski gene at czarc.net
Wed Oct 24 12:36:20 BST 2012


On 10/24/2012 06:33 AM, Simon Kelley wrote:
>> On 23/10/12 17:32, Gene Czarcinski wrote:
>>
>>> I am going to add some code to do such logging because it seems I need
>>> some proof that the problem exists. I have no idea why, but there
>>> appears to be reluctance on the part of the libvirt developers to accept
>>> adding the interface= parameter to dnsmasq. I believe that, even with my
>>> limited testing, I have seen the problem occur.
>>>
>> It's probably possible, as a fallback position, to make a dnsmasq
>> instance with a single --listen-address config do the right thing.
>> That would preclude changes to libbvirt.
>
>> Simon.
>
> OK, so this is vaguely embarrassing. Having checked the actual code,
> rather than the changelog, I see that dnsmasq >=2.61 _already_ does the
> right thing. Setting --bind-interfaces* and a single --listen-address
> will cause the code to set SO_BINDTODEVICE on the DHCP socket(s).
>
> So, there is not a problem with the existing libvirt command line.
>
> Gene, apologies for sending you on a wild-goose chase with this.
>
> * or bind-dyanmic on 2.63 and later.
>
>
OK, this explains why the problems have not been obvious becuase most 
libvirt instances of dnsmasq do have only a single --listen-address.

However, how about specification of an IPv4 and an IPv6 address?  Is 
this counted as two or as one in each type?

And then there is this little gem:  With libvirt, you can define as many 
different ip networks as you like on an interface.  There will be only 
one dnsmasq because it is really tied to the virtual network device.

Now, I am not proposing that dnsmasq make any changes because, IMO, the 
simplest answer is to add the interface= specification [it adds one line 
of code and changes nine test data files].  I am still campaigning to 
make this happen.

However, dnsmasq could check to see if all of the addresses specified 
where on the same interface and, if they were, do the bind as if 
interface= was specified.

Gene



More information about the Dnsmasq-discuss mailing list