summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/iked/iked.c12
-rw-r--r--sbin/iked/iked.h4
-rw-r--r--sbin/iked/ikev2.c8
3 files changed, 12 insertions, 12 deletions
diff --git a/sbin/iked/iked.c b/sbin/iked/iked.c
index e2ea8fc95c8..127caec6936 100644
--- a/sbin/iked/iked.c
+++ b/sbin/iked/iked.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.c,v 1.44 2020/08/21 14:30:17 tobhe Exp $ */
+/* $OpenBSD: iked.c,v 1.45 2020/08/23 15:14:25 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -133,7 +133,7 @@ main(int argc, char *argv[])
fatal("calloc: env");
env->sc_opts = opts;
- env->natt_mode = natt_mode;
+ env->sc_nattmode = natt_mode;
env->sc_nattport = port;
ps = &env->sc_ps;
@@ -232,17 +232,17 @@ parent_configure(struct iked *env)
ss.ss_family = AF_INET;
/* see comment on config_setsocket() */
- if (env->natt_mode != NATT_FORCE)
+ if (env->sc_nattmode != NATT_FORCE)
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
- if (env->natt_mode != NATT_DISABLE)
+ if (env->sc_nattmode != NATT_DISABLE)
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
bzero(&ss, sizeof(ss));
ss.ss_family = AF_INET6;
- if (env->natt_mode != NATT_FORCE)
+ if (env->sc_nattmode != NATT_FORCE)
config_setsocket(env, &ss, htons(IKED_IKE_PORT), PROC_IKEV2);
- if (env->natt_mode != NATT_DISABLE)
+ if (env->sc_nattmode != NATT_DISABLE)
config_setsocket(env, &ss, htons(env->sc_nattport), PROC_IKEV2);
/*
diff --git a/sbin/iked/iked.h b/sbin/iked/iked.h
index bbe556e81ec..5763bf68b02 100644
--- a/sbin/iked/iked.h
+++ b/sbin/iked/iked.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: iked.h,v 1.158 2020/08/21 14:30:17 tobhe Exp $ */
+/* $OpenBSD: iked.h,v 1.159 2020/08/23 15:14:25 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -679,7 +679,7 @@ struct iked {
char sc_conffile[PATH_MAX];
uint32_t sc_opts;
- enum natt_mode natt_mode;
+ enum natt_mode sc_nattmode;
uint8_t sc_passive;
uint8_t sc_decoupled;
in_port_t sc_nattport;
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index 7adbd306fe7..0e535043ce2 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.245 2020/08/22 21:40:24 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.246 2020/08/23 15:14:25 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -1230,7 +1230,7 @@ ikev2_init_ike_sa_peer(struct iked *env, struct iked_policy *pol,
goto done;
}
- if (env->natt_mode != NATT_DISABLE) {
+ if (env->sc_nattmode != NATT_DISABLE) {
if (ntohs(port) == env->sc_nattport) {
/* Enforce NAT-T on the initiator side */
log_debug("%s: enforcing NAT-T", __func__);
@@ -2050,7 +2050,7 @@ ikev2_nat_detection(struct iked *env, struct iked_message *msg,
goto done;
}
- if (env->natt_mode == NATT_FORCE) {
+ if (env->sc_nattmode == NATT_FORCE) {
/* Enforce NAT-T/UDP-encapsulation by distorting the digest */
rnd = arc4random();
EVP_DigestUpdate(&ctx, &rnd, sizeof(rnd));
@@ -2794,7 +2794,7 @@ ikev2_resp_ike_sa_init(struct iked *env, struct iked_message *msg)
goto done;
}
- if ((env->natt_mode != NATT_DISABLE) &&
+ if ((env->sc_nattmode != NATT_DISABLE) &&
msg->msg_local.ss_family != AF_UNSPEC) {
if ((len = ikev2_add_nat_detection(env, buf, &pld, &resp, len))
== -1)