~mdw
/
userv-utils
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Works at least without crypto.
[userv-utils]
/
ipif
/
udptunnel
diff --git
a/ipif/udptunnel
b/ipif/udptunnel
index
c2da428
..
08b75a3
100755
(executable)
--- a/
ipif/udptunnel
+++ b/
ipif/udptunnel
@@
-8,6
+8,7
@@
# | -m (`masquerade support': subcommand gets `Wait' instead of our addr/port)
# | -d (`dump keys': when no subcmd, spew keys rather than reading them;
# we always send keys to our subcmd if there is one)
# | -m (`masquerade support': subcommand gets `Wait' instead of our addr/port)
# | -d (`dump keys': when no subcmd, spew keys rather than reading them;
# we always send keys to our subcmd if there is one)
+# | -Dcrypto (debug crypto - use with care, prints keys, packets &c on screen!)
# | -f<path-to-udptunnel-forwarder>
# ...
# ]
# | -f<path-to-udptunnel-forwarder>
# ...
# ]
@@
-172,6
+173,7
@@
$|=1;
$masq= 0;
$dump= 0;
$fcmd= 'udptunnel-forwarder';
$masq= 0;
$dump= 0;
$fcmd= 'udptunnel-forwarder';
+$xfwdopts= '';
while ($ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
while ($ARGV[0] =~ m/^-/) {
$_= shift @ARGV;
@@
-191,6
+193,8
@@
while ($ARGV[0] =~ m/^-/) {
$masq= 1;
} elsif (s/^-d/-/) {
$dump= 1;
$masq= 1;
} elsif (s/^-d/-/) {
$dump= 1;
+ } elsif (s/^-Dcrypto$/-/) {
+ $xfwdopts.= 'K';
} else {
quit("unknown option \`$_'");
}
} else {
quit("unknown option \`$_'");
}
@@
-345,11
+349,12
@@
if (!$c_lcmd) {
close UW;
close DR;
close UW;
close DR;
-@fcmd= ($fcmd,
- fileno(L), fileno(DW), fileno(UR),
+$xfwdopts.= 'w' if $dump;
+
+@fcmd= ($fcmd, $xfwdopts,
+ fileno(L), fileno(DW), fileno(UR), fileno(DUMPKEYS),
$mtu, $keepalive, $timeout,
@rapf,
$mtu, $keepalive, $timeout,
@rapf,
- fileno(DUMPKEYS), $dump ? 'y' : '',
@encryption);
debug("forwarding command @fcmd.");
@encryption);
debug("forwarding command @fcmd.");