Code cleanup

This commit is contained in:
angt
2015-11-01 19:19:00 +01:00
parent 5951a560af
commit 4740089f81

View File

@@ -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 (r<ip_size)
set_ip_size(tunr.buf, r);
if (r>ip_size)
continue;
encrypt_packet(&ctx, tunr.buf, r, &tun.recv);
}
}