1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-16 10:20:30 +00:00

fix handling of commands issued by RELENG_7 version of /sbin/ipfw,

Submitted by:	Riccardo Panicucci
This commit is contained in:
Luigi Rizzo 2010-03-10 14:21:05 +00:00
parent 6f88d2a870
commit 642dddf0f8
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=204954
2 changed files with 4 additions and 2 deletions

View File

@ -495,7 +495,7 @@ dn_compat_config_profile(struct dn_profile *pf, struct dn_link *p,
static int
dn_compat_configure(void *v)
{
struct dn_id *buf, *base;
struct dn_id *buf = NULL, *base;
struct dn_sch *sch = NULL;
struct dn_link *p = NULL;
struct dn_fs *fs = NULL;
@ -547,6 +547,8 @@ dn_compat_configure(void *v)
}
error = do_config(base, (char *)buf - (char *)base);
if (buf)
free(buf, M_DUMMYNET);
return error;
}

View File

@ -951,7 +951,7 @@ ipfw_ctl(struct sockopt *sopt)
case IP_FW_ADD:
rule = malloc(RULE_MAXSIZE, M_TEMP, M_WAITOK);
error = sooptcopyin(sopt, rule, RULE_MAXSIZE,
sizeof(struct ip_fw) );
sizeof(struct ip_fw7) );
/*
* If the size of commands equals RULESIZE7 then we assume