update wpa_supplicant to latest development release (v0.4.5),
[openwrt.git] / package / net-snmp / patches / 901-ipsec-interfaces.patch
1 Date: Tue, 14 Jun 2005 00:39:54 +0200
2 From: Alexander Holler <aholler@ahsoftware.de>
3 To: nthill@free.fr
4 Subject: Patch for libsnmp (openwrt) to work with ipsec-if
5 Content-Type: text/plain; charset=ISO-8859-1
6 Content-Transfer-Encoding: 7bit
7
8 Hello,
9
10 I've a small patch for net-snmp (5.1.2) which is needed to work with
11 ipsec-interfaces. Otherwise snmpd will segfault which means snmp is not
12 really usable.
13
14 The patch is from me, but the source for the fault is from:
15
16 http://lists.openswan.org/pipermail/users/2004-August/001773.html
17
18 It works, because this email is going out over ipsec using a
19 snmp-monitored wrt54g. ;)
20
21
22 --- net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c.orig 2005-06-14 00:41:16.000000000 +0200
23 +++ net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c 2005-06-14 03:21:35.000000000 +0200
24 @@ -1438,8 +1438,10 @@
25
26 if (ioctl(fd, 0x8947, &ifr) >= 0) {
27 new_ioctl_nums = 1;
28 +/*
29 } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) {
30 new_ioctl_nums = 0;
31 +*/
32 } else {
33 DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name));
34 return retspeed;
35 @@ -1449,7 +1451,8 @@
36 for (mii_reg = 0; mii_reg < 8; mii_reg++){
37 data[0] = phy_id;
38 data[1] = mii_reg;
39 - if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){
40 +/* if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ */
41 + if(ioctl(fd, 0x8948, &ifr) <0){
42 DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIREG on %s failed\n", ifr.ifr_name));
43 }
44 mii_val[mii_reg] = data[3];
This page took 0.052032 seconds and 5 git commands to generate.