[Dnsmasq-discuss] Support of labels in --interface

Petr Mensik pemensik at redhat.com
Wed Feb 15 17:38:21 GMT 2017


I am new maintainer of dnsmasq package in RHEL. I am looking for potential problems with upgrade from dnsmasq 2.66 to version 2.76. And I have found something.
Commit [1] changed behaviour of --interface eth0:0 behavior.

The first problem is, manual page is not updated. It tells you cannot use labels, but you can.
Also it does not tell you you can use -i eth0,eth0:0,eth0:1,lo, but that is minor change.

Labels are now supported and dnsmasq is able to bind only to secondary IPv4 interface with different address. (Since 2.67!)
It works well with --bind-interfaces. However it has inconsistent behavior with and without that option.

Let's say my configuration is:
4: virbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 52:54:00:2b:ee:d3 brd ff:ff:ff:ff:ff:ff
    inet brd scope global virbr0
       valid_lft forever preferred_lft forever
    inet scope global secondary virbr0:1
       valid_lft forever preferred_lft forever

$ dnsmasq -i virbr0
will respond to queries to both addresses. It might be useful backward compatibility feature.
$ dnsmasq -i virbr0:1
Will respond only on address Ok, call it a feature.

Problem is,
$ dnsmasq -i virbr0 -z
Will respond only on address, as I would expect.

$ dnsmasq -i virbr0:1 -z
Behaves the same way, as without -z.

I think different behavior is an error. It might be a feature, but even then, it has to be documented.

[1] http://thekelleys.org.uk/gitweb/?p=dnsmasq.git;a=commit;h=3f2873d42c4d7e7dba32b6e64a3687d43928bc8e

Petr Menšík
Software Engineer
Red Hat, http://www.redhat.com/
email: pemensik at redhat.com  PGP: 65C6C973

More information about the Dnsmasq-discuss mailing list