Skip to content

fix(security): correct IKE SPI type and naming in IkeConnectionState - #492

Open
saiashok0981 wants to merge 1 commit into
opiproject:mainfrom
saiashok0981:fix/ike-spi-type-and-naming
Open

fix(security): correct IKE SPI type and naming in IkeConnectionState#492
saiashok0981 wants to merge 1 commit into
opiproject:mainfrom
saiashok0981:fix/ike-spi-type-and-naming

Conversation

@saiashok0981

Copy link
Copy Markdown

PR 2: GitHub Pull Request Description

## Description
This PR corrects the data types and naming convention for IKE SPI fields inside `IkeConnectionState` in the IPsec security API:
1. **Type Upgrade (`int32` -> `uint64`)**: Upgrades IKE SPIs to `uint64` to align with RFC 7296, which specifies that IKE SPIs must be 8-octet (64-bit) identifiers.
2. **Field Rename (`responder_ike_sa` -> `responder_ike_spi`)**: Standardizes naming between the initiator and responder SPI fields for consistency.

## Changes
- **Proto Source**: Modified `security/opi_ipsec.proto` to apply type and name changes.
- **Generated Bindings**: Updated generated Go and Python bindings (`opi_ipsec.pb.go` and `opi_ipsec_pb2.py`) in both the `v1alpha1` and `v1` folders, ensuring the descriptor matches the corrected proto contract.

## Type of Change
- [x] Bug fix (aligns with IKEv2 RFC specification and fixes field naming inconsistency)
- [ ] New feature (non-breaking change which adds functionality)
- [x] Breaking change (changes field names and data types in the public proto API)

## Verification
- Verified Python imports and descriptor attributes:
  ```bash
  python -c "import opi_ipsec_pb2; print(opi_ipsec_pb2.IkeConnectionState.DESCRIPTOR.fields_by_name['initiator_ike_spi'].type)"
  # Output: 4 (TYPE_UINT64)

Signed-off-by:saiashok103@gmail.com

IKE SPIs in IKEv2 are 8 octets (64-bit unsigned integers) per RFC 7296. This commit updates the initiator_ike_spi and responder_ike_sa fields in IkeConnectionState from int32 to uint64, and renames responder_ike_sa to responder_ike_spi for naming consistency.

Signed-off-by:saiashok103@gmail.com
@saiashok0981
saiashok0981 requested a review from a team as a code owner June 25, 2026 19:08
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