#endif
}
} else {
+ char* s = strchr(ip, '@');
+ char newif[128];
+ if(s) {
+ /* override port with ifspec@port */
+ int portnr;
+ if((size_t)(s-ip) >= sizeof(newif)) {
+ log_err("ifname too long: %s", ip);
+ return -1;
+ }
+ portnr = atoi(s+1);
+ if(portnr < 0 || 0 == portnr || portnr > 65535) {
+ log_err("invalid portnumber in control-interface: %s", ip);
+ return -1;
+ }
+ (void)strlcpy(newif, ip, sizeof(newif));
+ newif[s-ip] = 0;
+ ip = newif;
+ snprintf(port, sizeof(port), "%d", portnr);
+ port[sizeof(port)-1]=0;
+ }
hints.ai_socktype = SOCK_STREAM;
hints.ai_flags = AI_PASSIVE | AI_NUMERICHOST;
if((r = getaddrinfo(ip, port, &hints, &res)) != 0 || !res) {
+27 March 2026: Wouter
+ - Fix to allow the control-interface config to use ip@port notation.
+
24 March 2026: Wouter
- Fix to check for invalid http content length and chunk size,
and to check the RR rdata field lengths when decompressing and
Default: no
-@@UAHL@unbound.conf.remote@control-interface@@: *<IP address or interface name or path>*
+@@UAHL@unbound.conf.remote@control-interface@@: *<IP address or interface name[@port] or path>*
Give IPv4 or IPv6 addresses or local socket path to listen on for control
commands.
If an interface name is used instead of an IP address, the list of IP