WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Remus: fix alignment bug in python rtnl l

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Remus: fix alignment bug in python rtnl library
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 16 Apr 2010 21:50:14 -0700
Delivery-date: Sun, 18 Apr 2010 11:03:53 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1271317360 -3600
# Node ID acba531824354ec390c3e270a96db328362e7b57
# Parent  373daaeb636e8e237c67995718201619d0c0cbc9
Remus: fix alignment bug in python rtnl library

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
---
 tools/python/xen/remus/netlink.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 373daaeb636e -r acba53182435 tools/python/xen/remus/netlink.py
--- a/tools/python/xen/remus/netlink.py Thu Apr 15 08:42:08 2010 +0100
+++ b/tools/python/xen/remus/netlink.py Thu Apr 15 08:42:40 2010 +0100
@@ -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):

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Remus: fix alignment bug in python rtnl library, Xen patchbot-unstable <=