mirror of
https://github.com/faucetsdn/ryu.git
synced 2026-05-05 04:16:11 +02:00
ryu.controller.controller.Datapath: keep handler list regardless of state
The list of handler to be called for the OFP message should be kept even if the state is changed in a handler. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
9ad5a493af
commit
2ac7a9cf6c
@ -172,10 +172,11 @@ class Datapath(object):
|
||||
ev = ofp_event.ofp_msg_to_ev(msg)
|
||||
self.ofp_brick.send_event_to_observers(ev, self.state)
|
||||
|
||||
handlers = self.ofp_brick.get_handlers(ev)
|
||||
handlers = [handler for handler in
|
||||
self.ofp_brick.get_handlers(ev) if self.state in
|
||||
handler.dispatchers]
|
||||
for handler in handlers:
|
||||
if self.state in handler.dispatchers:
|
||||
handler(ev)
|
||||
handler(ev)
|
||||
|
||||
buf = buf[required_len:]
|
||||
required_len = ofproto_common.OFP_HEADER_SIZE
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user