Synopsis: iked silently discards IPv6 link-local addresses without logging Category: sbin Description: When processing interface addresses in ifa_lookup(), link-local IPv6 addresses are silently discarded. This makes debugging connectivity issues harder since there is no indication in the logs that these addresses were found but ignored. Fix: Add logging to show when link-local addresses are being skipped, including the interface name and address being discarded. This helps administrators understand why certain IPv6 addresses might not be available for IKE negotiation.
Index: parse.y =================================================================== RCS file: /cvs/src/sbin/iked/parse.y,v diff -u -p -u -r1.147 parse.y --- parse.y 13 Jul 2024 12:22:46 -0000 1.147 +++ parse.y 3 Jan 2025 18:15:01 -0000 @@ -2558,6 +2558,11 @@ ifa_lookup(const char *ifa_name) /* for now we can not handle link local, * therefore bail for now */ + char buf[INET6_ADDRSTRLEN]; + log_debug("%s: skipping link-local address %s on interface %s", + __func__, + inet_ntop(AF_INET6, &in6->sin6_addr, buf, sizeof(buf)), + ifa_name); free(n->name); free(n); continue;