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

Submitted by:	Riccardo Panicucci
This commit is contained in:
luigi 2010-03-10 14:21:05 +00:00
parent e0724fd324
commit 5bde959c5f
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