Skip to content

Commit

Permalink
[usb-moded] Avoid issues with broken kernel ip handling
Browse files Browse the repository at this point in the history
Kernel ip handling will timeout after 12 seconds if the interface to be
configured is not there. We avoid this by not using the ip= kernel parameters

Fixes: JB#10205

Signed-off-by: Philippe De Swert <philippe.deswert@jollamobile.com>
  • Loading branch information
philippedeswert committed Oct 2, 2013
1 parent eb4edc7 commit 4ea498a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docs/usb_moded-doc.txt
Expand Up @@ -124,15 +124,15 @@ change and udev rules / network manager etc will not think it is a new device ea
This mac is stored using the default modprobe configuration and thus will be in /etc/modprobe.d/g_ether.conf
If this file exits usb_moded will assume there is a default mac set and will not do anything.

It is possible to set the configuration on the kernel command line also. For this the regular ip setting from the kernel is
It is possible to set the configuration on the kernel command line also. For this the format of regular ip setting from the kernel is
being re-used.

The format followed is:
ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>
usb_moded_ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

For more info see the kernel source: Documentation/filesystems/nfs/nfsroot.txt

for example : ip=192.168.3.100::192.168.3.1:255.255.255.0::usb0:off
for example : usb_moded_ip=192.168.3.100::192.168.3.1:255.255.255.0::usb0:off

NOTE: The device must be usb0! The autoconf value is ignored.

Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded-config.c
Expand Up @@ -280,7 +280,7 @@ static const char * get_kcmdline_string(const char *entry)
for (i=0; i < argc; i++)
{
arg_tokens = g_strsplit(argv[i], "=", 2);
if (!g_ascii_strcasecmp(arg_tokens[0], "ip"))
if (!g_ascii_strcasecmp(arg_tokens[0], "usb_moded_ip"))
{
network_tokens = g_strsplit(arg_tokens[1], ":", 7);
/* check if it is for the usb or rndis interface */
Expand Down

0 comments on commit 4ea498a

Please sign in to comment.