Menu

#2903 Excessive logging when IPv6 is disabled on Linux

linux
closed
None
5
2020-01-13
2018-11-21
Fif
No

When running net-snmp 5.8 on Fedora 29 (net-snmp-5.8-1.fc29), on a system where IPv6 has been disabled (ipv6.disable=1) the system log (syslog and/or journal) logs:
ipaddress_linux: could not open /proc/net/if_inet6: No such file or directory
several thousands of times a day (presumably whenever certain counters are queried) as these systems are monitored remotely via SNMP.
The attached patch disables the warning.

1 Attachments

Discussion

  • Bart Van Assche

    Bart Van Assche - 2018-11-22

    A different patch has been applied on the v5.8 and master branches, namely a patch that makes snmpd log the error message once instead of multiple times. Please retest.

     
  • Bart Van Assche

    Bart Van Assche - 2019-01-21
    • status: open --> closed
    • assigned_to: bart
     
  • franta

    franta - 2020-01-13

    IMO the patch only addresses the logging effect, not the cause.
    According to the snmpd man page, by default snmpd listen on all IPv4 interfaces. Also, it should be possible to specify IPv4 listening address via transport specifier (thus perhaps is no need for some -4 / -6 cmdline switches which are usually seen on other multi-protocol apps) - and in this case "/proc/net/if_inet6" should be never opened.
    Maybe NETSNMP_ACCESS_IPADDRESS_LOAD_IPV4_ONLY bit should be set in "load_flags" and isn't ?

     

Log in to post a comment.