of13 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:33 +09:00 committed by FUJITA Tomonori
parent 937001622c
commit 9844c86901

View File

@ -1024,7 +1024,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)