summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--ryu/ofproto/ofproto_v1_3_parser.py23
1 files changed, 10 insertions, 13 deletions
diff --git a/ryu/ofproto/ofproto_v1_3_parser.py b/ryu/ofproto/ofproto_v1_3_parser.py
index 7afaf7bf..b3514658 100644
--- a/ryu/ofproto/ofproto_v1_3_parser.py
+++ b/ryu/ofproto/ofproto_v1_3_parser.py
@@ -510,7 +510,7 @@ class OFPGetConfigReply(MsgBase):
============= =========================================================
Attribute Description
============= =========================================================
- flags One of the following configuration flags.
+ flags Bitmap of the following flags.
OFPC_FRAG_NORMAL
OFPC_FRAG_DROP
OFPC_FRAG_REASM
@@ -526,20 +526,17 @@ class OFPGetConfigReply(MsgBase):
msg = ev.msg
dp = msg.datapath
ofp = dp.ofproto
-
- if msg.flags == ofp.OFPC_FRAG_NORMAL:
- flags = 'NORMAL'
- elif msg.flags == ofp.OFPC_FRAG_DROP:
- flags = 'DROP'
- elif msg.flags == ofp.OFPC_FRAG_REASM:
- flags = 'REASM'
- elif msg.flags == ofp.OFPC_FRAG_MASK:
- flags = 'MASK'
- else:
- flags = 'unknown'
+ flags = []
+
+ if msg.flags & ofp.OFPC_FRAG_NORMAL:
+ flags.append('NORMAL')
+ if msg.flags & ofp.OFPC_FRAG_DROP:
+ flags.append('DROP')
+ if msg.flags & ofp.OFPC_FRAG_REASM:
+ flags.append('REASM')
self.logger.debug('OFPGetConfigReply received: '
'flags=%s miss_send_len=%d',
- flags, msg.miss_send_len)
+ ','.join(flags), msg.miss_send_len)
"""
def __init__(self, datapath, flags=None, miss_send_len=None):
super(OFPGetConfigReply, self).__init__(datapath)