Fix 'ugidfw remove' after r284251 incorrectly changed it.

The sysctl_rule() node removes entries when given a newptr and newlen == 0.
This commit is contained in:
Bryan Drewery 2015-09-29 18:48:12 +00:00
parent 066c492a77
commit 66157b3899
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=288389

View file

@ -1233,7 +1233,7 @@ bsde_delete_rule(int rulenum, size_t buflen, char *errstr)
name[len] = rulenum;
len++;
error = sysctl(name, len, NULL, NULL, &rule, sizeof(rule));
error = sysctl(name, len, NULL, NULL, &rule, 0);
if (error) {
len = snprintf(errstr, buflen, "%s.%d: %s", MIB ".rules",
rulenum, strerror(errno));