chiark
/
gitweb
/
~mdw
/
tripe
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f220a1d
)
contrib/tripe-ipif.in: Use the new-ish `bulk-overhead' to calculate MTU.
author
Mark Wooding
<mdw@distorted.org.uk>
Tue, 23 May 2017 10:13:59 +0000
(11:13 +0100)
committer
Mark Wooding
<mdw@distorted.org.uk>
Tue, 23 May 2017 10:13:59 +0000
(11:13 +0100)
contrib/tripe-ipif.in
patch
|
blob
|
blame
|
history
diff --git
a/contrib/tripe-ipif.in
b/contrib/tripe-ipif.in
index 5a620faf4db9d8be8a8904ef73b3bc289e629613..4384175fcc9e3c1ac3414cb6f80790acf98261fd 100755
(executable)
--- a/
contrib/tripe-ipif.in
+++ b/
contrib/tripe-ipif.in
@@
-90,19
+90,16
@@
esac
echo "userv-$peer"
## Now we can interrogate the server without deadlocking it.
echo "userv-$peer"
## Now we can interrogate the server without deadlocking it.
-algs=$(tripectl algs)
tagsz=nil blksz
=nil
+algs=$(tripectl algs)
overhead
=nil
while read line; do
for i in $line; do
while read line; do
for i in $line; do
- case $i in
- cipher-blksz=*) blksz=${i#*=} ;;
- mac-tagsz=*) tagsz=${i#*=} ;;
- esac
+ case $i in bulk-overhead=*) overhead=${i#*=} ;; esac
done
done <<EOF
$algs
EOF
done
done <<EOF
$algs
EOF
-case
,$tagsz,$blksz,
in
-
*,nil,*) echo >&2 "$quis[$$]: failed to discover cipher suite
"; exit 1 ;;
+case
$overhead
in
+
nil) echo >&2 "$quis[$$]: failed to discover overhead
"; exit 1 ;;
esac
## Determine the remote address if none is specified; strip off a port number
esac
## Determine the remote address if none is specified; strip off a port number
@@
-123,7
+120,7
@@
esac
## Determine the MTU based on the path.
pmtu=$(pathmtu $remote_ext)
## Determine the MTU based on the path.
pmtu=$(pathmtu $remote_ext)
-mtu=$(( $pmtu -
33 - $tagsz - $blksz
))
+mtu=$(( $pmtu -
29 - $overhead
))
## Obtain the tunnel and run it.
now=$(date +"%Y-%m-%d %H:%M:%S")
## Obtain the tunnel and run it.
now=$(date +"%Y-%m-%d %H:%M:%S")