|
|
8072fb |
From 1eb5d5c57edb6e35895fa4ae4314f652da423d92 Mon Sep 17 00:00:00 2001
|
|
|
8072fb |
From: Eric Garver <eric@garver.life>
|
|
|
8072fb |
Date: Fri, 24 Apr 2020 11:27:10 -0400
|
|
|
8072fb |
Subject: [PATCH 15/45] fix(client): addService needs to reduce tuple size
|
|
|
8072fb |
|
|
|
8072fb |
The dbus API only allows 8 elements. Reduce the tuple to the correct
|
|
|
8072fb |
size as it's common for clients to do
|
|
|
8072fb |
|
|
|
8072fb |
settings = FirewallClientServiceSettings()
|
|
|
8072fb |
[..]
|
|
|
8072fb |
addService(settings.settings)
|
|
|
8072fb |
|
|
|
8072fb |
(cherry picked from commit e2ab8a6e584e6ba2adb0a5e0a13fbb6d7eb39b0c)
|
|
|
8072fb |
(cherry picked from commit 3eae583907a953b71df16747bbabefd24fbdc3ab)
|
|
|
8072fb |
---
|
|
|
8072fb |
src/firewall/client.py | 4 +++-
|
|
|
8072fb |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
8072fb |
|
|
|
8072fb |
diff --git a/src/firewall/client.py b/src/firewall/client.py
|
|
|
8072fb |
index efe5d7db1273..ea27c0186509 100644
|
|
|
8072fb |
--- a/src/firewall/client.py
|
|
|
8072fb |
+++ b/src/firewall/client.py
|
|
|
8072fb |
@@ -2488,7 +2488,9 @@ class FirewallClientConfig(object):
|
|
|
8072fb |
elif type(settings) is dict:
|
|
|
8072fb |
path = self.fw_config.addService2(name, settings)
|
|
|
8072fb |
else:
|
|
|
8072fb |
- path = self.fw_config.addService(name, tuple(settings))
|
|
|
8072fb |
+ # tuple based dbus API has 8 elements. Slice what we're given down
|
|
|
8072fb |
+ # to the expected size.
|
|
|
8072fb |
+ path = self.fw_config.addService(name, tuple(settings[:8]))
|
|
|
8072fb |
return FirewallClientConfigService(self.bus, path)
|
|
|
8072fb |
|
|
|
8072fb |
# icmptype
|
|
|
8072fb |
--
|
|
|
8072fb |
2.27.0
|
|
|
8072fb |
|