of10: remove trailing NULs in OFPTableStats.name
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:
parent
24d91c929e
commit
b972589906
@ -1079,6 +1079,9 @@ class OFPTableStats(ofproto_parser.namedtuple('OFPTableStats', (
|
||||
def parser(cls, buf, offset):
|
||||
tbl = struct.unpack_from(ofproto_v1_0.OFP_TABLE_STATS_PACK_STR,
|
||||
buf, offset)
|
||||
tbl = list(tbl)
|
||||
i = cls._fields.index('name')
|
||||
tbl[i] = tbl[i].rstrip('\0')
|
||||
stats = cls(*tbl)
|
||||
stats.length = ofproto_v1_0.OFP_TABLE_STATS_SIZE
|
||||
return stats
|
||||
|
Loading…
Reference in New Issue
Block a user