dumpon: warn if the configured netdump link is down
authorMitchell Horne <mhorne@FreeBSD.org>
Sat, 14 May 2022 13:25:21 +0000 (10:25 -0300)
committerMitchell Horne <mhorne@FreeBSD.org>
Sat, 14 May 2022 13:27:54 +0000 (10:27 -0300)
commit6543fa5a5c47cfbea92586f0994431fc8ba09f6a
tree86bd4afcc8b379c2cbcb340232c94401e35b2e1a
parent38a36057ae56c8023878f3c3c2185bafc2896964
dumpon: warn if the configured netdump link is down

Previously we expected the DIOCSKERNELDUMP ioctl to return ENXIO if the
interface was down, but it does not actually do this. Grab the link
status using getifaddrs(3) instead, and downgrade this case from an
error to a warning; the user might bring the link back up at a later
time.

Reviewed by: cem
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D35196
sbin/dumpon/dumpon.c