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