From: SourceForge.net <no...@so...> - 2006-05-03 11:27:31
|
Patches item #1481012, was opened at 2006-05-03 13:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1481012&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: None Status: Open Resolution: None Priority: 5 Submitted By: Johannes Schmidt-Fischer (johannessf) Assigned to: Nobody/Anonymous (nobody) Summary: HP-UX 11.0/11i: ipAdEntBcastAddr wrong Initial Comment: Probably someone already mentioned that for both HP-UX 11.0 and 11i the value for ipAdEntBcastAddr.<ip-address> in ip.ipAddrTable.ipAddrEntry is wrong. This is the case for all net-snmp versions and for ucd-snmp versions too (from the time where HP-UX 11 support has been added). Due to the IF-MIB documentation the only allowed values are 0 and 1 which should be the lowest bit of the broadcast address for the resp. ip address. For addresses except the loopback net that value should be 1, for most loopback nets the value is 0 since there normally is no broadcast address set. For both HP-UX 11.0 and 11i the values net-snmp returns are totally different (for the loopback net it is 2^31-1 or 2147483647, for other networks it depends upon the network address and is normally way below zero). Reason is (I presume) my fault since I implemented most of the HP-UX 11 network stuff years ago. It seems as if I never checked that value... But fortunately the patch is simple: there is one line to be changed in agent/mibgroup/mibII/ipAddr.c. Details as of net-snmp-5.3.0.1 (for other versions the line numbers may differ): *** 319,325 **** #endif case IPADBCASTADDR: #ifdef hpux11 ! long_return = lowin_ifaddr.BcastAddr; #elif defined(linux) || defined(sunV3) long_return = ntohl(((struct sockaddr_in *) &lowin_ifnet.ifu_broadaddr)-> --- 319,325 ---- #endif case IPADBCASTADDR: #ifdef hpux11 ! long_return = lowin_ifaddr.BcastAddr & 1; #elif defined(linux) || defined(sunV3) long_return = ntohl(((struct sockaddr_in *) &lowin_ifnet.ifu_broadaddr)-> That is: in line 322 the mask "& 1" is to added. After applying this patch the value for ipAdEntBcastAddr is always 1 since HP-UX 11.0/11i seems to have a broadcast address for the loopback net (in fact that address is 127.255.255.255). I'd be glad if someone could add this patch to the CVS version for the next net-snmp version. Thanks! ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=312694&aid=1481012&group_id=12694 |