From 4740089f8151b8a144062690c3c1664c16709b07 Mon Sep 17 00:00:00 2001 From: angt Date: Sun, 1 Nov 2015 19:19:00 +0100 Subject: [PATCH] Code cleanup --- glorytun.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/glorytun.c b/glorytun.c index 4f63552..e346542 100644 --- a/glorytun.c +++ b/glorytun.c @@ -626,15 +626,12 @@ int main (int argc, char **argv) ssize_t ip_size = get_ip_size(tunr.buf, sizeof(tunr.buf)); - if (ip_size<=0) + if (ip_size<=0 || r>ip_size) continue; if (rip_size) - continue; - encrypt_packet(&ctx, tunr.buf, r, &tun.recv); } }