kernel-netlink: Add an option to disable roam events
This commit is contained in:
@@ -595,6 +595,9 @@ Number of ipsecN devices
|
|||||||
.BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
|
.BR charon.plugins.kernel-klips.ipsec_dev_mtu " [0]"
|
||||||
Set MTU of ipsecN device
|
Set MTU of ipsecN device
|
||||||
.TP
|
.TP
|
||||||
|
.BR charon.plugins.kernel-netlink.roam_events " [yes]"
|
||||||
|
Whether to trigger roam events when interfaces, addresses or routes change
|
||||||
|
.TP
|
||||||
.BR charon.plugins.load-tester
|
.BR charon.plugins.load-tester
|
||||||
Section to configure the load-tester plugin, see LOAD TESTS
|
Section to configure the load-tester plugin, see LOAD TESTS
|
||||||
.TP
|
.TP
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2008-2012 Tobias Brunner
|
* Copyright (C) 2008-2013 Tobias Brunner
|
||||||
* Copyright (C) 2005-2008 Martin Willi
|
* Copyright (C) 2005-2008 Martin Willi
|
||||||
* Hochschule fuer Technik Rapperswil
|
* Hochschule fuer Technik Rapperswil
|
||||||
*
|
*
|
||||||
@@ -435,6 +435,11 @@ struct private_kernel_netlink_net_t {
|
|||||||
*/
|
*/
|
||||||
bool process_route;
|
bool process_route;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* whether to trigger roam events
|
||||||
|
*/
|
||||||
|
bool roam_events;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* whether to actually install virtual IPs
|
* whether to actually install virtual IPs
|
||||||
*/
|
*/
|
||||||
@@ -703,6 +708,11 @@ static void fire_roam_event(private_kernel_netlink_net_t *this, bool address)
|
|||||||
timeval_t now;
|
timeval_t now;
|
||||||
job_t *job;
|
job_t *job;
|
||||||
|
|
||||||
|
if (!this->roam_events)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
time_monotonic(&now);
|
time_monotonic(&now);
|
||||||
this->roam_lock->lock(this->roam_lock);
|
this->roam_lock->lock(this->roam_lock);
|
||||||
if (!timercmp(&now, &this->next_roam, >))
|
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),
|
"%s.install_virtual_ip", TRUE, hydra->daemon),
|
||||||
.install_virtual_ip_on = lib->settings->get_str(lib->settings,
|
.install_virtual_ip_on = lib->settings->get_str(lib->settings,
|
||||||
"%s.install_virtual_ip_on", NULL, hydra->daemon),
|
"%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->last_route_reinstall);
|
||||||
timerclear(&this->next_roam);
|
timerclear(&this->next_roam);
|
||||||
|
|||||||
Reference in New Issue
Block a user