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

Simon Kelley simon at thekelleys.org.uk
Mon Jul 29 19:50:19 BST 2013


On 27/07/13 23:02, Lonnie Abelbeck wrote:
>
> On Jul 25, 2013, at 4:44 PM, Lonnie Abelbeck wrote:
>
>>
>> On Jul 25, 2013, at 4:06 PM, Simon Kelley wrote:
>>
>>> On 23/06/13 20:34, Lonnie Abelbeck wrote:
>>>> Hi,
>>>>
>>>> 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 ?
>>>
>>> The rationale for the current state-of-the-world is that the TFTP server in dnsmasq is provided for the express purpose of doing netbooting, so it makes sense to do TFTP on the same interfaces/addresses as DHCP.
>>>
>>> I'd like to keep that as-is, for backwards compatibility if no other reason, so I suggest that we could add new option --tftp-interface that would have a higher priority than no-dhcp-interface. SO, to do TFTP but NOT DHCP on eth0 you'd do
>>>
>>> no-dhcp-interface=eth0
>>> tftp-interface=eth0
>>>
>>> No existing configs would change meaning, and the common case wouldn't need to use the new option.
>>>
>>> Comments?
>>>
>>> Simon.
>>
>> To be clear, if in the above example eth1 had DHCP enabled, then TFTP would be served on both eth0 and eth1 ?
>>
>> If so, would this be more clear ?
>> --
>> tftp-no-dhcp-interface=eth0
>> --
>> which would be a synonym for "no-dhcp-interface" but would mark that interface to allow TFTP.
>>
>> I agree no change to existing configs is best.
>>
>> Lonnie
>
> Replying to myself, another idea...
>
> Allow "enable-tftp" to work the same as currently, but then add "enable-tftp=" with options:
>
> # Limit TFTP server to a list of interfaces
> --enable-tftp=eth1,eth2
> # Allow TFTP server for all interfaces
> --enable-tftp=*
>
> Then "enable-tftp" and "enable-tftp=" can't both be specified.
>
> Lonnie
>
>
>


Code in the git repo now.....


Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list