Skip to content
  • Eric Dumazet's avatar
    icmp: Account for ICMP out errors · 1f8438a8
    Eric Dumazet authored
    
    
    When ip_append() fails because of socket limit or memory shortage,
    increment ICMP_MIB_OUTERRORS counter, so that "netstat -s" can report
    these errors.
    
    LANG=C netstat -s | grep "ICMP messages failed"
        0 ICMP messages failed
    
    For IPV6, implement ICMP6_MIB_OUTERRORS counter as well.
    
    # grep Icmp6OutErrors /proc/net/dev_snmp6/*
    /proc/net/dev_snmp6/eth0:Icmp6OutErrors                   	0
    /proc/net/dev_snmp6/lo:Icmp6OutErrors                   	0
    
    Signed-off-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    1f8438a8