Skip to content
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
6 changes: 6 additions & 0 deletions capirca/lib/paloaltofw.py
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,12 @@ def _TranslatePolicy(self, pol, exp_info):
term.destination_address = nacaddr.RemoveAddressFromList(
term.destination_address, i)

# note: CollapseAddrList must be called after above exclusions.
if len(term.source_address) > 1:
term.source_address = nacaddr.CollapseAddrList(term.source_address)
if len(term.destination_address) > 1:
term.destination_address = nacaddr.CollapseAddrList(term.destination_address)

# Count the number of occurencies of a particular version of the
# address family, i.e. v4/v6 in source and destination IP addresses.
afc = {
Expand Down