Improved how NAT-T keepalives are handled in sockets/receiver.

This commit is contained in:
Tobias Brunner
2012-08-08 15:12:24 +02:00
parent e49abcede0
commit 896941d365
4 changed files with 16 additions and 24 deletions
@@ -45,9 +45,6 @@
/* Maximum size of a packet */
#define MAX_PACKET 10000
/* length of non-esp marker */
#define MARKER_LEN sizeof(u_int32_t)
/* these are not defined on some platforms */
#ifndef SOL_IP
#define SOL_IP IPPROTO_IP
@@ -225,12 +222,6 @@ static packet_t *receive_packet(private_socket_dynamic_socket_t *this,
}
DBG3(DBG_NET, "received packet %b", buffer, (u_int)len);
if (len < MARKER_LEN)
{
DBG3(DBG_NET, "received packet too short (%d bytes)", len);
return NULL;
}
/* read ancillary data to get destination address */
for (cmsgptr = CMSG_FIRSTHDR(&msg); cmsgptr != NULL;
cmsgptr = CMSG_NXTHDR(&msg, cmsgptr))