Skip to content

Fix ICMP type and code types in application object - #627

Open
ben-astsec wants to merge 1 commit into
PaloAltoNetworks:developfrom
ben-astsec:icmp-type-ranges
Open

Fix ICMP type and code types in application object#627
ben-astsec wants to merge 1 commit into
PaloAltoNetworks:developfrom
ben-astsec:icmp-type-ranges

Conversation

@ben-astsec

@ben-astsec ben-astsec commented Sep 8, 2026

Copy link
Copy Markdown

Description

This PR makes it so ICMP type/code inside of an application object supports ranges.

Motivation and Context

I was trying to parse a certain configuration and failed because the ICMP type value was a range in there, and I got an error:

ValueError: invalid literal for int() with base 10: '13-14'

This was caused because ApplicationObject.default_icmp_type and ApplicationObject.default_icmp_code had a varty pe="int", even though the configuration can contain ranges.

How Has This Been Tested?

Added a test that makes sure that application objects accept icmp codes/types that are ranges.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes if appropriate.
  • All new and existing tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant