From 4701460af0e19588ec3c0fb2db11e4e2779e0444 Mon Sep 17 00:00:00 2001
From: Justin Pettit <jpettit@nicira.com>
Date: Thu, 27 Aug 2009 15:13:59 -0700
Subject: [PATCH] in-band: Fix status checks that could prevent in-band updates

The method the status callback was using to retrieve the local and
remote MAC addresses pushed back the refresh timer.  If this were done
frequently, it could prevent in-band control from updating its rules.
---
 secchan/in-band.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/secchan/in-band.c b/secchan/in-band.c
index 9b699ca35..eb8c33625 100644
--- a/secchan/in-band.c
+++ b/secchan/in-band.c
@@ -163,19 +163,15 @@ static void
 in_band_status_cb(struct status_reply *sr, void *in_band_)
 {
     struct in_band *in_band = in_band_;
-    const uint8_t *local_mac;
-    const uint8_t *controller_mac;
 
-    local_mac = get_local_mac(in_band);
-    if (local_mac) {
+    if (!eth_addr_is_zero(in_band->local_mac)) {
         status_reply_put(sr, "local-mac="ETH_ADDR_FMT,
-                         ETH_ADDR_ARGS(local_mac));
+                         ETH_ADDR_ARGS(in_band->local_mac));
     }
 
-    controller_mac = get_controller_mac(in_band);
-    if (controller_mac) {
+    if (!eth_addr_is_zero(in_band->mac)) {
         status_reply_put(sr, "controller-mac="ETH_ADDR_FMT,
-                         ETH_ADDR_ARGS(controller_mac));
+                         ETH_ADDR_ARGS(in_band->mac));
     }
 }
 
-- 
2.47.0