summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSriram Natarajan <natarajan.sriram@gmail.com>2014-03-21 14:59:44 +0900
committerFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2014-03-21 14:59:44 +0900
commit6ce45939debcd3166d4d2fc532c8de298a27032d (patch)
tree5f0a3b8c30d994b51cce739ae06dcb85fa8ab6dd
parent81d6f1e2520d63a8395a26e0722b95a162295b95 (diff)
rest_router: fix OFPSetAsync bit mask
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
-rw-r--r--ryu/app/rest_router.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/ryu/app/rest_router.py b/ryu/app/rest_router.py
index e502d89d..fb1e7d6d 100644
--- a/ryu/app/rest_router.py
+++ b/ryu/app/rest_router.py
@@ -1818,14 +1818,14 @@ class OfCtl_v1_3(OfCtl_after_v1_2):
super(OfCtl_v1_3, self).__init__(dp, logger)
def set_sw_config_for_ttl(self):
- packet_in_mask = (self.dp.ofproto.OFPR_ACTION |
- self.dp.ofproto.OFPR_INVALID_TTL)
- port_status_mask = (self.dp.ofproto.OFPPR_ADD |
- self.dp.ofproto.OFPPR_DELETE |
- self.dp.ofproto.OFPPR_MODIFY)
- flow_removed_mask = (self.dp.ofproto.OFPRR_IDLE_TIMEOUT |
- self.dp.ofproto.OFPRR_HARD_TIMEOUT |
- self.dp.ofproto.OFPRR_DELETE)
+ packet_in_mask = (1 << self.dp.ofproto.OFPR_ACTION |
+ 1 << self.dp.ofproto.OFPR_INVALID_TTL)
+ port_status_mask = (1 << self.dp.ofproto.OFPPR_ADD |
+ 1 << self.dp.ofproto.OFPPR_DELETE |
+ 1 << self.dp.ofproto.OFPPR_MODIFY)
+ flow_removed_mask = (1 << self.dp.ofproto.OFPRR_IDLE_TIMEOUT |
+ 1 << self.dp.ofproto.OFPRR_HARD_TIMEOUT |
+ 1 << self.dp.ofproto.OFPRR_DELETE)
m = self.dp.ofproto_parser.OFPSetAsync(
self.dp, [packet_in_mask, 0], [port_status_mask, 0],
[flow_removed_mask, 0])