Skip to content

'keylen' in IPsec is not always an integer #880

Description

@robindbe

Describe the bug
When doing a GET on e.g. /api/v2/vpn/ipsec/phase2s it will throw an error 500:

{
  "code": 500,
  "status": "internal server error",
  "response_id": "INTEGER_FIELD_WITH_NON_INTEGER_INTERNAL_VALUE",
  "message": "Cannot parse IntegerField `keylen` from internal because its internal value is not a numeric value. Consider changing this field to a StringField.",
  "data": []
}

I'm pretty sure this happens when one of the phase2's has the key length set to "auto" :

<encryption-algorithm-option>
	<name>aes256gcm</name>
	<keylen>auto</keylen>
</encryption-algorithm-option>

If I set these to 128 bits for example, the GET will work.

To Reproduce
Steps to reproduce the behavior:

  1. Configure a VPN with auto key length
  2. GET /api/v2/vpn/ipsec/phase2s

pfSense Version & Package Version:

  • pfSense Version: 25.11.1
  • Package Version: 2.7.6

Affected Endpoints:

  • URL: /api/v2/vpn/ipsec/phase2s
    I assume others that use 'keylen'

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementIssues or PRs that enhance existing features

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions