summaryrefslogtreecommitdiff
path: root/sbin/iked/ikev2.c
diff options
context:
space:
mode:
authortobhe <tobhe@cvs.openbsd.org>2020-06-03 17:56:43 +0000
committertobhe <tobhe@cvs.openbsd.org>2020-06-03 17:56:43 +0000
commit8d7b8115963f382f2bb4d6795e8578df372c54c4 (patch)
treecaf8073865c1135c7db72d89fd5e7ceb17bfbe16 /sbin/iked/ikev2.c
parent9fa50c46892b1c523c2f1cc4610bc6617da3dccc (diff)
Pass sockaddr instead of sockaddr_storage to sa_address.
ok patrick@
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;