diff --git a/qubesagent/firewall.py b/qubesagent/firewall.py index ca89f38..5443dc0 100755 --- a/qubesagent/firewall.py +++ b/qubesagent/firewall.py @@ -504,7 +504,7 @@ class NftablesWorker(FirewallWorker): action = 'accept' elif rule['action'] == 'drop': action = 'reject with icmp{} type admin-prohibited'.format( - '6' if family == 6 else '') + 'v6' if family == 6 else '') else: raise RuleParseError( 'Invalid rule action {}'.format(rule['action'])) diff --git a/qubesagent/test_firewall.py b/qubesagent/test_firewall.py index 6dddc72..12190c3 100644 --- a/qubesagent/test_firewall.py +++ b/qubesagent/test_firewall.py @@ -411,10 +411,10 @@ class TestNftablesWorker(TestCase): ' ip6 daddr { 2001::1/128, 2001::2/128 } tcp dport 53 accept\n' ' ip6 daddr { 2001::1/128, 2001::2/128 } udp dport 53 accept\n' ' ip6 nexthdr udp ip6 daddr { 2001::1/128, 2001::2/128 } ' - 'udp dport 53 reject with icmp6 type admin-prohibited\n' - ' ip6 nexthdr icmpv6 icmpv6 type 128 reject with icmp6 type ' + 'udp dport 53 reject with icmpv6 type admin-prohibited\n' + ' ip6 nexthdr icmpv6 icmpv6 type 128 reject with icmpv6 type ' 'admin-prohibited\n' - ' reject with icmp6 type admin-prohibited\n' + ' reject with icmpv6 type admin-prohibited\n' ' }\n' '}\n' )