Modify

Opened 3 years ago

#18675 new enhancement

netifd dhcp data for lease_hostname

Reported by: terom@… Owned by: developers
Priority: normal Milestone:
Component: packages Version: Barrier Breaker 14.07
Keywords: netifd dhcp Cc:

Description

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 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.

Attachments (1)

barrier-breaker-netifd-dhcp-options.patch (1.6 KB) - added by terom@… 3 years ago.
[PATCH] netifd: store extra dhcp lease options

Download all attachments as: .zip

Change History (1)

Changed 3 years ago by terom@…

[PATCH] netifd: store extra dhcp lease options

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.