if no port is specified we don't set one(or set to 0), and don't exactly error
out, so rgw keeps running without being bound to a port. Set the port to default
in these cases
Fixes: http://tracker.ceph.com/issues/39000
Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
(cherry picked from commit
9e5d4bd1a5d74490268e4dc16e885a64a1c2644c)
auto port_str = input.substr(addr_end + 2);
endpoint.port(parse_port(port_str.data(), ec));
}
+ } else {
+ endpoint.port(default_port);
}
auto addr = input.substr(addr_begin, addr_end - addr_begin);
endpoint.address(boost::asio::ip::make_address_v6(addr, ec));
if (ec) {
return endpoint;
}
+ } else {
+ endpoint.port(default_port);
}
auto addr = input.substr(0, colon);
endpoint.address(boost::asio::ip::make_address_v4(addr, ec));