Page MenuHomeFreeBSD

D31300.diff
No OneTemporary

D31300.diff

diff --git a/sbin/dumpon/dumpon.c b/sbin/dumpon/dumpon.c
--- a/sbin/dumpon/dumpon.c
+++ b/sbin/dumpon/dumpon.c
@@ -550,6 +550,24 @@
} else
dev = argv[0];
netdump = false;
+
+ if (strcmp(dev, _PATH_DEVNULL) == 0) {
+ /*
+ * Netdump has its own configuration tracking that
+ * is not removed when using /dev/null.
+ */
+ fd = open(_PATH_NETDUMP, O_RDONLY);
+ if (fd != -1) {
+ bzero(&ndconf, sizeof(ndconf));
+ ndconf.kda_index = KDA_REMOVE_ALL;
+ ndconf.kda_af = AF_INET;
+ error = ioctl(fd, DIOCSKERNELDUMP, &ndconf);
+ if (error != 0)
+ err(1, "ioctl(%s, DIOCSKERNELDUMP)",
+ _PATH_NETDUMP);
+ close(fd);
+ }
+ }
} else
usage();

File Metadata

Mime Type
text/plain
Expires
Sun, Nov 17, 6:33 AM (21 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
14671821
Default Alt Text
D31300.diff (697 B)

Event Timeline