This change fixes the sending of INTERNAL_IP6_DNS, INTERNAL_IP6_DHCP
(RFC5996); INTERNAL_IP6_NBNS (RFC4306); and INTERNAL_IP6_SERVER
(MS-IKEE).

Prior to this fix the data sent to clients was garbled.

Index: ikev2.c
===================================================================
RCS file: /cvs/src/sbin/iked/ikev2.c,v
retrieving revision 1.166
diff -u -p -u -p -r1.166 ikev2.c
--- ikev2.c     5 Mar 2018 14:30:30 -0000       1.166
+++ ikev2.c     21 Feb 2019 17:19:21 -0000
@@ -1935,7 +1935,7 @@ ikev2_add_cp(struct iked *env, struct ik
                case IKEV2_CFG_INTERNAL_IP6_DHCP:
                case IKEV2_CFG_INTERNAL_IP6_SERVER:
                        /* 16 bytes IPv6 address */
-                       in6 = (struct sockaddr_in6 *)&ikecfg->cfg.address;
+                       in6 = (struct sockaddr_in6 *)&ikecfg->cfg.address.addr;
                        cfg->cfg_length = htobe16(16);
                        if (ibuf_add(buf, &in6->sin6_addr.s6_addr, 16) == -1)
                                return (-1);

Reply via email to