Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f48db1e9 authored by Ilya Dryomov's avatar Ilya Dryomov
Browse files

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: default avatarIlya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: default avatarSage Weil <sage@inktank.com>
parent cdff4991
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -1866,7 +1866,9 @@ int ceph_parse_ips(const char *c, const char *end,
				port = (port * 10) + (*p - '0');
				p++;
			}
			if (port > 65535 || port == 0)
			if (port == 0)
				port = CEPH_MON_PORT;
			else if (port > 65535)
				goto bad;
		} else {
			port = CEPH_MON_PORT;