warp-vpn

point to point VPN implementation
git clone git://git.2f30.org/warp-vpn
Log | Files | Refs | README

commit 8b399f7c897721ddb775427007e7edb995d2b425
parent eec0592f5817ff4c6017e75e119f22f3fd6fc030
Author: Quentin Rameau <quinq.ml@gmail.com>
Date:   Mon, 21 Mar 2016 12:38:30 +0100

Explicitely reject combination of -s and -h options

Diffstat:
Mstun.c | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/stun.c b/stun.c @@ -395,7 +395,8 @@ clientsetup(int tunfd) void usage(void) { - fprintf(stderr, "usage: %s [-ds] [-h host] [-p port] interface\n", argv0); + fprintf(stderr, "usage: %s [-d] -s [-p port] interface\n", argv0); + fprintf(stderr, " %s [-d] -h host [-p port] interface\n", argv0); exit(1); } @@ -425,7 +426,7 @@ main(int argc, char *argv[]) usage(); } ARGEND - if (argc != 1 || (!sflag && !host)) + if (argc != 1 || !(sflag ^ (host != NULL))) usage(); tunfd = opentun(argv[0]);