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, Jul 27, 4:04 AM
Unknown Object (File)
Sun, Jul 26, 3:42 PM
Unknown Object (File)
Wed, Jul 22, 12:39 PM
Unknown Object (File)
Tue, Jul 21, 3:24 AM
Unknown Object (File)
Mon, Jul 20, 7:28 AM
Unknown Object (File)
Sun, Jul 19, 6:35 PM
Unknown Object (File)
Jun 28 2026, 1:40 PM
Unknown Object (File)
Jun 22 2026, 11:32 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
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 40664
Build 37553: arc lint + arc unit