Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow protocol 'icmp6' for icmp-types #352

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions capirca/lib/aclgenerator.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,10 @@ def NormalizeIcmpTypes(self, icmp_types, protocols, af):
if not icmp_types:
return ['']
# only protocols icmp or icmpv6 can be used with icmp-types
if protocols != ['icmp'] and protocols != ['icmpv6']:
raise UnsupportedFilterError('%s %s' % (
'icmp-types specified for non-icmp protocols in term: ',
if protocols != ['icmp'] and protocols != ['icmp6'] and protocols != ['icmpv6']:
raise UnsupportedFilterError(
'icmp-types specified for non-icmp protocols %s in term: %s' % (
protocols,
self.term.name))
# make sure we have a numeric address family (4 or 6)
af = self.NormalizeAddressFamily(af)
Expand Down