summaryrefslogtreecommitdiff
path: root/cleopatre/application/spidnetsnmp/agent/mibgroup
diff options
context:
space:
mode:
authorJun Xiang2012-06-04 19:47:56 +0800
committerJun Xiang2012-06-05 19:04:12 +0800
commit9789f23ad3c1924f8f3a35843d876473bc561781 (patch)
tree41a46bde08df9abe16efb3a07ef6279642c2bcdc /cleopatre/application/spidnetsnmp/agent/mibgroup
parentaa67b3ca9d310b50963be313fc58ff40ea840f9b (diff)
cleo/{app/snmp,buildroot/package}[eoc]: correct eocVLANPortTable, refs #3141
- only defined VLANs inside eocVLANTable can be set inside eocVLANTPortTable - modified Corresponding busybox about eocVLANPortTable VlanID must be in eocVLANTable
Diffstat (limited to 'cleopatre/application/spidnetsnmp/agent/mibgroup')
-rw-r--r--cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable_data_set.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable_data_set.c b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable_data_set.c
index b6d7468fe2..3062adc76e 100644
--- a/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable_data_set.c
+++ b/cleopatre/application/spidnetsnmp/agent/mibgroup/mstar-eoc-mib/eocVLANGroup/eocVLANPortTable/eocVLANPortTable_data_set.c
@@ -629,6 +629,9 @@ eocVLANPortPVID_undo_setup( eocVLANPortTable_rowreq_ctx *rowreq_ctx)
int
eocVLANPortPVID_set( eocVLANPortTable_rowreq_ctx *rowreq_ctx, long eocVLANPortPVID_val )
{
+ /* declarations for calls to libspid */
+ char index[8];
+ libspid_eoc_vlan_table_entry_t entry;
DEBUGMSGTL(("verbose:eocVLANPortTable:eocVLANPortPVID_set","called\n"));
@@ -641,6 +644,16 @@ eocVLANPortPVID_set( eocVLANPortTable_rowreq_ctx *rowreq_ctx, long eocVLANPortPV
*/
rowreq_ctx->data.eocVLANPortPVID = eocVLANPortPVID_val;
+ /* the vlanID must be exsit in the vlan table*/
+ if (0 != eocVLANPortPVID_val)
+ {
+ sprintf (index, "%ld", eocVLANPortPVID_val);
+ if (LIBSPID_SUCCESS != libspid_eoc_vlan_table_get (index, &entry))
+ {
+ snmp_log (LOG_ERR, "libspid_eoc_vlan_table_get failed.\n");
+ return MFD_ERROR;
+ }
+ }
return MFD_SUCCESS;
} /* eocVLANPortPVID_set */