stun

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

commit e3c881c4cbd296d9b5d4df3f4bc585b406f8ab05
parent 750d344b045f486406e17d019e7572e8b00cae9a
Author: sin <sin@2f30.org>
Date:   Thu,  7 Apr 2016 12:23:48 +0100

add some newlines

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

diff --git a/stun.c b/stun.c @@ -381,6 +381,7 @@ writenet(int fd, unsigned char *pt, int ptlen) if (!(pkt = malloc(pktlen))) return -1; + arc4random_buf(pkt, noncelen); pack16(&pkt[noncelen], ptlen); if (!EVP_AEAD_CTX_seal(&ectx, &pkt[noncelen + HDRLEN], &outlen, @@ -390,6 +391,7 @@ writenet(int fd, unsigned char *pt, int ptlen) logwarn("EVP_AEAD_CTX_seal failed"); return -1; } + n = writeall(fd, pkt, pktlen); free(pkt); return n;