aboutsummaryrefslogtreecommitdiffstats
path: root/package/net-snmp/patches
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2005-07-01 15:35:22 +0000
committerFelix Fietkau <nbd@openwrt.org>2005-07-01 15:35:22 +0000
commit92868ea8954019b6700e03e2c9168b16c8c3837c (patch)
tree10d96bdfb7081f57417266bd8e98a6d731774883 /package/net-snmp/patches
parent2c91d8e5b1294cf9f49e3bee3080c0cfbc4d0dff (diff)
downloadupstream-92868ea8954019b6700e03e2c9168b16c8c3837c.tar.gz
upstream-92868ea8954019b6700e03e2c9168b16c8c3837c.tar.bz2
upstream-92868ea8954019b6700e03e2c9168b16c8c3837c.zip
Add a patch from Alexander Holler to fix segfault with ipsec interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@1308 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/net-snmp/patches')
-rw-r--r--package/net-snmp/patches/901-ipsec-interfaces.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/package/net-snmp/patches/901-ipsec-interfaces.patch b/package/net-snmp/patches/901-ipsec-interfaces.patch
new file mode 100644
index 0000000000..886f37af75
--- /dev/null
+++ b/package/net-snmp/patches/901-ipsec-interfaces.patch
@@ -0,0 +1,44 @@
+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. ;)
+
+
+--- net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c.orig 2005-06-14 00:41:16.000000000 +0200
++++ net-snmp-5.1.2/agent/mibgroup/mibII/interfaces.c 2005-06-14 03:21:35.000000000 +0200
+@@ -1438,8 +1438,10 @@
+
+ if (ioctl(fd, 0x8947, &ifr) >= 0) {
+ new_ioctl_nums = 1;
++/*
+ } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) {
+ new_ioctl_nums = 0;
++*/
+ } else {
+ DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name));
+ return retspeed;
+@@ -1449,7 +1451,8 @@
+ for (mii_reg = 0; mii_reg < 8; mii_reg++){
+ data[0] = phy_id;
+ data[1] = mii_reg;
+- if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){
++/* if(ioctl(fd, new_ioctl_nums ? 0x8948 : SIOCDEVPRIVATE+1, &ifr) <0){ */
++ if(ioctl(fd, 0x8948, &ifr) <0){
+ DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIREG on %s failed\n", ifr.ifr_name));
+ }
+ mii_val[mii_reg] = data[3];