From 8dbe6213e11d47686753ee2a47c84c13c14c9aad Mon Sep 17 00:00:00 2001 From: Giulio Date: Tue, 22 Jun 2021 18:14:53 +0200 Subject: [PATCH] Moved forwardtype near action for consistency --- qubes/firewall.py | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/qubes/firewall.py b/qubes/firewall.py index 9ba258df..2890e8cd 100644 --- a/qubes/firewall.py +++ b/qubes/firewall.py @@ -83,6 +83,15 @@ class Action(RuleChoice): return 'action=' + str(self) +class ForwardType(RuleOption): + external = 'external' + internal = 'internal' + + @property + def rule(self): + return 'forwardtype=' + str(self) + + class Proto(RuleChoice): tcp = 'tcp' udp = 'udp' @@ -183,13 +192,6 @@ class DstPorts(RuleOption): def rule(self): return 'dstports=' + '{!s}-{!s}'.format(*self.range) -class ForwardType(RuleOption): - external = 'external' - internal = 'internal' - - @property - def rule(self): - return 'forwardtype=' + str(self) class IcmpType(RuleOption): def __init__(self, untrusted_value):