All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Meneghel Rodrigues <lmr@redhat.com>
To: autotest@test.kernel.org
Cc: kvm@vger.kernel.org
Subject: [PATCH] virt: Revert only update macaddr cache when capture dhcp ACK pkt
Date: Mon, 24 Oct 2011 14:54:58 -0200	[thread overview]
Message-ID: <1319475298-23680-1-git-send-email-lmr@redhat.com> (raw)

Revert commit d9bab5bef598b4b415d004eb62e9cd32c3243565, that changes
how the macaddr cache is updated. This patch brought a lot of
regressions on our internal tests, so it'll be dropped until a possibly
safer version of the fix is proposed.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
---
 client/virt/virt_env_process.py |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/client/virt/virt_env_process.py b/client/virt/virt_env_process.py
index a1ec07a..25285b8 100644
--- a/client/virt/virt_env_process.py
+++ b/client/virt/virt_env_process.py
@@ -403,20 +403,14 @@ def _update_address_cache(address_cache, line):
             address_cache["last_seen"] = matches[0]
     if re.search("Client.Ethernet.Address", line, re.IGNORECASE):
         matches = re.findall(r"\w*:\w*:\w*:\w*:\w*:\w*", line)
-        if matches:
-            address_cache["last_mac"] = matches[0]
-    if re.search("DHCP-Message", line, re.IGNORECASE):
-        matches = re.findall(r"ACK", line)
-        if matches and (address_cache.get("last_seen") and
-                        address_cache.get("last_mac")):
-            mac_address = address_cache.get("last_mac").lower()
+        if matches and address_cache.get("last_seen"):
+            mac_address = matches[0].lower()
             if time.time() - address_cache.get("time_%s" % mac_address, 0) > 5:
                 logging.debug("(address cache) Adding cache entry: %s ---> %s",
                               mac_address, address_cache.get("last_seen"))
             address_cache[mac_address] = address_cache.get("last_seen")
             address_cache["time_%s" % mac_address] = time.time()
             del address_cache["last_seen"]
-            del address_cache["last_mac"]
 
 
 def _take_screendumps(test, params, env):
-- 
1.7.7

                 reply	other threads:[~2011-10-24 16:54 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319475298-23680-1-git-send-email-lmr@redhat.com \
    --to=lmr@redhat.com \
    --cc=autotest@test.kernel.org \
    --cc=kvm@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.