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-4.0-testing] Remus: fix alignment bug in python rtn

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-4.0-testing] Remus: fix alignment bug in python rtnl library
From: "Xen patchbot-4.0-testing" <patchbot-4.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Jun 2010 23:35:25 -0700
Delivery-date: Mon, 21 Jun 2010 23:36:09 -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 1277187867 -3600
# Node ID cde182fde88c0709b9d37b64da7312b77f19d98d
# Parent  00d4809d461e2fcc3c16f002ff6df6739693e358
Remus: fix alignment bug in python rtnl library

Signed-off-by: Brendan Cully <brendan@xxxxxxxxx>
xen-unstable changeset:   21175:acba53182435
xen-unstable date:        Thu Apr 15 08:42:40 2010 +0100
---
 tools/python/xen/remus/netlink.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff -r 00d4809d461e -r cde182fde88c tools/python/xen/remus/netlink.py
--- a/tools/python/xen/remus/netlink.py Tue Jun 22 07:24:04 2010 +0100
+++ b/tools/python/xen/remus/netlink.py Tue Jun 22 07:24:27 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-4.0-testing] Remus: fix alignment bug in python rtnl library, Xen patchbot-4.0-testing <=