From: Justin Pettit Date: Thu, 27 Aug 2009 22:13:59 +0000 (-0700) Subject: in-band: Fix status checks that could prevent in-band updates X-Git-Tag: v0.90.5~14 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=4701460af0e19588ec3c0fb2db11e4e2779e0444;p=sliver-openvswitch.git 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. --- 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)); } }