warp-vpn

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

commit 43ed51f65886dd86bb2cd03d66a3118d7d30461a
parent d6c4dc16a2b44806c6d0c8c72f766baa70cc8aee
Author: sin <sin@2f30.org>
Date:   Mon, 21 Mar 2016 19:44:55 +0000

no need for superfluous errors

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

diff --git a/stun.c b/stun.c @@ -364,15 +364,12 @@ serversetup(int tunfd) for (p = ai; p; p = p->ai_next) { listenfd = socket(AF_INET, SOCK_STREAM, 0); - if (listenfd < 0) { - warn("socket"); + if (listenfd < 0) continue; - } setsockopt(listenfd, SOL_SOCKET, SO_REUSEADDR, (int []){1}, sizeof(int)); ret = bind(listenfd, p->ai_addr, p->ai_addrlen); if (ret < 0) { - warn("bind"); close(listenfd); continue; } @@ -425,13 +422,10 @@ clientsetup(int tunfd) for (p = ai; p; p = p->ai_next) { netfd = socket(AF_INET, SOCK_STREAM, 0); - if (netfd < 0) { - warn("socket"); + if (netfd < 0) continue; - } ret = connect(netfd, p->ai_addr, p->ai_addrlen); if (ret < 0) { - warn("connect"); close(netfd); continue; }