Page MenuHomeFreeBSD

dumpon: Fix unconfiguring netdump with "off" and "/dev/null".
ClosedPublic

Authored by bdrewery on Jul 24 2021, 9:25 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jan 2, 2:56 PM
Unknown Object (File)
Dec 24 2022, 10:37 AM
Unknown Object (File)
Dec 14 2022, 3:05 AM
Unknown Object (File)
Dec 12 2022, 2:03 AM
Unknown Object (File)
Nov 28 2022, 10:50 PM
Subscribers

Details

Summary

Netdump has its own configuration tracking such that
ioctl(/dev/null, DIOCSKERNELDUMP) does a dumper_remove() but does not
notify netdump about the removal. Simply sending the same ioctl to
/dev/netdump handles the situation.

Sponsored by: Dell EMC

Test Plan

Before:

# obj/dumpon -v -k pubkey -s 10.10.0.5 -c 10.10.0.7 -g 10.10.0.1 igb0
kernel dumps on priority: device
0: igb0
server address: 10.10.0.5
client address: 10.10.0.7
gateway address: 10.10.0.1

# obj/dumpon -v off
kernel dumps on priority: device
0: /dev/null
server address: 10.10.0.5
client address: 10.10.0.7
gateway address: 10.10.0.1

# With -r and netdump params to trigger the dumpon ioctl to /dev/netdump
# obj/dumpon -r -v -k pubkey -s 10.10.0.5 -c 10.10.0.7 -g 10.10.0.1 igb0
kernel dumps on priority: device
0: /dev/null

Fixed:

# obj/dumpon -v -k pubkey -s 10.10.0.5 -c 10.10.0.7 -g 10.10.0.1 igb0
kernel dumps on priority: device
0: igb0
server address: 10.10.0.5
client address: 10.10.0.7
gateway address: 10.10.0.1
# obj/dumpon -v ada3p3
kernel dumps on priority: device
0: igb0
1: ada3p3
server address: 10.10.0.5
client address: 10.10.0.7
gateway address: 10.10.0.1
# obj/dumpon -v ada3p3
kernel dumps on priority: device
0: igb0
1: ada3p3
2: ada3p3
server address: 10.10.0.5
client address: 10.10.0.7
gateway address: 10.10.0.1
# obj/dumpon -v -k pubkey -s 11.10.0.5 -c 11.10.0.7 -g 11.10.0.1 igb0
kernel dumps on priority: device
0: igb0
1: ada3p3
2: ada3p3
3: igb0
4: igb0
server address: 11.10.0.5
client address: 11.10.0.7
gateway address: 11.10.0.1
# obj/dumpon -lv
kernel dumps on priority: device
0: igb0
1: ada3p3
2: ada3p3
3: igb0
4: igb0
server address: 11.10.0.5
client address: 11.10.0.7
gateway address: 11.10.0.1
# [-l only showing the last configuration is a separate issue]

# obj/dumpon -v off
kernel dumps on priority: device
0: /dev/null

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable