source:
freewrt/package/net-snmp/patches/901-ipsec-interfaces.patch@
428f140
| Last change on this file since 428f140 was 475ad56, checked in by , 20 years ago | |
|---|---|
|
|
| File size: 1.5 KB | |
-
net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c
Date: Tue, 14 Jun 2005 00:39:54 +0200 From: Alexander Holler <aholler@ahsoftware.de> To: nthill@free.fr Subject: Patch for libsnmp (openwrt) to work with ipsec-if Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello, I've a small patch for net-snmp (5.1.2) which is needed to work with ipsec-interfaces. Otherwise snmpd will segfault which means snmp is not really usable. The patch is from me, but the source for the fault is from: http://lists.openswan.org/pipermail/users/2004-August/001773.html It works, because this email is going out over ipsec using a snmp-monitored wrt54g. ;)
old new 1438 1438 1439 1439 if (ioctl(fd, 0x8947, &ifr) >= 0) { 1440 1440 new_ioctl_nums = 1; 1441 /* 1441 1442 } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) { 1442 1443 new_ioctl_nums = 0; 1444 */ 1443 1445 } else { 1444 1446 DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name)); 1445 1447 return retspeed; … … 1449 1451 for (mii_reg = 0; mii_reg < 8; mii_reg++){ 1450 1452 data[0] = phy_id; 1451 1453 data[1] = mii_reg; 1452 if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ 1454 /* if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ */ 1455 if(ioctl(fd, 0x8948, &ifr) <0){ 1453 1456 DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIREG on %s failed\n", ifr.ifr_name)); 1454 1457 } 1455 1458 mii_val[mii_reg] = data[3];
Note:
See TracBrowser
for help on using the repository browser.
