o Restore a historical ipfw1 logamount behaviour: rules with 'log'

keyword but without 'logamount' limit the amount of their log messages
by net.inet.ip.fw.verbose_limit sysctl value.

RELENG_5 candidate.

PR:		kern/46080
Submitted by:	Dan Pelleg
MFC after:	1 week
This commit is contained in:
Maxim Konovalov 2004-08-29 08:25:02 +00:00
parent 7bad922a88
commit 9ec4f2e1b3
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=134475

View File

@ -2781,6 +2781,7 @@ add(int ac, char *av[])
* various flags used to record that we entered some fields.
*/
ipfw_insn *have_state = NULL; /* check-state or keep-state */
size_t len;
int i;
@ -2962,6 +2963,12 @@ add(int ac, char *av[])
errx(EX_DATAERR, "logamount must be positive");
c->max_log = l;
ac--; av++;
} else {
len = sizeof(c->max_log);
if (sysctlbyname("net.inet.ip.fw.verbose_limit",
&c->max_log, &len, NULL, 0) == -1)
errx(1, "sysctlbyname(\"%s\")",
"net.inet.ip.fw.verbose_limit");
}
cmd = next_cmd(cmd);
}