Repository navigation
RDKB-64398: Fix for SNMP IPAddress set failure - #39
Open
sriraaman-c wants to merge 1 commit into
Open
sriraaman-c wants to merge 1 commit into
sriraaman-c wants to merge 1 commit into
Conversation
Reason for change: sizeof(ULONG) is 8 bytes in 64-bit system because of which the IP set is getting failed expecting 4 bytes as length. Risks: Low Priority: P1
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Regression tests do not cover the corrected IPv4 size behavior.
3 open findings
What changed in this PR
Fixes SNMP IPv4 SET handling on 64-bit systems by enforcing the required four-byte address size.
Changes:
- Adds a shared IPv4 size constant.
- Applies it to scalar/table validation and MIB value initialization.
| File | Description |
|---|---|
source/SnmpPlugin/ccsp_table_helper_access.c |
Validates table IPv4 values as four bytes. |
source/SnmpPlugin/ccsp_scalar_helper_access.c |
Validates scalar IPv4 values as four bytes. |
source/SnmpPlugin/ccsp_mib_utilities.c |
Initializes IPv4 MIB values with four-byte size. |
source/SnmpPlugin/ccsp_mib_definitions.h |
Defines the shared IPv4 size constant. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+1737
to
+1739
| else if( pMibValue->uType == ASN_IPADDRESS) | ||
| { | ||
| pMibValue->uSize = CCSP_MIB_IPV4_ADDRESS_SIZE; |
Comment on lines
+208
to
+210
| else if( nType == ASN_IPADDRESS) | ||
| { | ||
| ret = netsnmp_check_vb_size(pVb, CCSP_MIB_IPV4_ADDRESS_SIZE); |
Comment on lines
+216
to
+218
| else if( nType == ASN_IPADDRESS) | ||
| { | ||
| ret = netsnmp_check_vb_size(pVb, CCSP_MIB_IPV4_ADDRESS_SIZE); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Reason for change: sizeof(ULONG) is 8 bytes in 64-bit system because of
which the IP set is getting failed expecting 4 bytes as length.
Test Procedure: Flash image and check for SNMP set using IPv4 inputs
Risks: Low
Priority: P1