PA: Add support for source port handling #238
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is a proposal to add support for term source port handling to Palo Alto platform, and any suggestions or comments to improve it would be very welcome.
Currently only destination port is supported, and the services that are created to PA are named after the first term that uses them in the Capirca policy files. This change allows using also source ports, and the resulting service is named by combining the source and destination service names from the services definition file plus protocol, instead of using the term name. The source port must also be defined in the services definition file. If the resulting service name is too long, the code falls back to forming a service name using port numbers, which should always fall within acceptable length.
This change would cause a change in all configurations after updating Capirca, since it changes the service names from the term name to using the actual service names from the definitions file.
Example resulting PA service names:
SOME_SERVICE_TO_WEB_SERVICES_TCP
SVC_ANY_TO_80_443_TCP