OPTIMISE= -O2
CFLAGS= -Wall -Wmissing-prototypes -Wstrict-prototypes -Wpointer-arith \
- -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE
+ -Wwrite-strings -g $(OPTIMISE) -D_GNU_SOURCE \
+ $(XCFLAGS)
etcdir= /etc
prefix= /usr/local
etcuserv= $(etcdir)/userv
services= $(etcuserv)/services.d
-PROGRAMS= udptunnel udptunnel-forwarder
-TARGETS= service blowfishtest $(PROGRAMS)
+PROGRAM_TARGETS= udptunnel-forwarder
+TARGETS= service blowfishtest $(PROGRAM_TARGETS)
+PROGRAMS= udptunnel $(PROGRAM_TARGETS)
MECHFILES= null pkcs5 timestamp sequence blowfish
MECHOBJS= $(foreach m, $(MECHFILES), mech-$m.o)
blowfishtest: $(OBJS_BFTEST)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJS_BFTEST)
-automech.c automech.h: automechgen.sh Makefile
+automech.h: automechgen.sh Makefile
./$< $(MECHFILES)
+automech.c: automech.h
+
+clean:
+ rm -f *.o core automech.[ch] *~ ./#*#
+
+realclean: clean
+ rm -f $(TARGETS)
+
forwarder.o $(MECHOBJS) automech.o utils.o: forwarder.h automech.h
blowfish.o mech-blowfish.o blowfishtest.o: blowfish.h
blowfishtest.o hex.o: hex.h
if (*emsg)
fprintf(stderr, "%s: bad packet: %s: %s\n",
programid, mechs[i]->name, emsg);
+ else
+ cdebug(i,"silently discarded");
return;
}
cdebugbuf(i, "decode", &buf_in, 3,0);
# <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
# <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 `.'.
#
@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);