diff options
-rw-r--r-- | lib/ZSubs.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ZSubs.c b/lib/ZSubs.c index e0d39ee..7c7949b 100644 --- a/lib/ZSubs.c +++ b/lib/ZSubs.c @@ -188,6 +188,11 @@ Z_SendAndWaitForServer(ZNotice_t *notice, retval = ZSendPacket(buf, len, waitforack); if (retval != ZERR_NONE) return (retval); + /* Z_ReadWait drops non-initial SERVACKs and SERVNAKs on the floor. We + should never see a non-initial one here, but be defensive about bugs in the + sharding code above. */ + if (!ZCompareUID(¬ice->z_multiuid, ¬ice->z_uid)) + return (retval); if ((retval = ZIfNotice(&retnotice, (struct sockaddr_in *)0, ZCompareUIDPred, (char *)¬ice->z_uid)) != ZERR_NONE) |