[Dnsmasq-discuss] Incorrect broadcast address given

Simon Kelley simon at thekelleys.org.uk
Wed Oct 8 14:58:22 BST 2008

OB Lutz wrote:
> The routing is fine. All the eth*s are bridged to br-lan, which is
> given ( ath0 is,
> ath1 iptables rules take care of forwarding
> appropriate traffic around. Routing is not an issue.
> Shoving various log messages into dnsmasq, i could see that when going
> through the block of code at dhcp.c: complete_context,line 404-405
> if (is_same_net(broadcast, context->start, context->netmask))
> 		    context->broadcast = broadcast;
> Prior to sending the response back, dnsmasq would pass through here
> about 4 times. Most passes the correct broadcast address
> would be put in context->broadcast, but the final pass always put in
> the incorrect I assume the only pass with relevance to
> the broadcast address offered in  dnsmasq's response was the last one.

That code gets called for each address associated with each interface. 
Maybe you have more than one address set up on the interface, with a 
different broadcast address for some. What does

ip addr show


> Now, I'm no expert in the ways of dnsmasq so maybe I'm just not seeing
> something thats blatantly obvious to all of you. But seeing as how
> dhcp is dhcp and ip routing is ip routing, why would my network setup
> have any influence on the address dnsmasq gives for broadcast? If i
> tell it to give addresses in the range of through
> with a mask of, why should it do any
> different? It happily respects my configuration when I force the
> broadcast address, why should it ignore my other configs?
If you don't explicitly configure it, it tries to use the interface 
configuration. To understand why it's doing what it is, we need to know 
what that is.



More information about the Dnsmasq-discuss mailing list