summaryrefslogtreecommitdiff
path: root/python/vyos
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-09-27 16:02:22 +0200
committerGitHub <noreply@github.com>2022-09-27 16:02:22 +0200
commitc22f9d76fb771ed22b62ed1ca4205fa7590cf816 (patch)
tree3d145e6435e6cd9a1e5eb4733319f4eb16f69b60 /python/vyos
parent5fe0e9c163ee2f8229e298fc20dbfe6746c2cdcc (diff)
parent3f6b5b5cec7eed685ae11202197b760a46e02137 (diff)
downloadvyos-1x-c22f9d76fb771ed22b62ed1ca4205fa7590cf816.tar.gz
vyos-1x-c22f9d76fb771ed22b62ed1ca4205fa7590cf816.zip
Merge pull request #1560 from nicolas-fort/T4700
T4700: Firewall: add interface matching criteria
Diffstat (limited to 'python/vyos')
-rw-r--r--python/vyos/firewall.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index f9b7222fd..4075e55b0 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -248,6 +248,14 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
value = rule_conf['hop_limit'][op]
output.append(f'ip6 hoplimit {operator} {value}')
+ if 'inbound_interface' in rule_conf:
+ iiface = rule_conf['inbound_interface']
+ output.append(f'iifname {iiface}')
+
+ if 'outbound_interface' in rule_conf:
+ oiface = rule_conf['outbound_interface']
+ output.append(f'oifname {oiface}')
+
if 'ttl' in rule_conf:
operators = {'eq': '==', 'gt': '>', 'lt': '<'}
for op, operator in operators.items():