summaryrefslogtreecommitdiff
path: root/src/pluto/connections.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
committerYves-Alexis Perez <corsac@corsac.net>2012-06-28 21:16:07 +0200
commitb34738ed08c2227300d554b139e2495ca5da97d6 (patch)
tree62f33b52820f2e49f0e53c0f8c636312037c8054 /src/pluto/connections.c
parent0a9d51a49042a68daa15b0c74a2b7f152f52606b (diff)
downloadvyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.tar.gz
vyos-strongswan-b34738ed08c2227300d554b139e2495ca5da97d6.zip
Imported Upstream version 4.6.4
Diffstat (limited to 'src/pluto/connections.c')
-rw-r--r--src/pluto/connections.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/pluto/connections.c b/src/pluto/connections.c
index 2194362d2..27cec40fc 100644
--- a/src/pluto/connections.c
+++ b/src/pluto/connections.c
@@ -425,8 +425,9 @@ void delete_connection(connection_t *c, bool relations)
c->requested_ca->destroy_offset(c->requested_ca,
offsetof(identification_t, destroy));
}
+#ifdef ADNS
gw_delref(&c->gw_info);
-
+#endif
lock_certs_and_keys("delete_connection");
cert_release(c->spd.this.cert);
scx_release(c->spd.this.sc);
@@ -1477,6 +1478,8 @@ connection_t *rw_instantiate(connection_t *c, const ip_address *him,
return d;
}
+#ifdef ADNS
+
connection_t *oppo_instantiate(connection_t *c, const ip_address *him,
identification_t *his_id, struct gw_info *gw,
const ip_address *our_client USED_BY_DEBUG,
@@ -1544,6 +1547,8 @@ connection_t *oppo_instantiate(connection_t *c, const ip_address *him,
return d;
}
+#endif /* ADNS */
+
/* priority formatting */
void fmt_policy_prio(policy_prio_t pp, char buf[POLICY_PRIO_BUF])
{
@@ -1767,6 +1772,8 @@ connection_t *find_connection_for_clients(struct spd_route **srp,
return best;
}
+#ifdef ADNS
+
/* Find and instantiate a connection for an outgoing Opportunistic connection.
* We've already discovered its gateway.
* We look for a the connection such that:
@@ -1869,6 +1876,8 @@ connection_t *build_outgoing_opportunistic_connection(struct gw_info *gw,
}
}
+#endif /* ADNS */
+
bool orient(connection_t *c)
{
struct spd_route *sr;
@@ -2179,6 +2188,8 @@ void initiate_opportunistic(const ip_address *our_client,
initiate_opportunistic_body(&b, NULL, NULL);
}
+#ifdef ADNS
+
static void continue_oppo(struct adns_continuation *acr, err_t ugh)
{
struct find_oppo_continuation *cr = (void *)acr; /* inherit, damn you! */
@@ -2242,6 +2253,8 @@ static void continue_oppo(struct adns_continuation *acr, err_t ugh)
close_any(whackfd);
}
+#endif /* ADNS */
+
#ifdef USE_KEYRR
static err_t check_key_recs(enum myid_state try_state, const connection_t *c,
struct adns_continuation *ac)
@@ -2298,6 +2311,8 @@ static err_t check_key_recs(enum myid_state try_state, const connection_t *c,
}
#endif /* USE_KEYRR */
+#ifdef ADNS
+
static err_t check_txt_recs(enum myid_state try_state, const connection_t *c,
struct adns_continuation *ac)
{
@@ -2355,6 +2370,8 @@ static err_t check_txt_recs(enum myid_state try_state, const connection_t *c,
return ugh;
}
+#endif /* ADNS */
+
/* note: gateways_from_dns must be NULL iff this is the first call */
static void initiate_opportunistic_body(struct find_oppo_bundle *b,
@@ -2431,6 +2448,7 @@ static void initiate_opportunistic_body(struct find_oppo_bundle *b,
ipsecdoi_initiate(b->whackfd, c, c->policy, 1, SOS_NOBODY);
b->whackfd = NULL_FD; /* protect from close */
}
+#ifdef ADNS
else
{
/* We are handling an opportunistic situation.
@@ -2996,6 +3014,7 @@ static void initiate_opportunistic_body(struct find_oppo_bundle *b,
cannot_oppo(c, b, ugh);
}
}
+#endif /* ADNS */
close_any(b->whackfd);
}