Skip to content

RDKB-64398: Fix for SNMP IPAddress set failure - #39

Open
sriraaman-c wants to merge 1 commit into
developfrom
feature/RDKB-64398
Open

sriraaman-c wants to merge 1 commit into
developfrom
feature/RDKB-64398

Conversation

@sriraaman-c

@sriraaman-c sriraaman-c commented Oct 13, 2026 •

Copy link
Copy Markdown

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

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
Copilot AI balanced review requested due to automatic review settings October 13, 2026 11:18
@sriraaman-c
sriraaman-c requested review from a team as code owners October 13, 2026 11:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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);
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.

2 participants