Date: Sat, 20 Apr 2019 16:07:29 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r346448 - head/sys/netinet/netdump Message-ID: <201904201607.x3KG7TY1051429@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Sat Apr 20 16:07:29 2019 New Revision: 346448 URL: https://svnweb.freebsd.org/changeset/base/346448 Log: 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 Modified: head/sys/netinet/netdump/netdump_client.c Modified: head/sys/netinet/netdump/netdump_client.c ============================================================================== --- head/sys/netinet/netdump/netdump_client.c Sat Apr 20 16:05:04 2019 (r346447) +++ head/sys/netinet/netdump/netdump_client.c Sat Apr 20 16:07:29 2019 (r346448) @@ -1144,13 +1144,25 @@ netdump_ioctl(struct cdev *dev __unused, u_long cmd, c 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();
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201904201607.x3KG7TY1051429>