Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[network] Set max_leases in udhcpd configuration. Fixes JB#18566
Usb-moded writes udhcpd.conf that uses x.y.z.1 - x.y.z.15 ip address
range. Busybox udhcpd defaults to max_leases=235 and emits warnings
if the configured ip address space range (=15) is smaller than that.

Make usb_moded set max_leases=15 in udhcpd.conf.

Signed-off-by: Simo Piiroinen <simo.piiroinen@jollamobile.com>
  • Loading branch information
spiiroin committed Apr 1, 2016
1 parent 1bcc68e commit 285937b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/usb_moded-network.c
Expand Up @@ -364,6 +364,7 @@ static int write_udhcpd_conf(struct ipforward_data *ipforward, struct mode_list_
fprintf(conffile, "interface\t%s\n", interface);
fprintf(conffile, "option\tsubnet\t%s\n", netmask);
fprintf(conffile, "option\tlease\t3600\n");
fprintf(conffile, "max_leases\t15\n");

if(ipforward != NULL)
{
Expand Down

0 comments on commit 285937b

Please sign in to comment.