]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: ignore mds boot messages with zeroed port
authorSage Weil <sage.weil@dreamhost.com>
Mon, 7 Feb 2011 04:49:59 +0000 (20:49 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Mon, 7 Feb 2011 04:49:59 +0000 (20:49 -0800)
On 0.24.2 I saw a zeroed port in the cmds log and in the mdsmap.  Ignore
anything from a cmds with a zeroed port to prevent the insanity from
spreading.

Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/mon/MDSMonitor.cc

index 7c9e3c9ec6bd2c2bb320e63cf04044ec02dd7d31..8e560c74f7a1b91aeacad789ea808dfb22651972 100644 (file)
@@ -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;