Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFS Gluon Packages
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
firmware
FFS Gluon Packages
Commits
2a9dd384
Commit
2a9dd384
authored
8 years ago
by
Roland
Browse files
Options
Downloads
Patches
Plain Diff
Allow changes of MTU without changing segment.
parent
2bcaf8d7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ffs-set-segment/files/usr/sbin/ffs-set-segment
+12
-6
12 additions, 6 deletions
ffs-set-segment/files/usr/sbin/ffs-set-segment
with
12 additions
and
6 deletions
ffs-set-segment/files/usr/sbin/ffs-set-segment
+
12
−
6
View file @
2a9dd384
...
@@ -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::/
}
VPN
MTU
=
$(
echo
$SEGINFO
|
cut
-d
':'
-s
-f1
)
NEW
MTU
=
$(
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment