Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[usb-moded] Proper use of ifconfig command. Contributes to JB#45772
Use 'ifconfig <interface> <ip> netmask <netmask>' format when calling
ifconfig from usb-moded. This is the proper use according to ifconfig
manual pages. When adding a netmask, keyword 'netmask' is instructed to
be used.
  • Loading branch information
LaakkonenJussi committed May 10, 2019
1 parent e1e508e commit 6093bf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/set_usb_mode.sh
Expand Up @@ -132,7 +132,7 @@ rndis_down() {

rndis_up() {
log_debug "Enable rndis interface"
ifconfig rndis0 192.168.2.15 255.255.255.0 2> /dev/null || :
ifconfig rndis0 192.168.2.15 netmask 255.255.255.0 2> /dev/null || :
}

udhcpd_configure() {
Expand Down
2 changes: 1 addition & 1 deletion src/usb_moded-network.c
Expand Up @@ -1192,7 +1192,7 @@ int network_up(const modedata_t *data)
}
else
{
sprintf(command, "ifconfig %s %s %s\n", interface, ip, netmask);
sprintf(command, "ifconfig %s %s netmask %s\n", interface, ip, netmask);
common_system(command);
}

Expand Down

0 comments on commit 6093bf8

Please sign in to comment.