]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Improve ARP logging.
authorBjoern A. Zeeb <bz@FreeBSD.org>
Sat, 9 Mar 2019 01:12:59 +0000 (01:12 +0000)
committerBjoern A. Zeeb <bz@FreeBSD.org>
Sat, 9 Mar 2019 01:12:59 +0000 (01:12 +0000)
commitb25d74e06c0c15679da0de6ec4a0fac32e9e917f
tree15ab85065c3d3043b5d0c9b4ca8ce7d142ca9cb9
parent244e58a2dfa22df1dadfe5e61e4905633b0c54cb
Improve ARP logging.

r344504 added an extra ARP_LOG() call in case of an if_output() failure.
It turns out IPv4 can be noisy. In order to not spam the console by default:
(a) add a counter for these events so people can keep better track of how
    often it happens, and
(b) add a sysctl to select the default ARP_LOG log level and set it to
    INFO avoiding the one (the new) DEBUG level by default.

Claim a spare (1st one after 10 years since the stats were added) in order
to not break netstat from FreeBSD 12->13 updates in the future.

Reviewed by: karels
Differential Revision: https://reviews.freebsd.org/D19490
sys/net/if_arp.h
sys/netinet/if_ether.c
usr.bin/netstat/inet.c