[Dnsmasq-discuss] Decouple enable-tftp and no-dhcp-interface

Lonnie Abelbeck lists at lonnie.abelbeck.com
Sun Jun 23 20:34:49 BST 2013


I'd like to suggest that enable-tftp and no-dhcp-interface should be decoupled.

Not only is it confusing that no-dhcp-interface also disables enable-tftp for that interface, but it is sometimes desirable to allow DNS and TFTP on an interface without DHCP.

Looking at "src/tftp.c" is seems there is no dependance on DHCP except to walk the no-dhcp-interface args when HAVE_DHCP is defined.

Ideally, IMHO, enable-tftp should be independent from HAVE_DHCP and add a new "no-tftp-interface" config that would be tested for interface exceptions instead of no-dhcp-interface.

Reasonable ?

This "hack patch" makes enable-tftp no longer dependent on no-dhcp-interface and enabled for all interfaces, but adding a new "no-tftp-interface" config would be more complete.
--- dnsmasq-2.66/src/tftp.c.orig	2013-06-23 14:09:53.000000000 -0500
+++ dnsmasq-2.66/src/tftp.c	2013-06-23 14:10:19.000000000 -0500
@@ -16,6 +16,8 @@
 #include "dnsmasq.h"
+#undef HAVE_DHCP
 #ifdef HAVE_TFTP
 static struct tftp_file *check_tftp_fileperm(ssize_t *len, char *prefix);


This thread prompted Simon to change the docs related to no-dhcp-interface:

Unfortunately the solution to the above (2010) thread was to use "enable-tftp=<interface>,<interface>" which was removed in version 2.63.

More information about the Dnsmasq-discuss mailing list