From 39292d3a9802ebba9ee787ca27b3301a29c07b46 Mon Sep 17 00:00:00 2001
From: Iustin Pop <iustin@google.com>
Date: Wed, 7 Apr 2010 15:44:54 +0200
Subject: [PATCH] Fix consistency checks in ConfdFilterCallback

Commit 49b3fda added consistency checks, but these are wrongly triggered
for old responses - we need to make sure to check that we have the same
serial.

Signed-off-by: Iustin Pop <iustin@google.com>
Reviewed-by: Michael Hanselmann <hansmi@google.com>
---
 lib/confd/client.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/confd/client.py b/lib/confd/client.py
index 71b510435..3544e83b1 100644
--- a/lib/confd/client.py
+++ b/lib/confd/client.py
@@ -424,7 +424,8 @@ class ConfdFilterCallback:
       # else: different content, pass up a second answer
     else:
       # older or same-version answer (duplicate or outdated, filter)
-      if up.server_reply.answer != self._answers[salt].answer:
+      if (up.server_reply.serial == self._answers[salt].serial and
+          up.server_reply.answer != self._answers[salt].answer):
         self.consistent[salt] = False
       filter_upcall = True
       self._LogFilter(salt, up.server_reply, self._answers[salt])
-- 
GitLab