Remus: fix alignment bug in python rtnl library

Signed-off-by: Brendan Cully <brendan@cs.ubc.ca>
xen-unstable changeset:   21175:acba53182435
xen-unstable date:        Thu Apr 15 08:42:40 2010 +0100
This commit is contained in:
Keir Fraser committed 2010-06-22 07:24:27 +01:00
1 parent 7bde3d0c48
commit ea570d352a
1 file changed
+2 -2
+2 -2
View File
@@ -77,7 +77,7 @@ class rtattr(object):
return align(self.rta_len)
def pack(self):
self.rta_len = align(self.fmtlen + len(self.body))
self.rta_len = self.fmtlen + align(len(self.body), 2)
s = struct.pack(self.fmt, self.rta_len, self.rta_type) + self.body
pad = self.rta_len - len(s)
if pad:
@@ -88,7 +88,7 @@ class rtattr(object):
args = struct.unpack(self.fmt, msg[:self.fmtlen])
self.rta_len, self.rta_type = args
self.body = msg[align(self.fmtlen):self.rta_len]
self.body = msg[self.fmtlen:self.rta_len]
class rtattrlist(object):
def __init__(self, msg):
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.