packet_data_generator3: Clear xid into zero
Because ovs-ofctl increments the xid field automatically, the xid of the generated packets is set to be 0x02. So, we should specify {"xid": 2} in json data, but when Ryu dumping json data from message instance, "xid" are omitted and this causes assertion error in test_parser.py This patch enables to clear the xid filed in the generated packets and solves this problem. Signed-off-by: IWASE Yusuke <iwase.yusuke0@gmail.com> Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
parent
709b3ad28f
commit
1bcb23e556
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -162,7 +162,8 @@ class MyHandler(socketserver.BaseRequestHandler):
|
|||
hello.serialize()
|
||||
self.request.send(hello.buf)
|
||||
elif msg_type == desc.ofproto.OFPT_FLOW_MOD:
|
||||
buf.append(data[:msg_len])
|
||||
# HACK: Clear xid into zero
|
||||
buf.append(data[:4] + b'\x00\x00\x00\x00' + data[8:msg_len])
|
||||
elif msg_type == desc.ofproto.OFPT_BARRIER_REQUEST:
|
||||
brep = desc.ofproto_parser.OFPBarrierReply(desc)
|
||||
brep.xid = xid
|
||||
|
|
|
@ -95,7 +95,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 2,
|
||||
"xid": 2
|
||||
"table_id": 2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -70,7 +70,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -65,7 +65,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -187,7 +187,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 2,
|
||||
"xid": 2
|
||||
"table_id": 2
|
||||
}
|
||||
}
|
||||
|
|
|
@ -94,7 +94,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,7 +55,6 @@
|
|||
"out_group": 4294967295,
|
||||
"out_port": 4294967295,
|
||||
"priority": 32768,
|
||||
"table_id": 3,
|
||||
"xid": 2
|
||||
"table_id": 3
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue