[OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)

Justin Vallon justinvallon at gmail.com
Wed Oct 8 01:07:01 EDT 2014


On 10/7/14 8:46 PM, Aaron Z wrote:
> On Tue, Oct 7, 2014 at 7:02 PM, Justin Vallon <justinvallon at gmail.com> wrote:
>> So either:
>>
>> 1) The dhcp hostname option should be blank to indicate no default value
>> (maintain current behavior)
>> 2) When udhcpc is invoked, it should pass "-H $(hostname)" in case of
>> default (make backend behave as Luci implies)
>> IMO: I find it nice that many hosts pass their hostname automatically,
>> so that the DHCP active lease list is useful, versus a lot of "?"
>> entries and ethernet addresses.  So, I would vote for 2.
>> Opinions?  Where would this bug get posted?  (wiki.openwrt.org is down,
>> so I cannot check the wiki)
> The wiki is working for me now... That info is stored on a per
> interface basis in /etc/config/network (see Link[1]) and is not set by
> default, although it may pull from /etc/config/system (see Link[2]) if
> unset in /etc/config/network.
> The default value in /etc/config/system is 'OpenWrt'
>
> Link[1]: http://wiki.openwrt.org/doc/uci/network#protocol.dhcp
> Link[2]: http://wiki.openwrt.org/doc/uci/system
>
The docs for uci network.${iface}.hostname say that there is no default
hostname submitted in the DHCP request.  However, Luci seems to imply
that the default is $HOSTNAME because it shows $HOSTNAME if the field is
unset.  Your guess ("it may pull from ...") appears to be incorrect, and
is/was my confusion as well.

Fixing Luci would seem to be straightforward (default is "").  Fixing
the backend (default is "$HOSTNAME") would be a change of behavior.  I
will look into both options.

-- 
-Justin
JustinVallon at gmail.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4258 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20141008/61a6a47a/attachment.p7s>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list