Skip to content

Commit

Permalink
[nes]: GMPLS changes ...
Browse files Browse the repository at this point in the history
  • Loading branch information
nes-repo committed Nov 20, 2015
1 parent e92ceef commit a4073c7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
5 changes: 1 addition & 4 deletions mpls/mplsTeStdMIB.c
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ mplsTunnelTable_mapper (
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->i32HoldingPrio);
break;
case MPLSTUNNELSESSIONATTRIBUTES:
snmp_set_var_typed_value (request->requestvb, ASN_OCTET_STR, (u_char*) table_entry->au8SessionAttributes, table_entry->u16SessionAttributes_len);
snmp_set_var_typed_value (request->requestvb, ASN_OCTET_STR, (u_char*) table_entry->au8SessionAttributes, sizeof (table_entry->au8SessionAttributes));
break;
case MPLSTUNNELLOCALPROTECTINUSE:
snmp_set_var_typed_integer (request->requestvb, ASN_INTEGER, table_entry->u8LocalProtectInUse);
Expand Down Expand Up @@ -1396,14 +1396,12 @@ mplsTunnelTable_mapper (
else if (pvOldDdata != table_entry)
{
((xOctetString_t*) pvOldDdata)->pData = pvOldDdata + sizeof (xOctetString_t);
((xOctetString_t*) pvOldDdata)->u16Len = table_entry->u16SessionAttributes_len;
memcpy (((xOctetString_t*) pvOldDdata)->pData, table_entry->au8SessionAttributes, sizeof (table_entry->au8SessionAttributes));
netsnmp_request_add_list_data (request, netsnmp_create_data_list (ROLLBACK_BUFFER, pvOldDdata, &xBuffer_free));
}

memset (table_entry->au8SessionAttributes, 0, sizeof (table_entry->au8SessionAttributes));
memcpy (table_entry->au8SessionAttributes, request->requestvb->val.string, request->requestvb->val_len);
table_entry->u16SessionAttributes_len = request->requestvb->val_len;
break;
case MPLSTUNNELLOCALPROTECTINUSE:
if (pvOldDdata == NULL && (pvOldDdata = xBuffer_cAlloc (sizeof (table_entry->u8LocalProtectInUse))) == NULL)
Expand Down Expand Up @@ -1595,7 +1593,6 @@ mplsTunnelTable_mapper (
break;
case MPLSTUNNELSESSIONATTRIBUTES:
memcpy (table_entry->au8SessionAttributes, ((xOctetString_t*) pvOldDdata)->pData, ((xOctetString_t*) pvOldDdata)->u16Len);
table_entry->u16SessionAttributes_len = ((xOctetString_t*) pvOldDdata)->u16Len;
break;
case MPLSTUNNELLOCALPROTECTINUSE:
memcpy (&table_entry->u8LocalProtectInUse, pvOldDdata, sizeof (table_entry->u8LocalProtectInUse));
Expand Down
1 change: 0 additions & 1 deletion mpls/mplsTeStdMIB.h
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,6 @@ typedef struct mplsTunnelEntry_t
int32_t i32SetupPrio;
int32_t i32HoldingPrio;
uint8_t au8SessionAttributes[1];
size_t u16SessionAttributes_len; /* # of uint8_t elements */
uint8_t u8LocalProtectInUse;
uint32_t u32PrimaryInstance;
uint32_t u32InstancePriority;
Expand Down

0 comments on commit a4073c7

Please sign in to comment.