aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/sa
diff options
context:
space:
mode:
Diffstat (limited to 'src/charon/sa')
-rw-r--r--src/charon/sa/child_sa.c5
-rw-r--r--src/charon/sa/tasks/ike_natd.c2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/charon/sa/child_sa.c b/src/charon/sa/child_sa.c
index 76e0dc0e1..ba9520cd8 100644
--- a/src/charon/sa/child_sa.c
+++ b/src/charon/sa/child_sa.c
@@ -261,7 +261,8 @@ static void updown(private_child_sa_t *this, bool up)
asprintf(&virtual_ip, "");
}
- charon->socket->is_local_address(charon->socket, this->me.addr, &ifname);
+ ifname = charon->kernel_interface->get_interface(charon->kernel_interface,
+ this->me.addr);
/* build the command with all env variables.
* TODO: PLUTO_PEER_CA and PLUTO_NEXT_HOP are currently missing
@@ -295,7 +296,7 @@ static void updown(private_child_sa_t *this, bool up)
this->me.addr) ? "-host" : "-client",
this->me.addr->get_family(this->me.addr) == AF_INET ? "" : "-ipv6",
this->policy->get_name(this->policy),
- ifname,
+ ifname ? ifname : "(unknown)",
this->reqid,
this->me.addr,
this->me.id,
diff --git a/src/charon/sa/tasks/ike_natd.c b/src/charon/sa/tasks/ike_natd.c
index a25b6e0d7..8e36b2e85 100644
--- a/src/charon/sa/tasks/ike_natd.c
+++ b/src/charon/sa/tasks/ike_natd.c
@@ -249,7 +249,7 @@ static status_t build_i(private_ike_natd_t *this, message_t *message)
if (host->is_anyaddr(host))
{
/* TODO: we could get the src address from netlink!? */
- list = charon->socket->create_local_address_list(charon->socket);
+ list = charon->kernel_interface->create_address_list(charon->kernel_interface);
while (list->remove_first(list, (void**)&host) == SUCCESS)
{
notify = build_natd_payload(this, NAT_DETECTION_SOURCE_IP, host);