multipath-tcp / mptcp-scripts

A set of scripts to ease the maintenance of the out-of-tree MultiPath TCP kernel
29 stars 38 forks source link

mptcp_up and mptcp_down scripts do not work in Raspbian stretch #6

Closed reedog117 closed 7 years ago

reedog117 commented 7 years ago

I am currently running the 4.4.50 kernel with MPTCP 0.92 support enabled on Raspbian GNU/Linux 9 stretch. I am attempting to use the mptcp_up and mptcp_down scripts posted on the multipath-tcp.org website, but many of these variables are undefined when the scripts are called, resulting in failure.

In particular, the following variables are undefined:

DEVICE_IFACE
DHCP4_IP_ADDRESS
DHCP4_NETWORK_NUMBER
DHCP4_ROUTERS
IP4_ADDRESS_0

How can I modify these scripts so they work again? I am having trouble finding out which variables are at my disposal to use.

cpaasch commented 7 years ago

To find out the variables that are available, you can do inside the script:

env > /tmp/environment

Then, you trigger the script through an up or down event on the interface (depending on in which script you put the line). That way you can see which variables you have. Please post this info here. Thanks!

reedog117 commented 7 years ago

for mptcp_up on a static interface

CLASS=hotplug
METHOD=static
MODE=start
LOGICAL=wlan0
IF_NETWORK=172.24.1.0
PHASE=post-up
IF_ADDRESS=172.24.1.1
ADDRFAM=inet
VERBOSITY=0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
IFUPDOWN_wlan0=post-up
IF_NETMASK=255.255.255.128
IFACE=wlan0
PWD=/

for mptcp_up on a dhcp interface

CLASS=hotplug
METHOD=dhcp
MODE=start
LOGICAL=wlan2
PHASE=post-up
ADDRFAM=inet
VERBOSITY=0
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
IFUPDOWN_wlan2=post-up
IFACE=wlan2
PWD=/

I'm trying to craft a workaround where I'm just manually parsing out the output from ip addr show type commands and performing grep on /var/lib/dhcp/dhclient.$IFACE.leases but I'm not sure if that's the best approach.

cpaasch commented 7 years ago

I'm trying to craft a workaround where I'm just manually parsing out the output from ip addr show type commands and performing grep on /var/lib/dhcp/dhclient.$IFACE.leases but I'm not sure if that's the best approach.

Yes, that might work.

The problem is basically that each distribution seems to handle this a bit differently. Some other solutions for handling the address up/down are at https://multipath-tcp.org/pmwiki.php/Users/ConfigureRouting.