source: freewrt/package/net-snmp/patches/901-ipsec-interfaces.patch@ 428f140

freewrt_1_0 freewrt_2_0
Last change on this file since 428f140 was 475ad56, checked in by Waldemar Brodkorb <wbx@…>, 20 years ago

add OpenWrt trunk revision 3830.

git-svn-id: svn://www.freewrt.org/trunk/freewrt@1 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
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  
    14381438
    14391439        if (ioctl(fd, 0x8947, &ifr) >= 0) {
    14401440                new_ioctl_nums = 1;
     1441/*
    14411442        } else if (ioctl(fd, SIOCDEVPRIVATE, &ifr) >= 0) {
    14421443                new_ioctl_nums = 0;
     1444*/
    14431445        } else {
    14441446                DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIPHY on %s failed\n", ifr.ifr_name));
    14451447                return retspeed;
     
    14491451        for (mii_reg = 0; mii_reg < 8; mii_reg++){
    14501452                data[0] = phy_id;
    14511453                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){
    14531456                        DEBUGMSGTL(("mibII/interfaces", "SIOCGMIIREG on %s failed\n", ifr.ifr_name));
    14541457                }
    14551458                mii_val[mii_reg] = data[3];             
Note: See TracBrowser for help on using the repository browser.