From 63910439f77b91848dda094ef6e90523e1f7efa6 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Fri, 13 Mar 2009 01:50:09 +0000 Subject: added command line option for auth tag length --- src/uanytun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/uanytun.c') diff --git a/src/uanytun.c b/src/uanytun.c index 5c81dc9..72a0fab 100644 --- a/src/uanytun.c +++ b/src/uanytun.c @@ -189,7 +189,7 @@ int process_sock_data(tun_device_t* dev, udp_socket_t* sock, options_t* opt, pla log_printf(ERROR, "error on receiving udp packet: %s", strerror(errno)); return 0; } - else if(len < encrypted_packet_get_header_length()) { + else if(len < encrypted_packet_get_minimum_length(encrypted_packet)) { log_printf(WARNING, "received packet is to short"); return 0; } @@ -249,7 +249,7 @@ int main_loop(tun_device_t* dev, udp_socket_t* sock, options_t* opt) plain_packet_t plain_packet; plain_packet_init(&plain_packet); encrypted_packet_t encrypted_packet; - encrypted_packet_init(&encrypted_packet); + encrypted_packet_init(&encrypted_packet, opt->auth_tag_length_); seq_nr_t seq_nr = 0; fd_set readfds; -- cgit v1.2.3