diff --git a/src/cfgparse.c b/src/cfgparse.c index 7fc499a6f..c5b2b20dd 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -1041,8 +1041,14 @@ int cfg_parse_resolvers(const char *file, int linenum, char **args, int kwm) goto out; } + /* handle nicely the case where "udp@" is forced */ + if (sk->ss_family == AF_CUST_UDP4) + sk->ss_family = AF_INET; + else if (sk->ss_family == AF_CUST_UDP6) + sk->ss_family = AF_INET6; + proto = protocol_by_family(sk->ss_family); - if (!proto || !proto->connect) { + if (!proto) { ha_alert("parsing [%s:%d] : '%s %s' : connect() not supported for this address family.\n", file, linenum, args[0], args[1]); err_code |= ERR_ALERT | ERR_FATAL;