[Dnsmasq-discuss] TFTP not working with listen-address?
Simon Kelley
simon at thekelleys.org.uk
Wed Feb 28 15:18:14 GMT 2007
William Dinkel wrote:
> Simon,
>
> First of all, many thanks for such a great server. I'm not going to
> miss configuring dhcpd/tftpd/named. =)
>
> Now to my question: Using v2.38 of dnsmasq, the following dnsmasq.conf
> config file would not produce any TFTP transactions after a successful
> DHCP request:
>
> domain-needed
> bogus-priv
> listen-address=127.0.0.1
> listen-address=172.16.100.1
> dhcp-range=172.16.64.1,172.16.99.254,255.255.0.0,30m
> read-ethers
> dhcp-boot=pxelinux.0
> enable-tftp
> tftp-root=/tftpboot
> dhcp-authoritative
>
> Replacing the listen-address entries with an interface entry fixed the
> problem and produced the expected TFTP traffic:
>
> domain-needed
> bogus-priv
> interface=eth0
> dhcp-range=172.16.64.1,172.16.99.254,255.255.0.0,30m
> read-ethers
> dhcp-boot=pxelinux.0
> enable-tftp
> tftp-root=/tftpboot
> dhcp-authoritative
>
> Is this expected behavior?
>
>
Intended behaviour? - no
Expected behaviour? - well, looking at the code, yes. It's a bug.
Sorry about that: the attached patch fixes it.
Cheers,
Simon.
-------------- next part --------------
--- dnsmasq-2.38/dnsmasq-2.38/src/tftp.c 2007-02-11 21:33:48.000000000 +0000
+++ dnsmasq-2.39/dnsmasq-2.39/src/tftp.c 2007-02-28 15:02:53.000000000 +0000
@@ -106,7 +106,8 @@
if (addr.sin_addr.s_addr == 0)
return;
- if (!iface_check(daemon, AF_INET, (struct all_addr *)&addr, &ifr, &if_index))
+ if (!iface_check(daemon, AF_INET, (struct all_addr *)&addr.sin_addr,
+ &ifr, &if_index))
return;
/* allowed interfaces are the same as for DHCP */
More information about the Dnsmasq-discuss
mailing list