summaryrefslogtreecommitdiff
path: root/sbin/iked/ikev2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/iked/ikev2.c')
-rw-r--r--sbin/iked/ikev2.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c
index c17371afb5a..316af196a3d 100644
--- a/sbin/iked/ikev2.c
+++ b/sbin/iked/ikev2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ikev2.c,v 1.229 2020/06/02 19:37:47 tobhe Exp $ */
+/* $OpenBSD: ikev2.c,v 1.230 2020/06/03 17:56:42 tobhe Exp $ */
/*
* Copyright (c) 2019 Tobias Heider <tobias.heider@stusta.de>
@@ -633,8 +633,10 @@ ikev2_recv(struct iked *env, struct iked_message *msg)
sa->sa_msgid_current = msg->msg_msgid;
}
- if (sa_address(sa, &sa->sa_peer, &msg->msg_peer) == -1 ||
- sa_address(sa, &sa->sa_local, &msg->msg_local) == -1)
+ if (sa_address(sa, &sa->sa_peer, (struct sockaddr *)&msg->msg_peer)
+ == -1 ||
+ sa_address(sa, &sa->sa_local, (struct sockaddr *)&msg->msg_local)
+ == -1)
return;
sa->sa_fd = msg->msg_fd;
@@ -3720,8 +3722,10 @@ ikev2_init_create_child_sa(struct iked *env, struct iked_message *msg)
sa->sa_nextr = NULL;
/* Setup address, socket and NAT information */
sa_state(env, dsa, IKEV2_STATE_CLOSING);
- sa_address(dsa, &dsa->sa_peer, &sa->sa_peer.addr);
- sa_address(dsa, &dsa->sa_local, &sa->sa_local.addr);
+ sa_address(dsa, &dsa->sa_peer,
+ (struct sockaddr *)&sa->sa_peer.addr);
+ sa_address(dsa, &dsa->sa_local,
+ (struct sockaddr *)&sa->sa_local.addr);
dsa->sa_fd = sa->sa_fd;
dsa->sa_natt = sa->sa_natt;
dsa->sa_udpencap = sa->sa_udpencap;