From 97564f014c2d64898fb0d6ed0bebfcf05a6ea3c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Thu, 14 Dec 2017 02:07:57 +0100 Subject: [PATCH] vm/mix/net: fix setting QubesDB after converting to ipaddress module --- qubes/vm/mix/net.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qubes/vm/mix/net.py b/qubes/vm/mix/net.py index 5876663d..ef7b8463 100644 --- a/qubes/vm/mix/net.py +++ b/qubes/vm/mix/net.py @@ -349,7 +349,7 @@ class NetVMMixin(qubes.events.Emitter): ip = vm.ip6 if addr_family == 6 else vm.ip if ip is None: continue - base_dir = '/qubes-firewall/' + ip + '/' + base_dir = '/qubes-firewall/{}/'.format(ip) # remove old entries if any (but don't touch base empty entry - it # would trigger reload right away self.untrusted_qdb.rm(base_dir) @@ -370,12 +370,12 @@ class NetVMMixin(qubes.events.Emitter): mapped_ip_base = '/mapped-ip/{}'.format(vm.ip) if vm.visible_ip: self.untrusted_qdb.write(mapped_ip_base + '/visible-ip', - vm.visible_ip) + str(vm.visible_ip)) else: self.untrusted_qdb.rm(mapped_ip_base + '/visible-ip') if vm.visible_gateway: self.untrusted_qdb.write(mapped_ip_base + '/visible-gateway', - vm.visible_gateway) + str(vm.visible_gateway)) else: self.untrusted_qdb.rm(mapped_ip_base + '/visible-gateway')