Commit 6fac1df3 authored by Sukru Senli's avatar Sukru Senli

set leasetime in minutes only

parent bbd3867e
......@@ -597,7 +597,7 @@ int set_lan_dhcp_address_end(char *refparam, struct dmctx *ctx, int action, char
char *lan_name = section_name(lanargs->ldlansection);
char *dhcp_name = NULL;
struct dhcp_param *dhcp_param;
switch (action) {
case VALUECHECK:
return 0;
......@@ -861,7 +861,7 @@ int set_lan_dhcp_leasetime(char *refparam, struct dmctx *ctx, int action, char *
case VALUESET:
uci_foreach_option_eq("dhcp", "dhcp", "interface", lan_name, s) {
int val = atoi(value);
sprintf(buf, "%dm%ds", (val / 60), (val % 60));
sprintf(buf, "%dm", (val / 60));
dmuci_set_value_by_section(s, "leasetime", buf);
break;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment