introduced xauth_identity keyword
This commit is contained in:
+11
-1
@@ -404,11 +404,11 @@ void delete_connection(connection_t *c, bool relations)
|
||||
cur_debugging = old_cur_debugging;
|
||||
#endif
|
||||
free(c->name);
|
||||
DESTROY_IF(c->xauth_identity);
|
||||
DESTROY_IF(c->spd.this.id);
|
||||
DESTROY_IF(c->spd.this.ca);
|
||||
DESTROY_IF(c->spd.this.groups);
|
||||
DESTROY_IF(c->spd.this.host_srcip);
|
||||
|
||||
free(c->spd.this.updown);
|
||||
free(c->spd.this.pool);
|
||||
DESTROY_IF(c->spd.that.id);
|
||||
@@ -759,6 +759,10 @@ static size_t format_connection(char *buf, size_t buf_len,
|
||||
static void unshare_connection_strings(connection_t *c)
|
||||
{
|
||||
c->name = clone_str(c->name);
|
||||
if (c->xauth_identity)
|
||||
{
|
||||
c->xauth_identity = c->xauth_identity->clone(c->xauth_identity);
|
||||
}
|
||||
c->spd.this.id = c->spd.this.id->clone(c->spd.this.id);
|
||||
c->spd.this.pool = clone_str(c->spd.this.pool);
|
||||
c->spd.this.updown = clone_str(c->spd.this.updown);
|
||||
@@ -1137,6 +1141,12 @@ void add_connection(const whack_message_t *wm)
|
||||
}
|
||||
}
|
||||
|
||||
if (wm->xauth_identity)
|
||||
{
|
||||
c->xauth_identity
|
||||
= identification_create_from_string(wm->xauth_identity);
|
||||
}
|
||||
|
||||
c->sa_ike_life_seconds = wm->sa_ike_life_seconds;
|
||||
c->sa_ipsec_life_seconds = wm->sa_ipsec_life_seconds;
|
||||
c->sa_rekey_margin = wm->sa_rekey_margin;
|
||||
|
||||
@@ -183,6 +183,8 @@ struct connection {
|
||||
unsigned long sa_rekey_fuzz;
|
||||
unsigned long sa_keying_tries;
|
||||
|
||||
identification_t *xauth_identity; /* XAUTH identity */
|
||||
|
||||
/* RFC 3706 DPD */
|
||||
time_t dpd_delay;
|
||||
time_t dpd_timeout;
|
||||
|
||||
@@ -329,6 +329,7 @@ void whack_handle(int whackctlfd)
|
||||
|| !unpack_str(&msg.sc_data) /* string 26 */
|
||||
|| !unpack_str(&msg.whack_lease_ip) /* string 27 */
|
||||
|| !unpack_str(&msg.whack_lease_id) /* string 28 */
|
||||
|| !unpack_str(&msg.xauth_identity) /* string 29 */
|
||||
|| str_roof - next_str != (ptrdiff_t)msg.keyval.len) /* check chunk */
|
||||
{
|
||||
ugh = "message from whack contains bad string";
|
||||
|
||||
Reference in New Issue
Block a user