aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2013-04-16 13:54:25 +0200
committerTobias Brunner <tobias@strongswan.org>2013-05-03 15:11:19 +0200
commit37873f9994a8c5e470969c6c906669df1cbdddf6 (patch)
tree06aa953bc94566cb46dec453e2860ca33a914d4c /src
parent3b7f25906e715b01bbe781522f8d57e4f5e15eb2 (diff)
downloadstrongswan-37873f9994a8c5e470969c6c906669df1cbdddf6.tar.bz2
strongswan-37873f9994a8c5e470969c6c906669df1cbdddf6.tar.xz
kernel-netlink: Add an option to disable roam events
Diffstat (limited to 'src')
-rw-r--r--src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
index 9586fa47d..739a1f407 100644
--- a/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
+++ b/src/libhydra/plugins/kernel_netlink/kernel_netlink_net.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2008-2012 Tobias Brunner
+ * Copyright (C) 2008-2013 Tobias Brunner
* Copyright (C) 2005-2008 Martin Willi
* Hochschule fuer Technik Rapperswil
*
@@ -436,6 +436,11 @@ struct private_kernel_netlink_net_t {
bool process_route;
/**
+ * whether to trigger roam events
+ */
+ bool roam_events;
+
+ /**
* whether to actually install virtual IPs
*/
bool install_virtual_ip;
@@ -703,6 +708,11 @@ static void fire_roam_event(private_kernel_netlink_net_t *this, bool address)
timeval_t now;
job_t *job;
+ if (!this->roam_events)
+ {
+ return;
+ }
+
time_monotonic(&now);
this->roam_lock->lock(this->roam_lock);
if (!timercmp(&now, &this->next_roam, >))
@@ -2235,6 +2245,8 @@ kernel_netlink_net_t *kernel_netlink_net_create()
"%s.install_virtual_ip", TRUE, hydra->daemon),
.install_virtual_ip_on = lib->settings->get_str(lib->settings,
"%s.install_virtual_ip_on", NULL, hydra->daemon),
+ .roam_events = lib->settings->get_bool(lib->settings,
+ "%s.plugins.kernel-netlink.roam_events", TRUE, hydra->daemon),
);
timerclear(&this->last_route_reinstall);
timerclear(&this->next_roam);