socket-win: Install IKE bypass policies using bypass_socket()

This commit is contained in:
Martin Willi
2014-06-04 16:32:10 +02:00
parent f206e069f1
commit 11e7d0677c
2 changed files with 12 additions and 0 deletions
@@ -49,6 +49,7 @@ METHOD(plugin_t, get_features, int,
static plugin_feature_t f[] = {
PLUGIN_CALLBACK(socket_register, socket_win_socket_create),
PLUGIN_PROVIDE(CUSTOM, "socket"),
PLUGIN_DEPENDS(CUSTOM, "kernel-ipsec"),
};
*features = f;
return countof(f);
@@ -19,6 +19,7 @@
#include "socket_win_socket.h"
#include <library.h>
#include <hydra.h>
#include <threading/thread.h>
#include <daemon.h>
@@ -424,6 +425,16 @@ static SOCKET open_socket(private_socket_win_socket_t *this, int i)
closesocket(s);
return INVALID_SOCKET;
}
if (!hydra->kernel_interface->bypass_socket(hydra->kernel_interface,
s, AF_INET))
{
DBG1(DBG_NET, "installing IPv4 IKE bypass policy failed");
}
if (!hydra->kernel_interface->bypass_socket(hydra->kernel_interface,
s, AF_INET6))
{
DBG1(DBG_NET, "installing IPv6 IKE bypass policy failed");
}
return s;
}