summaryrefslogtreecommitdiff
path: root/src/uanytun.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-03-13 01:50:09 +0000
committerChristian Pointner <equinox@anytun.org>2009-03-13 01:50:09 +0000
commit63910439f77b91848dda094ef6e90523e1f7efa6 (patch)
tree75660603d4b79520ffea0a1b1b2edb25b8a08371 /src/uanytun.c
parentmoved hex-dump function to log_* (diff)
added command line option for auth tag length
Diffstat (limited to 'src/uanytun.c')
-rw-r--r--src/uanytun.c4
1 files changed, 2 insertions, 2 deletions
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;