Skip to content
Snippets Groups Projects
Commit 2a9dd384 authored by Roland's avatar Roland
Browse files

Allow changes of MTU without changing segment.

parent 2bcaf8d7
No related branches found
No related tags found
No related merge requests found
...@@ -22,7 +22,7 @@ if [ -z "$SEGINFO" ]; then ...@@ -22,7 +22,7 @@ if [ -z "$SEGINFO" ]; then
exit 1 exit 1
fi fi
SEGINFO=${SEGINFO/Address 1: 2001:2:0:711::/} SEGINFO=${SEGINFO/Address 1: 2001:2:0:711::/}
VPNMTU=$(echo $SEGINFO | cut -d':' -s -f1) NEWMTU=$(echo $SEGINFO | cut -d':' -s -f1)
SEGMENT=$(echo $SEGINFO | cut -d':' -f2) SEGMENT=$(echo $SEGINFO | cut -d':' -f2)
let PORT=SEGMENT+10040 let PORT=SEGMENT+10040
...@@ -40,11 +40,17 @@ do ...@@ -40,11 +40,17 @@ do
fi fi
done done
if [ "$CHANGED" = "1" ]; then if [ -n "$NEWMTU" ]; then
if [ -n "$VPNMTU" ]; then OLDMTU=`uci get fastd.mesh_vpn.mtu`
uci set fastd.mesh_vpn.mtu="$VPNMTU" if [ "$NEWMTU" != "$OLDMTU" ]; then
echo MTU set to $VPNMTU uci set fastd.mesh_vpn.mtu="$NEWMTU"
CHANGED=1
fi fi
fi
if [ "$CHANGED" = "1" ]; then
/etc/init.d/fastd restart /etc/init.d/fastd restart
echo Segment set to $SEGNUM echo Set Segment: $SEGNUM, MTU: $NEWMTU
else
echo No changes
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment