Hi, iked_cp_fixaddr() is called to replace unspecified (e.g. 0.0.0.0) addresses by specified (e.g. 192.0.2.1) ones. The function should return if the address is already set. The check is wrong for the IPv6 case, as it returns if it's not set. This causes the address to never be fixed.
ok? Patrick diff --git sbin/iked/ikev2.c sbin/iked/ikev2.c index 22e7661..7d36800 100644 --- sbin/iked/ikev2.c +++ sbin/iked/ikev2.c @@ -5156,7 +5156,7 @@ ikev2_cp_fixaddr(struct iked_sa *sa, struct iked_addr *addr, break; case AF_INET6: in6 = (struct sockaddr_in6 *)&addr->addr; - if (IN6_IS_ADDR_UNSPECIFIED(&in6->sin6_addr)) + if (!IN6_IS_ADDR_UNSPECIFIED(&in6->sin6_addr)) return (-1); break; }