Warn if decrypt_packet() fail

This commit is contained in:
angt
2015-10-31 22:37:17 +01:00
parent 1b3c23889a
commit b77fd86f2a

View File

@@ -667,8 +667,10 @@ int main (int argc, char **argv)
if (ip_size<0 || (size_t)ip_size+16>size) if (ip_size<0 || (size_t)ip_size+16>size)
break; break;
if (decrypt_packet(&ctx, tunw.buf, ip_size, &sock.recv)) if (decrypt_packet(&ctx, tunw.buf, ip_size, &sock.recv)) {
printf("message could not be verified!\n");
goto restart; goto restart;
}
tunw.size = ip_size; tunw.size = ip_size;
} }