[Dnsmasq-discuss] DHCP packet received on <interface> which has no address
albert.aribaud at free.fr
Thu Aug 25 17:45:09 BST 2016
Le Thu, 25 Aug 2016 13:32:56 +0300
Andrew Shadura <andrew.shadura at collabora.co.uk> a écrit:
> On 25/08/16 13:26, Andrew Shadura wrote:
> > Okay, let me give you a more specific example, with just one of the
> > interfaces.
> > Let's say we've got eth0 with vlans:
> > eth0.1, static config
> > eth0.2, static config + dhcp server
> > eth0.3, dhcp client
> So, let's say we've configured eth0.1 and eth0.2, then started
> dnsmasq. It complains eth3.4 (an interface expected on a different
> machine) doesn't exist, so it'll skip and ignore it, and then it
> starts listening on eth0.2.
> Next, we bring eth0.3 up. DHCP client starts, and then dnsmasq starts
> complaining it's received a DHCP packet on eth0.3 it didn't expect.
> As I can see in the code, the first thing dnsmasq does for a packet
> received on some interface is that it attempts to determine the
> interface address. If that fails, none of the checks, which are
> further down in the code, are performed.
I believe the following is correct behavior:
- if dnsmasq received a DHCP packet on some interface, it is because the
system considered that this packet should be sent to dnsmasq.
- if dnsmasq receives a DHCP packet on an interface, it can only be
because dnsmasq should serve DHCP requests on the segment to which
this interface belongs.
- but dnsmasq can only serve DHCP requests on a segment with IPs from
the subnet of this segment, and it can only tell which subnet this
segment is on if the interface has an IP and netmask.
Applied to your case, it seems like dnsmasq receives DHCP requests on
eth0.3 which does not have an IP and netmask, and therefore rightly
complain about that.
I don't think, therefore, that what you describe as a bug is [the] one
[you are considering]. Rather, I would ask how exactly the list of
interfaces dnsmasq should listen on is efined, how exactly eth0.3 is
excluded from this list, and whether dnsmasq actually listens only to
the given list of interfaces.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 819 bytes
Desc: Signature digitale OpenPGP
More information about the Dnsmasq-discuss