warp-vpn

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

commit ba308a41c83ab4cfdde6365693d17520e91e08c3
parent 8d04038d59b1dc78201fef9dd2543b26b56d28ea
Author: sin <sin@2f30.org>
Date:   Mon, 21 Mar 2016 19:34:15 +0000

automatically reconnect

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

diff --git a/stun.c b/stun.c @@ -448,6 +448,7 @@ clientsetup(int tunfd) errx(1, "failed to respond to challenge"); ret = tunnel(netfd, tunfd); + warnx("connection dropped"); close(netfd); return ret; } @@ -497,7 +498,7 @@ main(int argc, char *argv[]) if (sflag) return serversetup(tunfd); - ret = clientsetup(tunfd); - warnx("connection dropped"); - return ret; + for (;;) + clientsetup(tunfd); + return 0; }