From: Anja B. <pra...@ia...> - 2002-06-21 12:43:11
|
I'm working with SuSE 7.3 linux. I've tested your patch, but it doesn't work for me. I still get the error message (when starting snmpd): Error opening specified endpoint "udp6:161" Regards Anja Bornkamp ----- Original Message ----- From: Katsuhisa ABE <abe...@cy...> To: Anja Bornkamp <pra...@ia...> Cc: Wes Hardaker <har...@us...>; SNMP-Mailinglist <Net...@li...> Sent: Friday, June 21, 2002 11:04 AM Subject: Re: snmp over ipv6 > Dear Anja, > > At Fri, 21 Jun 2002 09:08:58 +0200, > Anja Bornkamp wrote: > > > But when i pass "udp:161,udp6:161" to the demon and send an snmpwalk i get a > > Timeout. > > But by using port 161 for udp and speciefying an other port for udp6 (like > > udp6:1866) it works. > > Is it all right that "udp:161,udp6:161" don't work? > > I tested the following command on Linux (RedHat 7.1 + USAGI-stable-3.1(*1)) > > # snmpd -D -L udp:161,udp6:161 > > but failed with the following message. > > ------------------------------------------------------------------ > trace: netsnmp_sockaddr_in6(): snmpUDPIPv6Domain.c, 336 > netsnmp_sockaddr_in6: addr 0xbfffde40, peername "161" > trace: netsnmp_sockaddr_in6(): snmpUDPIPv6Domain.c, 369 > netsnmp_sockaddr_in6: totally numeric: 161 > trace: netsnmp_sockaddr_in6(): snmpUDPIPv6Domain.c, 517 > netsnmp_sockaddr_in6: return { AF_INET6, [::]:161 } > trace: snmp_udp6_fmtaddr(): snmpUDPIPv6Domain.c, 52 > snmp_udp6_fmtaddr: t = (nil), data = 0xbfffde40, len = 28 > trace: snmp_udp6_transport(): snmpUDPIPv6Domain.c, 197 > snmp_udp6: open local [::]:161 > trace: snmp_udp6_close(): snmpUDPIPv6Domain.c, 157 > snmp_udp6_close: close fd 9 > Error opening specified endpoint "udp6:161" > Server Exiting with code 1 > ------------------------------------------------------------------ > > I solve the above problem on USAGI-stable-3.1 by the following patch. > > Index: snmplib/snmpUDPIPv6Domain.c > =================================================================== > RCS file: /cvsroot/net-snmp/net-snmp/snmplib/snmpUDPIPv6Domain.c,v > retrieving revision 5.4 > diff -u -r5.4 snmpUDPIPv6Domain.c > --- snmplib/snmpUDPIPv6Domain.c 15 May 2002 12:37:37 -0000 5.4 > +++ snmplib/snmpUDPIPv6Domain.c 16 Jun 2002 13:18:21 -0000 > @@ -253,6 +253,16 @@ > * INADDR_ANY, but certainly includes a port number. > */ > > +#ifdef IPV6_V6ONLY > + /* Try to restrict PF_INET6 socket to IPv6 communications only. */ > + { > + int one=1; > + if (setsockopt(t->sock, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&one, sizeof(one)) != 0) { > + DEBUGMSGTL(("snmp_udp6", "couldn't set IPV6_V6ONLY to %d bytes: %s\n", one, strerror(errno))); > + } > + } > +#endif > + > rc = bind(t->sock, (struct sockaddr *) addr, > sizeof(struct sockaddr_in6)); > if (rc != 0) { > > > But I don't know that the above patch work on Linux 7.3 (RedHat 7.3?). > If it work, I will send it to http://www.net-snmp.org/patches/. > > (*1) > For further information about USAGI Project, please refer to > http://www.linux-ipv6.org/ > > Regards, > Katsuhisa ABE <abe...@cy...> or <abe...@cy...> > Cyber Solutions Inc. |