Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 3 Apr 1998 00:18:54 +0200
From:      Andreas Klemm <andreas@klemm.gtn.com>
To:        Gary Palmer <gpalmer@FreeBSD.ORG>, John Hay <jhay@mikom.csir.co.za>, Jacques Vidrine <nectar@nectar.com>, current@FreeBSD.ORG
Subject:   Re: could you please update ucd-snmp from 3.2 to 3.3.1 ?
Message-ID:  <19980403001854.37160@klemm.gtn.com>
In-Reply-To: <13296.891470797@gjp.erols.com>; from Gary Palmer on Wed, Apr 01, 1998 at 05:46:37PM -0500
References:  <19980401223236.52867@klemm.gtn.com> <13296.891470797@gjp.erols.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii

On Wed, Apr 01, 1998 at 05:46:37PM -0500, Gary Palmer wrote:
> aAndreas Klemm wrote in message ID

Thanks for your suggestions and patches. Unfortunately they didn't
apply cleanly. So I only merged some things together so that 
interfaces.c compiles.

Under -stable everything runs fine.

After applying the diffs for -current (interfaces.c) it compiles
and runs, but not stable.

It filled /var (/var/log/snmpd.log) with messages like:

1998-04-02 23:20:48 UCD-SNMP version 3.3.1
Opening port(s): 161 
klookup(3, 0xefbfbf70, 96): klread: Bad address
TCP_Count_Connections - inpcb: Bad address
klookup(0, 0xefbfbeac, 196): klread: Bad address
TCP_Count_Connections - tcpcb: Bad address
klookup(3, 0x29f08, 96): klread: Bad address
klookup(0, 0xefbfbb50, 196): klread: Bad address
klookup(3, 0x29f08, 96): klread: Bad address
klookup(0, 0xefbfbb50, 196): klread: Bad address
[...]

Maybe you can try to test it with your -current ...
See patch applied ...

	Andreas ///

-- 
Andreas Klemm   http://www.FreeBSD.ORG/~andreas
powered by ,,symmetric multiprocessor FreeBSD''

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=patch-aa

--- agent/mibgroup/interfaces.c.orig	Wed Nov  5 22:56:58 1997
+++ agent/mibgroup/interfaces.c	Thu Apr  2 23:05:33 1998
@@ -921,8 +921,8 @@
 #else
 
 #if defined(netbsd1) || defined(freebsd3)
-#define ia_next ia_list.tqe_next
-#define if_next if_list.tqe_next
+#define ia_next ia_link.tqe_next
+#define if_next if_link.tqe_next
 #endif
 
 int Interface_Scan_Next(Index, Name, Retifnet, Retin_ifaddr)
@@ -1068,17 +1068,37 @@
 u_char *EtherAddr;
 {
 	short i;
-#if !(defined(linux) || defined(netbsd1) || defined(bsdi2))
-	struct arpcom arpcom;
-#else /* is linux or netbsd1 */
+#if (defined(linux) || defined(netbsd1) || defined(bsdi2))
 	struct arpcom {
 	  char ac_enaddr[6];
 	} arpcom;
-#if defined(netbsd1) || defined(bsdi2)
+#if (defined(netbsd1) || defined(bsdi2))
         struct sockaddr_dl sadl;
         struct ifaddr ifaddr;
         u_long ifaddraddr;
 #endif
+#elif (defined(freebsd2)||defined(freebsd3))
+/* From net/if_arp.h
+/*  
+ * Structure shared between the ethernet driver modules and
+ * the address resolution code.  For example, each ec_softc or il_softc
+ * begins with this structure.
+ */
+struct  arpcom {
+  /*
+   * The ifnet struct _must_ be at the head of this structure.
+   */
+  struct  ifnet ac_if;    /* network-visible interface */
+  u_char  ac_enaddr[6];   /* ethernet hardware address */
+  int ac_multicnt;    /* length of ac_multiaddrs list */
+} arpcom;
+#else
+	struct arpcom arpcom;
+#endif
+#if defined(netbsd1) || defined(bsdi2)
+	struct sockaddr_dl sadl;
+	struct ifaddr ifaddr;
+	u_long ifaddraddr;
 #endif
 
         bzero(arpcom.ac_enaddr, sizeof(arpcom.ac_enaddr));

--oyUTqETQ0mS9luUI--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980403001854.37160>