#18675: netifd dhcp data for lease_hostname
-------------------------+-----------------------------------
 Reporter:  terom@…      |      Owner:  developers
     Type:  enhancement  |     Status:  new
 Priority:  normal       |  Milestone:
Component:  packages     |    Version:  Barrier Breaker 14.07
 Keywords:  netifd dhcp  |
-------------------------+-----------------------------------
 Hi,

 Previous to netifd, an `option proto dhcp` interface would store some data
 related to its DHCP lease under the uci state, as
 `network.foo.lease_hostname`. This no longer works with netifd.

 The attached patch is based on [https://lists.openwrt.org/pipermail
 /openwrt-devel/2014-April/024924.html netifd: store DHCP options] from
 Jiří Šlachta, but uses `proto_add_data` as part of the main
 proto_send_update request.

 This results in something like the following for `ubus call
 network.interface.mgmt status`:

     {
         ....
         "data": {
             "lease_hostname": "dlink-4cdaa2",
             "lease_ntpsrv": "10.8.0.41 10.8.0.42"
         }
     }

 This lets one use an `/etc/hotplug.d/iface` script to do things like set
 the system hostname from the DHCP lease provided hostname.

--
Ticket URL: <https://dev.openwrt.org/ticket/18675>
OpenWrt <http://openwrt.org>
Opensource Wireless Router Technology
_______________________________________________
openwrt-tickets mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-tickets

Reply via email to