socket-win: Install IKE bypass policies using bypass_socket()
This commit is contained in:
@@ -49,6 +49,7 @@ METHOD(plugin_t, get_features, int,
|
|||||||
static plugin_feature_t f[] = {
|
static plugin_feature_t f[] = {
|
||||||
PLUGIN_CALLBACK(socket_register, socket_win_socket_create),
|
PLUGIN_CALLBACK(socket_register, socket_win_socket_create),
|
||||||
PLUGIN_PROVIDE(CUSTOM, "socket"),
|
PLUGIN_PROVIDE(CUSTOM, "socket"),
|
||||||
|
PLUGIN_DEPENDS(CUSTOM, "kernel-ipsec"),
|
||||||
};
|
};
|
||||||
*features = f;
|
*features = f;
|
||||||
return countof(f);
|
return countof(f);
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
#include "socket_win_socket.h"
|
#include "socket_win_socket.h"
|
||||||
|
|
||||||
#include <library.h>
|
#include <library.h>
|
||||||
|
#include <hydra.h>
|
||||||
#include <threading/thread.h>
|
#include <threading/thread.h>
|
||||||
#include <daemon.h>
|
#include <daemon.h>
|
||||||
|
|
||||||
@@ -424,6 +425,16 @@ static SOCKET open_socket(private_socket_win_socket_t *this, int i)
|
|||||||
closesocket(s);
|
closesocket(s);
|
||||||
return INVALID_SOCKET;
|
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;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user