chiark / gitweb /
Bugfixes.
[userv-utils.git] / ipif / udptunnel
index b76a9da002393bb1cc433bfda9290144e21a7a47..720517b6179f7393aaa53b4cf4617a0e50b0751a 100755 (executable)
@@ -20,7 +20,7 @@
 #            <public-remote-addr>,<public-remote-port>
 #            <private-local-addr>,<private-remote-addr>,<mtu>,<proto>
 #            <keepalive>,<timeout>
-#            <extra-local-nets> <extra-remote-nets>
+#            <extra-nets-for-local-cmd> <extra-nets-for-remote-cmd>
 #          [ <remote-command> [<remote-args> ...] ]
 #
 # proto may be slip or cslip
@@ -42,7 +42,7 @@
 #                     <public-local-addr'>,<public-local-port'>
 #                     <private-remote-addr>,<private-local-addr>,<mtu>,<proto>
 #                     <keepalive>,<timeout>
-#                     <extra-remote-nets> <extra-local-nets>
+#                     <extra-nets-for-remote-cmd> <extra-nets-for-local-cmd>
 #
 
 # If it was given Print for <public-remote-foo'>, this command's first
 #   <public-local-foo>   <public-local-foo'>     <public-local-foo'>
 #                        (-m not specified)      (-m specified)
 #   actual addr/port     that addr/port         `Wait'
-#   `Wait'               the chosen address     `Wait'
 #   `Print'              the chosen address     `Wait'
+#   `Any'                `Wait' for addr,       `Wait'
+#                         chosen port for port
 #
 # udptunnel will userv ipif locally, as
 #    userv root ipif <private-local-addr>,<private-remote-addr>,<mtu>,<proto>
-#                    <extra-local-nets>
+#                    <extra-nets-for-local-cmd>
 # or, if -l was given, userv root ipif is replaced with the argument(s)
 # following -l option(s) until `.'.
 #
@@ -266,7 +267,7 @@ if (@ARGV) {
     @rcmd= (@ARGV,
            @remoteopts,
            "$rad,$rpd",
-           $masq ? 'Wait,Wait' : $lapd,
+           $masq ? 'Wait,Wait' : $las eq 'Any' ? "Wait,$lpd" : $lapd,
            "$rva,$lva,$mtu,$proto",
            "$keepalive,$timeout",
            $rexn, $lexn);