summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Libosvar <libosvar@redhat.com>2018-05-15 19:06:36 +0000
committerJakub Libosvar <libosvar@redhat.com>2018-05-15 19:06:36 +0000
commitec0760a40e68f921e482d77a01551f7f4e0e3788 (patch)
tree890b4373c8c4790919deae16e480b4cb5d18cbc1
parentea40415d22d9f45f892eb004746035849700c7b7 (diff)
py3: Fix list_entries for netlink_lib
As privsep communicates with main process via socket, data passed through this socket must be string type in Python 3. This patch converts bytes to string, then privsep works correctly. Change-Id: I6838d13b5acc32e939fba3c9abfea7cd483e971b Closes-bug: #1771410
Notes
Notes (review): Verified+1: Mellanox CI <mlnx-openstack-ci@dev.mellanox.co.il> Code-Review+2: Brian Haley <haleyb.dev@gmail.com> Code-Review+2: Slawek Kaplonski <skaplons@redhat.com> Workflow+1: Slawek Kaplonski <skaplons@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Wed, 16 May 2018 23:27:11 +0000 Reviewed-on: https://review.openstack.org/568675 Project: openstack/neutron Branch: refs/heads/master
-rw-r--r--neutron/privileged/agent/linux/netlink_lib.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/neutron/privileged/agent/linux/netlink_lib.py b/neutron/privileged/agent/linux/netlink_lib.py
index df0c22e..ac8e364 100644
--- a/neutron/privileged/agent/linux/netlink_lib.py
+++ b/neutron/privileged/agent/linux/netlink_lib.py
@@ -139,7 +139,7 @@ class ConntrackManager(object):
139 conntrack, type_, 139 conntrack, type_,
140 nl_constants.NFCT_O_PLAIN, 140 nl_constants.NFCT_O_PLAIN,
141 nl_constants.NFCT_OF_TIME) 141 nl_constants.NFCT_OF_TIME)
142 entries.append(raw_entry.value) 142 entries.append(raw_entry.value.decode('utf-8'))
143 return nl_constants.NFCT_CB_CONTINUE 143 return nl_constants.NFCT_CB_CONTINUE
144 144
145 self._callback_register(nl_constants.NFCT_T_ALL, 145 self._callback_register(nl_constants.NFCT_T_ALL,