commit b9e48021ed4e9a319e24c0c30008faf9c6dd487b
parent 609add01f90f6aa39198fcaf6060e55709f81d31
Author: sin <sin@2f30.org>
Date: Tue, 12 Apr 2016 16:57:04 +0100
some comments
Diffstat:
1 file changed, 3 insertions(+), 0 deletions(-)
diff --git a/stun.c b/stun.c
@@ -168,7 +168,9 @@ main(int argc, char *argv[])
/* initialize networking engine */
netinit();
+
if (sflag) {
+ /* invoked as server */
listenfd = serverinit(bindaddr, port);
revokeprivs();
#if defined(__OpenBSD__)
@@ -185,6 +187,7 @@ main(int argc, char *argv[])
netreset();
}
} else {
+ /* invoked as client */
revokeprivs();
#if defined(__OpenBSD__)
if (pledge("stdio dns inet", NULL) < 0)