From: SourceForge.net <no...@so...> - 2011-10-23 11:03:59
|
Bugs item #3402322, was opened at 2011-09-01 13:35 Message generated for change (Comment added) made by bvassche You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3402322&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: linux Status: Open Resolution: None Priority: 5 Private: No Submitted By: hubert (c-hubert) Assigned to: Nobody/Anonymous (nobody) Summary: ipAddressIfIndex not reporting aliases on 32b Initial Comment: Hi, On the net-snmp 5.6.1 and later (tried 5.6.1.1, 5.7 and 5.7.1.rc1), the ipAddressIfIndex is reporting broadcast address but is not reporting aliases only on 32b server. How to reproduce : Configure/make used for all of tested versions ./configure --prefix=/opt/applis/net-snmp-<version>-1 --enable-static --enable-shared --with-sys-location=Unknown --with-logfile=/var/log/snmpd.log --with-persistent-directory=/var/net-snmp --sysconfdir=/opt/applis/net-snmp/etc --with-mib-modules="host agentx smux mibII/ipv6 ip-mib/ipv6InterfaceTable mibII/mta_sendmail ucd-snmp/diskio mibII" --with-libwrap=/usr/lib --with-openssl=no --enable-ucd-snmp-compatibility --with-default-snmp-version=3 --with-sys-contact=root@localhost --enable-ipv6 --with-transports=UDPIPv6 && make && make install Then #cd /opt/applis #rm net-snmp #ln -s net-snmp-5.5-1 net-snmp #/etc/init.d/snmpd restart # snmpwalk -v 1 -c UEzrls78l 192.168.26.1 .1.3.6.1.2.1.4.34.1.3.1 IP-MIB::ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.1" = INTEGER: 2 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.2" = INTEGER: 2 This is the expected behavior. Now with more recent versions # rm net-snmp # ln -s net-snmp-5.6.1-1 net-snmp # /etc/init.d/snmpd restart # snmpwalk -v 1 -c UEzrls78l 192.168.26.1 .1.3.6.1.2.1.4.34.1.3.1 IP-MIB::ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.1" = INTEGER: 2 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.127" = INTEGER: 2 #rm net-snmp # ln -s net-snmp-5.7.1.rc1-1/ net-snmp # /etc/init.d/snmpd restart # snmpwalk -v 1 -c UEzrls78l 192.168.26.1 .1.3.6.1.2.1.4.34.1.3.1 IP-MIB::ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.1" = INTEGER: 2 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.127" = INTEGER: 2 # uname -a Linux test1.agarik.com 2.6.18-194.3.1.el5 #1 SMP Thu May 13 13:09:10 EDT 2010 i686 i686 i386 GNU/Linux # cat /etc/redhat-release CentOS release 5.5 (Final) snmpd.conf only contains : rocommunity UEzrls78l Using the same configure line on an 64b server (tried Centos 5.0 and 5.6) doesn't show this behavior and always return the aliases but not the broadcasts ---------------------------------------------------------------------- >Comment By: (bvassche) Date: 2011-10-23 13:03 Message: There is an obvious bug in agent/mibgroup/ip-mib/data_access/ipaddress_ioctl.c: the code for checking whether an IP address is a secondary address is incorrect for Linux. This says it all: { /* * I think that Linux and Solaris both use ':' in the * interface name for aliases. When a new arch is added * that uses some other indicator, a new function, maybe * netsnmp_access_ipaddress_entry_name_alias_check(), will * need to be written. */ char *ptr = strchr(ifrp->ifr_name, ':'); if (NULL != ptr) { entry->flags |= NETSNMP_ACCESS_IPADDRESS_ISALIAS; *ptr = 0; } } ---------------------------------------------------------------------- Comment By: hubert (c-hubert) Date: 2011-10-21 17:25 Message: 5.7.1 still has this behavior : # snmpwalk -v 1 -c UEzrls78l 192.168.26.1 .1.3.6.1.2.1.4.34.1.3.1 IP-MIB::ipAddressIfIndex.ipv4."127.0.0.1" = INTEGER: 1 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.1" = INTEGER: 2 IP-MIB::ipAddressIfIndex.ipv4."192.168.26.127" = INTEGER: 2 # snmpd -v NET-SNMP version: 5.7.1 Web: http://www.net-snmp.org/ Email: net...@li... The secondary is present on other OIDs # snmpwalk -v 1 -c UEzrls78l 192.168.26.1 .1.3.6.1.2.1 | grep 192.168.26.2 IP-MIB::ipAdEntAddr.192.168.26.2 = IpAddress: 192.168.26.2 IP-MIB::ipAdEntIfIndex.192.168.26.2 = INTEGER: 2 IP-MIB::ipAdEntNetMask.192.168.26.2 = IpAddress: 255.255.255.128 IP-MIB::ipAdEntBcastAddr.192.168.26.2 = INTEGER: 1 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=3402322&group_id=12694 |