From 85aec2e07a3a60761dc8bdebb86fb8a58379d7d4 Mon Sep 17 00:00:00 2001 From: ovcharenko Date: Tue, 16 Aug 2016 16:09:17 +0300 Subject: [PATCH] [FIX] "Invalid interface clause" error in UFW module (#2559) (#2666) Fixes GH-2559 --- system/ufw.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/system/ufw.py b/system/ufw.py index c70f51f88b8..e88c1456975 100644 --- a/system/ufw.py +++ b/system/ufw.py @@ -263,10 +263,11 @@ def main(): cmd.append([module.boolean(params['route']), 'route']) cmd.append([params['insert'], "insert %s" % params['insert']]) cmd.append([value]) + cmd.append([params['direction'], "%s" % params['direction']]) + cmd.append([params['interface'], "on %s" % params['interface']]) cmd.append([module.boolean(params['log']), 'log']) - for (key, template) in [('direction', "%s" ), ('interface', "on %s" ), - ('from_ip', "from %s" ), ('from_port', "port %s" ), + for (key, template) in [('from_ip', "from %s" ), ('from_port', "port %s" ), ('to_ip', "to %s" ), ('to_port', "port %s" ), ('proto', "proto %s"), ('app', "app '%s'")]: