This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: snmp dot3 agent fix


On Donnerstag, 9. Oktober 2003 18:45, Roland Caßebohm wrote:
> 2003-10-09  Roland Cassebohm  <roland.cassebohm@visionsystems.de>
>
>         * src/mibgroup/mibII/dot3.c: Make sure the agent responses with
>         a null object oid, if there is no specific oid set by the driver
>         for the ethernet chipset.
>
>
> Roland

Sorry I did forget the patch, here it is.
And sorry Andrew to send the patch direct to you, I'm a little bit 
confused :-/ .

Roland
Index: packages/net/snmp/agent/current/ChangeLog
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/net/snmp/agent/current/ChangeLog,v
retrieving revision 1.1.1.1
diff -u -5 -p -r1.1.1.1 ChangeLog
--- packages/net/snmp/agent/current/ChangeLog	29 Sep 2003 15:15:28 -0000	1.1.1.1
+++ packages/net/snmp/agent/current/ChangeLog	9 Oct 2003 16:44:04 -0000
@@ -1,5 +1,11 @@
+2003-10-09  Roland Cassebohm  <roland.cassebohm@visionsystems.de>
+  
+	* src/mibgroup/mibII/dot3.c: Make sure the agent responses with
+        a null object oid, if there is no specific oid set by the driver
+        for the ethernet chipset.
+ 
 2003-06-17  Michael Checky  <Michael_Checky@ThermoKing.com>
   
         * src/mibgroup/mibII/helpers.c: Changed the definition of
 	ifnet_addrs to an extern declaration because of multiple symbol
 	definition errors when using a compiler that does not merge them.
Index: packages/net/snmp/agent/current/src/mibgroup/mibII/dot3.c
===================================================================
RCS file: /home/cassebohm/net/USERS/CVSROOT/VSprojects/ecos/packages/net/snmp/agent/current/src/mibgroup/mibII/dot3.c,v
retrieving revision 1.1.1.1
diff -u -5 -p -r1.1.1.1 dot3.c
--- packages/net/snmp/agent/current/src/mibgroup/mibII/dot3.c	29 Sep 2003 15:15:29 -0000	1.1.1.1
+++ packages/net/snmp/agent/current/src/mibgroup/mibII/dot3.c	9 Oct 2003 16:30:18 -0000
@@ -340,12 +340,20 @@ var_dot3StatsTable(struct variable *vp,
         while ( i < sizeof(etherobjid) ) {
             if ( 0 == (etherobjid[i] = x.snmp_chipset[i]) )
                 break;
             i++;
         }
-        *var_len = i;
-        return (unsigned char *) etherobjid;
+        if (i)
+        {
+            *var_len = i;
+            return (unsigned char *) etherobjid;
+        }
+        else
+        {
+            *var_len = sizeof(nullobjid);
+            return (unsigned char *) nullobjid;
+        }
         
     case DOT3STATSDUPLEXSTATUS:
         long_ret = x.duplex;
         if ( 1 > long_ret || 3 < long_ret )
             long_ret = 1;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]