secchan: Fix port status detection

secchan was reporting the *opposite* port status for port down/link
down.

Bug reported by: Takayuki Hama <t-hama@cb.jp.nec.com>
This commit is contained in:
Glen Gibb committed 2010-02-24 16:13:17 -08:00
1 parent f173926a03
commit 49581ff4eb
1 file changed
+2 -2
+2 -2
View File
@@ -384,8 +384,8 @@ port_watcher_periodic_cb(void *pw_)
}
new_opp = *opp;
set_bit(htonl(OFPPC_PORT_DOWN), flags & NETDEV_UP, &new_opp.config);
set_bit(htonl(OFPPS_LINK_DOWN), flags & NETDEV_CARRIER,
set_bit(htonl(OFPPC_PORT_DOWN), ~flags & NETDEV_UP, &new_opp.config);
set_bit(htonl(OFPPS_LINK_DOWN), ~flags & NETDEV_CARRIER,
&new_opp.state);
if (opp->config != new_opp.config || opp->state != new_opp.state) {
struct ofp_port_status *ops;