SNMPD : no ifindex found for interface

Discussion in 'Server Operation' started by LIJE, May 16, 2019.

Tags:
  1. LIJE

    LIJE Member

    Hi,
    I recently added some IPFO even though I'm not sure it comes from there, my logs are full of this:
    Code:
    May 16 10:40:41 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:41 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:41 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:41 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:41 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:41 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:41 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:42 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:42 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:42 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:42 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:42 ns123 snmpd[1153]: ioctl 35123 returned -1
    May 16 10:40:42 ns123 snmpd[1153]: no ifindex found for interface
    May 16 10:40:42 ns123 snmpd[1153]: ioctl 35123 returned -1
    My interfaces look like this:
    Code:
    cat /etc/systemd/network/50-default.network
    
    [...]
    
    [Address]
    Address=xx.xx.xx.xx/32
    Label=xx
    
    [Address]
    Address=xx.xx.xx.xx/32
    Label=xx2
    
    [Address]
    Address=xx.xx.xx.xx/32
    Label=xx3
    
    [Address]
    Address=xx.xx.xx.xx/32
    Label=xx4
    
    I've looked on internet but couldn't find anything related to this issue.
    I found the .c file there and checked the function: https://github.com/RMerl/asuswrt-me...mibgroup/ip-mib/data_access/ipaddress_ioctl.c
    Got also this:
    Code:
    oid
    netsnmp_access_interface_ioctl_ifindex_get(int fd, const char *name)
    {
    #ifndef SIOCGIFINDEX
        return 0;
    #else
        struct ifreq    ifrq;
        int rc = 0;
    
        DEBUGMSGTL(("access:interface:ioctl", "ifindex_get\n"));
    
        rc = _ioctl_get(fd, SIOCGIFINDEX, &ifrq, name);
        if (rc < 0) {
            DEBUGMSGTL(("access:interface:ioctl",
                       "ifindex_get error on inerface '%s'\n", name));
            return 0;
        }
    
        return ifrq.ifr_ifindex;
    #endif /* SIOCGIFINDEX */
    }
    Can you help ?
     

Share This Page