feat(xml): For clarity set 'icmp' and 'icmpv6' per address family

This commit is contained in:
hygienic-books 2022-07-15 01:15:48 +02:00
parent c3179fb681
commit db5b91b469

View File

@ -296,6 +296,10 @@ def add_rule_elem(
global arg_fw_rule_data global arg_fw_rule_data
if arg_proto == "icmpv6" and address_family == "ipv4":
arg_proto = "icmp"
if arg_proto == "icmp" and address_family == "ipv6":
arg_proto = "icmpv6"
try: try:
lxml.etree.SubElement(arg_fw_rule_data, "rule", lxml.etree.SubElement(arg_fw_rule_data, "rule",
ipv=f"{address_family}", ipv=f"{address_family}",