aboutsummaryrefslogtreecommitdiffstats
path: root/src/libhydra/kernel
diff options
context:
space:
mode:
authorMartin Willi <martin@revosec.ch>2012-11-12 10:06:09 +0100
committerMartin Willi <martin@revosec.ch>2012-11-29 10:22:51 +0100
commitb185cdd16d1d7553fabf7792928df31ad9eea427 (patch)
tree3b2d62992ad1d2051d770495722b7b75b30e5b23 /src/libhydra/kernel
parent0a54d3e1a19915f81dea1b942e88e5d637214e0e (diff)
downloadstrongswan-b185cdd16d1d7553fabf7792928df31ad9eea427.tar.bz2
strongswan-b185cdd16d1d7553fabf7792928df31ad9eea427.tar.xz
Install virtual IPs via interface name, and use an interface lookup where required
Diffstat (limited to 'src/libhydra/kernel')
-rw-r--r--src/libhydra/kernel/kernel_interface.c4
-rw-r--r--src/libhydra/kernel/kernel_interface.h5
-rw-r--r--src/libhydra/kernel/kernel_net.h5
3 files changed, 6 insertions, 8 deletions
diff --git a/src/libhydra/kernel/kernel_interface.c b/src/libhydra/kernel/kernel_interface.c
index 2fbe84818..733aced57 100644
--- a/src/libhydra/kernel/kernel_interface.c
+++ b/src/libhydra/kernel/kernel_interface.c
@@ -313,13 +313,13 @@ METHOD(kernel_interface_t, create_address_enumerator, enumerator_t*,
METHOD(kernel_interface_t, add_ip, status_t,
private_kernel_interface_t *this, host_t *virtual_ip, int prefix,
- host_t *iface_ip)
+ char *iface)
{
if (!this->net)
{
return NOT_SUPPORTED;
}
- return this->net->add_ip(this->net, virtual_ip, prefix, iface_ip);
+ return this->net->add_ip(this->net, virtual_ip, prefix, iface);
}
METHOD(kernel_interface_t, del_ip, status_t,
diff --git a/src/libhydra/kernel/kernel_interface.h b/src/libhydra/kernel/kernel_interface.h
index e3ebce8ee..a5ee0b55b 100644
--- a/src/libhydra/kernel/kernel_interface.h
+++ b/src/libhydra/kernel/kernel_interface.h
@@ -333,15 +333,14 @@ struct kernel_interface_t {
* Virtual IPs are attached to an interface. If an IP is added multiple
* times, the IP is refcounted and not removed until del_ip() was called
* as many times as add_ip().
- * The virtual IP is attached to the interface where the iface_ip is found.
*
* @param virtual_ip virtual ip address to assign
* @param prefix prefix length to install IP with, -1 for auto
- * @param iface_ip IP of an interface to attach virtual IP
+ * @param iface interface to install virtual IP on
* @return SUCCESS if operation completed
*/
status_t (*add_ip) (kernel_interface_t *this, host_t *virtual_ip, int prefix,
- host_t *iface_ip);
+ char *iface);
/**
* Remove a virtual IP from an interface.
diff --git a/src/libhydra/kernel/kernel_net.h b/src/libhydra/kernel/kernel_net.h
index 50881ab4d..a6b7686b0 100644
--- a/src/libhydra/kernel/kernel_net.h
+++ b/src/libhydra/kernel/kernel_net.h
@@ -112,15 +112,14 @@ struct kernel_net_t {
* Virtual IPs are attached to an interface. If an IP is added multiple
* times, the IP is refcounted and not removed until del_ip() was called
* as many times as add_ip().
- * The virtual IP is attached to the interface where the iface_ip is found.
*
* @param virtual_ip virtual ip address to assign
* @param prefix prefix length to install with IP address, -1 for auto
- * @param iface_ip IP of an interface to attach virtual IP
+ * @param iface interface to install virtual IP on
* @return SUCCESS if operation completed
*/
status_t (*add_ip) (kernel_net_t *this, host_t *virtual_ip, int prefix,
- host_t *iface_ip);
+ char *iface);
/**
* Remove a virtual IP from an interface.