mirror of
https://github.com/opnsense/src.git
synced 2026-07-16 12:33:07 -04:00
netdump: Fix 11 compatibility DIOCSKERNELDUMP ioctl
The logic was present for the 11 version of the DIOCSKERNELDUMP ioctl, but had not been updated for the 12 ABI. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D19980
This commit is contained in:
parent
ff9be73ee3
commit
60ade167fd
1 changed files with 14 additions and 2 deletions
|
|
@ -1144,13 +1144,25 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr,
|
|||
|
||||
error = 0;
|
||||
switch (cmd) {
|
||||
case DIOCSKERNELDUMP:
|
||||
#ifdef COMPAT_FREEBSD11
|
||||
case DIOCSKERNELDUMP_FREEBSD11:
|
||||
u = *(u_int *)addr;
|
||||
if (u != 0) {
|
||||
error = ENXIO;
|
||||
break;
|
||||
}
|
||||
|
||||
if (nd_enabled) {
|
||||
nd_enabled = 0;
|
||||
netdump_mbuf_drain();
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case DIOCSKERNELDUMP:
|
||||
kda = (void *)addr;
|
||||
if (kda->kda_enable != 0) {
|
||||
error = ENXIO;
|
||||
break;
|
||||
}
|
||||
if (nd_enabled) {
|
||||
nd_enabled = 0;
|
||||
netdump_mbuf_drain();
|
||||
|
|
|
|||
Loading…
Reference in a new issue