Skip to content

Commit

Permalink
[usb-moded] Check return of the dhcp config write
Browse files Browse the repository at this point in the history
We did not check the return value of the dhcp configuration writing,
which caused mode setting to fail if we did not set up ip forwarding.

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Apr 9, 2014
1 parent 3c12013 commit 236477c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/usb_moded-network.c
Expand Up @@ -617,7 +617,7 @@ int usb_network_set_up_dhcpd(struct mode_list_elem *data)
#endif /*CONNMAN */
}
/* ipforward can be NULL here, which is expected and handled in this function */
write_udhcpd_conf(ipforward, data);
ret = write_udhcpd_conf(ipforward, data);

if(data->nat)
ret = set_usb_ip_forward(data, ipforward);
Expand Down

0 comments on commit 236477c

Please sign in to comment.