[Dnsmasq-discuss] Incorrect broadcast address given
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 192.168.8.225/27 (255.255.255.224). ath0 is 192.168.8.226/27,
> ath1 192.168.8.227/27. 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 192.168.8.255 broadcast address
> would be put in context->broadcast, but the final pass always put in
> the incorrect 192.168.8.226. 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 192.168.8.230 through
> 192.168.8.254 with a mask of 255.255.255.224, 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