diff --git a/core/src/lib/res.cc b/core/src/lib/res.cc index 71842c125c2..378836a73e7 100644 --- a/core/src/lib/res.cc +++ b/core/src/lib/res.cc @@ -1318,7 +1318,8 @@ void ConfigurationParser::StoreAddressesAddress(LEX* lc, if (pass == 1 && !AddAddress(GetItemVariablePointer**>(*item), - IPADDR::R_SINGLE_ADDR, htons(port), AF_INET, lc->str, 0, + IPADDR::R_SINGLE_ADDR, htons(port), + strchr(lc->str, ':') ? AF_INET6 : AF_INET, lc->str, 0, errmsg, sizeof(errmsg))) { scan_err2(lc, _("can't add port (%s) to (%s)"), lc->str, errmsg); }