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)
Sat, Nov 16, 9:57 AM
Unknown Object (File)
Sat, Nov 16, 8:49 AM
Unknown Object (File)
Sat, Nov 16, 6:33 AM
Unknown Object (File)
Sat, Nov 2, 2:09 AM
Unknown Object (File)
Oct 18 2024, 2:59 PM
Unknown Object (File)
Sep 22 2024, 3:45 PM
Unknown Object (File)
Sep 21 2024, 6:18 AM
Unknown Object (File)
Sep 18 2024, 8:31 AM
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