of12 OFPMatchField: make this safe to serialize multiple times

this will be used by OFPMatch old api compat code.

Signed-off-by: YAMAMOTO Takashi <yamamoto@valinux.co.jp>
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
This commit is contained in:
YAMAMOTO Takashi 2013-07-23 16:03:21 +09:00 committed by FUJITA Tomonori
parent efcf9263b0
commit 4dfd93b1b2

View File

@ -2220,7 +2220,7 @@ class OFPMatchField(StringifyMixin):
def _put_header(self, buf, offset):
ofproto_parser.msg_pack_into('!I', buf, offset, self.header)
self.length += 4
self.length = 4
def _put(self, buf, offset, value):
ofproto_parser.msg_pack_into(self.pack_str, buf, offset, value)