stun

simple point to point tunnel
git clone git://git.2f30.org/stun
Log | Files | Refs | README

commit 2418a494cd09bbe4d42553c1cc941c1a0004913a
parent fc6e63001ac35a01eb4854e68068582a36224175
Author: sin <sin@2f30.org>
Date:   Sun, 20 Mar 2016 22:02:19 +0000

type fix

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

diff --git a/stun.c b/stun.c @@ -81,8 +81,7 @@ int opentun(char *tundev) { struct tuninfo ti; - int fd; - int mode = IFF_UP | IFF_POINTOPOINT; + int fd, mode = IFF_UP | IFF_POINTOPOINT; fd = open(tundev, O_RDWR); if (fd < 0) @@ -234,8 +233,7 @@ loop(int netfd, int tunfd) { unsigned char buf[MTU + AES_BLOCK_SIZE + HDRLEN]; struct pollfd pfd[2]; - ssize_t n; - int ret; + int n, ret; pfd[0].fd = netfd; pfd[0].events = POLLIN; @@ -273,8 +271,7 @@ main(int argc, char *argv[]) struct sockaddr_in local, remote; char *pw; const char *errstr; - int tunfd, netfd = -1, listenfd; - int ret; + int ret, tunfd, netfd = -1, listenfd; ARGBEGIN { case 'd':