Signed-off-by: Helmut Schaa <helmut.sc...@googlemail.com> --- Changes in v2: Tell netifd core that we have a renew handler
package/network/config/netifd/files/lib/netifd/proto/dhcp.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh index 93f4a5e..4c03403 100755 --- a/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh +++ b/package/network/config/netifd/files/lib/netifd/proto/dhcp.sh @@ -5,6 +5,8 @@ init_proto "$@" proto_dhcp_init_config() { + renew_handler=1 + proto_config_add_string 'ipaddr:ipaddr' proto_config_add_string 'netmask:ipaddr' proto_config_add_string 'hostname:hostname' @@ -52,6 +54,12 @@ proto_dhcp_setup() { $clientid $broadcast $dhcpopts } +proto_dhcp_renew() { + local interface="$1" + # SIGUSR1 forces udhcpc to renew its lease + proto_kill_command "$interface" 16 +} + proto_dhcp_teardown() { local interface="$1" proto_kill_command "$interface" -- 1.8.1.4 _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel