Skip to content
This repository was archived by the owner on Jun 27, 2018. It is now read-only.

Commit ad4957a

Browse files
SiGeJoshua Reich
authored andcommitted
Merge branch 'elisa', fixes an error where the
link status message was being reported incorrectly when port was down.
2 parents 21076bd + 88f812f commit ad4957a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

of_client/pox_client.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,10 @@ def _handle_PortStatus(self, event):
590590
CONF_UP = not 'OFPPC_PORT_DOWN' in self.active_ofp_port_config(port.config)
591591
STAT_UP = not 'OFPPS_LINK_DOWN' in self.active_ofp_port_state(port.state)
592592
PORT_TYPE = self.active_ofp_port_features(port.curr)
593-
self.send_to_pyretic(['port','join',event.dpid, port.port_no, CONF_UP, STAT_UP, PORT_TYPE])
593+
if not CONF_UP:
594+
self.send_to_pyretic(['port','part',event.dpid,event.port])
595+
else:
596+
self.send_to_pyretic(['port','join',event.dpid, port.port_no, CONF_UP, STAT_UP, PORT_TYPE])
594597
else:
595598
raise RuntimeException("Unknown port status event")
596599

0 commit comments

Comments
 (0)