Skip to content

Commit

Permalink
Fix use of pf_snmp_management_address_t
Browse files Browse the repository at this point in the history
Fix three instances where pf_snm_management_address_t was used
incorrectly.

Change-Id: I616c85135662e2c2b144d6ef261600e7a2f73aa1
  • Loading branch information
hefloryd committed Feb 1, 2021
1 parent c9aa766 commit dc00a15
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ports/linux/mib/lldpConfigManAddrTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ netsnmp_variable_list * lldpConfigManAddrTable_get_first_data_point (
snmp_set_var_typed_integer (idx, ASN_INTEGER, address.subtype);
idx = idx->next_variable;

snmp_set_var_value (idx, &address.value[0], address.len);
snmp_set_var_value (idx, &address.value[1], address.value[0]);
idx = idx->next_variable;

/* Set my_data_context to a value that is not NULL */
Expand Down
4 changes: 2 additions & 2 deletions src/ports/linux/mib/lldpLocManAddrTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ netsnmp_variable_list * lldpLocManAddrTable_get_first_data_point (
snmp_set_var_typed_integer (idx, ASN_INTEGER, address.subtype);
idx = idx->next_variable;

snmp_set_var_value (idx, &address.value[0], address.len);
snmp_set_var_value (idx, &address.value[1], address.value[0]);
idx = idx->next_variable;

/* Set my_data_context to a value that is not NULL */
Expand Down Expand Up @@ -153,7 +153,7 @@ int lldpLocManAddrTable_handler (
snmp_set_var_typed_integer (
request->requestvb,
ASN_INTEGER,
address.len + 1);
address.len);
break;
case COLUMN_LLDPLOCMANADDRIFSUBTYPE:
if (my_data_context == NULL)
Expand Down
2 changes: 1 addition & 1 deletion src/ports/linux/mib/lldpRemManAddrTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ netsnmp_variable_list * lldpRemManAddrTable_get_next_data_point (
snmp_set_var_typed_integer (idx, ASN_INTEGER, address.subtype);
idx = idx->next_variable;

snmp_set_var_value (idx, &address.value[0], address.len);
snmp_set_var_value (idx, &address.value[1], address.value[0]);
idx = idx->next_variable;

*my_data_context = (void *)(uintptr_t)port;
Expand Down

0 comments on commit dc00a15

Please sign in to comment.