diff --git a/src/mon/MDSMonitor.cc b/src/mon/MDSMonitor.cc index 7c9e3c9ec6b..8e560c74f7a 100644 --- a/src/mon/MDSMonitor.cc +++ b/src/mon/MDSMonitor.cc @@ -182,6 +182,12 @@ bool MDSMonitor::preprocess_beacon(MMDSBeacon *m) << " " << m->get_compat() << dendl; + // make sure the address has a port + if (m->get_orig_source_addr().get_port() == 0) { + dout(1) << " ignoring boot message without a port" << dendl; + goto out; + } + // check compat if (!m->get_compat().writeable(mdsmap.compat)) { dout(1) << " mds " << m->get_source_inst() << " can't write to mdsmap " << mdsmap.compat << dendl;