summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-01-19 18:56:03 +0100
committerGitHub <noreply@github.com>2022-01-19 18:56:03 +0100
commit569dfa77f07cb707dec4b29ed3e2a350e214af80 (patch)
tree45d677925805c564fc2ccb24a64488599fc99e08 /python
parent10a740096edb5879ed79dd20db1a5f5bfaae6154 (diff)
parent0a5a78621b2b28f06af1f40c10ee8bb880f860a0 (diff)
downloadvyos-1x-569dfa77f07cb707dec4b29ed3e2a350e214af80.tar.gz
vyos-1x-569dfa77f07cb707dec4b29ed3e2a350e214af80.zip
Merge pull request #1177 from sarthurdev/mac_groups
firewall: T3560: Add support for MAC address groups
Diffstat (limited to 'python')
-rw-r--r--python/vyos/firewall.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/python/vyos/firewall.py b/python/vyos/firewall.py
index ad84393df..2ab78ff18 100644
--- a/python/vyos/firewall.py
+++ b/python/vyos/firewall.py
@@ -108,6 +108,9 @@ def parse_rule(rule_conf, fw_name, rule_id, ip_name):
elif 'network_group' in group:
group_name = group['network_group']
output.append(f'{ip_name} {prefix}addr $N{def_suffix}_{group_name}')
+ if 'mac_group' in group:
+ group_name = group['mac_group']
+ output.append(f'ether {prefix}addr $M_{group_name}')
if 'port_group' in group:
proto = rule_conf['protocol']
group_name = group['port_group']