libceph: use CEPH_MON_PORT when the specified port is 0
Similar to userspace, don't bail with "parse_ips bad ip ..." if the specified port is port 0, instead use port CEPH_MON_PORT (6789, the default monitor port). Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
cdff49918c
commit
f48db1e9ac
1 changed files with 3 additions and 1 deletions
|
@ -1866,7 +1866,9 @@ int ceph_parse_ips(const char *c, const char *end,
|
||||||
port = (port * 10) + (*p - '0');
|
port = (port * 10) + (*p - '0');
|
||||||
p++;
|
p++;
|
||||||
}
|
}
|
||||||
if (port > 65535 || port == 0)
|
if (port == 0)
|
||||||
|
port = CEPH_MON_PORT;
|
||||||
|
else if (port > 65535)
|
||||||
goto bad;
|
goto bad;
|
||||||
} else {
|
} else {
|
||||||
port = CEPH_MON_PORT;
|
port = CEPH_MON_PORT;
|
||||||
|
|
Loading…
Add table
Reference in a new issue