[ovs-dev] [L3 In-Band 3/9] in-band: Fix status checks that could prevent in-band updates

Justin Pettit jpettit at nicira.com
Mon Aug 31 23:17:35 UTC 2009


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 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/secchan/in-band.c b/secchan/in-band.c
index 9b699ca..eb8c336 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));
     }
 }
 
-- 
1.5.5





More information about the dev mailing list