Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
On 10/8/14 4:06 PM, Christian Schoenebeck wrote: > About LuCI and the applications/scripts behind I can say that the "default" > is normally not set in the config because it's done in the scripts/apps as > default. > As stated by Jow something like "none" doesn't work. > The placeholder is a good thing to show the user what kind of entry is needed > to put in. > It's completely removed (no longer displayed) if you start to edit the field. > The "default" is written to the field and you can edit it as you like because > it's a text field. Understood. However, if no input is provided, the DHCP client sends no hostname. In that respect, it is not a default, but a sample value. Contrast this with "DNS server port" = "53", which means that if no input is given, the DNS port is 53. I surveyed the values in my Luci interface, and most of them use to display the default value of a parameter (ala DNS port). The DHCP & DNS parameter DNS forwardings is a fake default (not really the default value), as well as Interface / DHCP hostname (again not really the default value). While it is clear that "/example.org/10.1.2.3" is a sample value, it is not clear that the default DHCP hostname is unused. I would suggest that these fields be reexamined, because they are inconsistent with the behavior of all the other fields: 1) DHCP hostname should be empty, no "gray" value. 2) DNS forwardings should be empty. Help could indicate: "Format is /domain/server, or server for fallback" I thought the following were bogus, but they appear to be meaningful, from a quick check: 1) Domain whitelist = "ihost.netflix.com", which resolves to 127.0.0.1, so that default appears meaningful 2) Bogus NX Domain Override = "67.215.65.132", which reverse resolves to hit-nxdomain.opendns.com, so that default appears to be meaningful as well. -- -Justin justinval...@gmail.com smime.p7s Description: S/MIME Cryptographic Signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
Am 08.10.2014 um 21:07 schrieb Justin Vallon: > On 10/8/14 4:47 AM, Christian Schoenebeck wrote: >> Inside >> [buildroot]/feeds/luci/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua >> you find the definition hostname.placeholder = luci.sys.hostname(). >> It's not "default" so its never written/used to configuration. >> From the LuCI point of view placeholder is a sample. (light grey) >> If it's a default (also used be the system behind LuCI) then its written >> into the field as if the user write something into the field. > > Now I see what you mean. It is confusing, though, from a UI because > sometimes the "ghost" values are defaults and sometimes samples. I > don't think your last statement is accurate, because there are default > values that are not saved in uci. > > 1) DHCP & DNS / General Settings: DNS forwardings > "/example.org/10.1.2.3" is clearly a sample. > 2) ... / Advanced Settings: DNS server port "53", but > dhcp.@dnsmasq[0].port is unset. 53 is the default DNS port. Setting it > causes dhcp.*.port to be set. > 3) ... / Advanced Settings : Max concurrent queries "150", but no > dhcp.@dnsmasq[0].* value. 150 is the default value (app default) > > The only way to tell the difference between a sample and a default would > be to know whether the value is reasonable. In the case of DHCP > hostname, the default seems reasonable, so it is confusing when udhcpc > does not send $HOSTNAME. > > In <5434f9ac.3050...@openwrt.org>, Jow said that some dhcp servers choke > on dhcp hostnames. Then, if >99% of OpenWRT configurations are probably > where the upstream dhcp server is "external", sending a hostname will do > more harm than good. > > Then, back to the UI. Since it is hard to distinguish between "default > value" and "example value" in DHCP client hostname, can it be changed to > empty-string? I tried the following: > > [[[ git://git.openwrt.org/project/luci.git > diff --git a/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua > b/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua > index fe3fec6..62047b5 100644 > --- a/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua > +++ b/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua > @@ -20,7 +20,6 @@ local bcast, defaultroute, peerdns, dns, metric, > clientid, vendorclass > hostname = section:taboption("general", Value, "hostname", > translate("Hostname to send when requesting DHCP")) > > -hostname.placeholder = luci.sys.hostname() > hostname.datatype= "hostname" > > > ]]] > About the need or not of a hostname for dhcp I can't say anything. Missing knowledge. About LuCI and the applications/scripts behind I can say that the "default" is normally not set in the config because it's done in the scripts/apps as default. As stated by Jow something like "none" doesn't work. The placeholder is a good thing to show the user what kind of entry is needed to put in. It's completely removed (no longer displayed) if you start to edit the field. The "default" is written to the field and you can edit it as you like because it's a text field. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
On 10/8/14 4:47 AM, Christian Schoenebeck wrote: > Inside > [buildroot]/feeds/luci/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua > you find the definition hostname.placeholder = luci.sys.hostname(). > It's not "default" so its never written/used to configuration. > From the LuCI point of view placeholder is a sample. (light grey) > If it's a default (also used be the system behind LuCI) then its written into > the field as if the user write something into the field. Now I see what you mean. It is confusing, though, from a UI because sometimes the "ghost" values are defaults and sometimes samples. I don't think your last statement is accurate, because there are default values that are not saved in uci. 1) DHCP & DNS / General Settings: DNS forwardings "/example.org/10.1.2.3" is clearly a sample. 2) ... / Advanced Settings: DNS server port "53", but dhcp.@dnsmasq[0].port is unset. 53 is the default DNS port. Setting it causes dhcp.*.port to be set. 3) ... / Advanced Settings : Max concurrent queries "150", but no dhcp.@dnsmasq[0].* value. 150 is the default value (app default) The only way to tell the difference between a sample and a default would be to know whether the value is reasonable. In the case of DHCP hostname, the default seems reasonable, so it is confusing when udhcpc does not send $HOSTNAME. In <5434f9ac.3050...@openwrt.org>, Jow said that some dhcp servers choke on dhcp hostnames. Then, if >99% of OpenWRT configurations are probably where the upstream dhcp server is "external", sending a hostname will do more harm than good. Then, back to the UI. Since it is hard to distinguish between "default value" and "example value" in DHCP client hostname, can it be changed to empty-string? I tried the following: [[[ git://git.openwrt.org/project/luci.git diff --git a/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua b/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua index fe3fec6..62047b5 100644 --- a/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua +++ b/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua @@ -20,7 +20,6 @@ local bcast, defaultroute, peerdns, dns, metric, clientid, vendorclass hostname = section:taboption("general", Value, "hostname", translate("Hostname to send when requesting DHCP")) -hostname.placeholder = luci.sys.hostname() hostname.datatype= "hostname" ]]] -- -Justin justinval...@gmail.com smime.p7s Description: S/MIME Cryptographic Signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
Am 08.10.2014 um 07:07 schrieb Justin Vallon: > On 10/7/14 8:46 PM, Aaron Z wrote: >> On Tue, Oct 7, 2014 at 7:02 PM, Justin Vallon 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. > > > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel > Inside [buildroot]/feeds/luci/modules/base/luasrc/model/cbi/admin_network/proto_dhcp.lua you find the definition hostname.placeholder = luci.sys.hostname(). It's not "default" so its never written/used to configuration. >From the LuCI point of view placeholder is a sample. (light grey) If it's a default (also used be the system behind LuCI) then its written into the field as if the user write something into the field. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
Hi, I think there are two problems which prevented any definitive decision so far: 1) Some DHCP servers (cable modems, etc.) have problems with clients sending any hostname 2) As soon as we treat an empty hostname as defaulting to /proc/sys/kernel/hostname we have no clean way to express "send no hostname" anymore. Picking values like "none" for that will not work as these are valid hostnames too. ~ Jow ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
On 10/7/14 8:46 PM, Aaron Z wrote: > On Tue, Oct 7, 2014 at 7:02 PM, Justin Vallon 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 justinval...@gmail.com smime.p7s Description: S/MIME Cryptographic Signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
On Tue, Oct 7, 2014 at 7:02 PM, Justin Vallon 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 Aaron Z A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects. — Robert Heinlein, Time Enough for Love ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] Default dhcp (client) hostname is unset - Luci implies $(hostname)
[BB 14.07] In the Luci section for "Interface / General Setup", the is a parameter "Hostname to send when requesting DHCP". That input field has a "ghost" value of $HOSTNAME (meaning to me that its default value is $HOSTNAME). However, entering the $HOSTNAME in the field changes the behavior. I can see udhcpc being called with "-H $host" if I give a value, and no -H if left blank. It appears from command-line options that -H (or newer -x hostname:$HOST) causes the DHCP Hostname option to be sent, but it is not sent otherwise. 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) -- -Justin justinval...@gmail.com smime.p7s Description: S/MIME Cryptographic Signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel