Antoni Segura Puimedon has uploaded a new change for review.
Change subject: netlink: make the scope string stable across libnl1-3
......................................................................
netlink: make the scope string stable across libnl1-3
For globally scoped routes, libnl1 reports 'universe' and libnl3
reports 'global'. This patch makes sure that we only get 'global'.
Change-Id: I700ba3d0997a5c829c460753a300d4529aae2a61
Signed-off-by: Antoni S. Puimedon <asegurap(a)redhat.com>
---
M lib/vdsm/netlink/__init__.py
1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/98/29598/1
diff --git a/lib/vdsm/netlink/__init__.py b/lib/vdsm/netlink/__init__.py
index 4f46b98..b9dc943 100644
--- a/lib/vdsm/netlink/__init__.py
+++ b/lib/vdsm/netlink/__init__.py
@@ -103,7 +103,9 @@
def _scope_to_str(scope_num):
"""Returns the textual scope representation of the numerical
id"""
scope = (c_char * CHARBUFFSIZE)()
- return _rtnl_scope2str(scope_num, scope, sizeof(scope))
+ scope = _rtnl_scope2str(scope_num, scope, sizeof(scope))
+ # libnl1 reports 'universe' instead of 'global'
+ return scope if scope != 'universe' else 'global'
# C function prototypes
#
http://docs.python.org/2/library/ctypes.html#function-prototypes
--
To view, visit
http://gerrit.ovirt.org/29598
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I700ba3d0997a5c829c460753a300d4529aae2a61
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap(a)redhat.com>