Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Mar 2010 14:21:05 +0000 (UTC)
From:      Luigi Rizzo <luigi@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r204954 - head/sys/netinet/ipfw
Message-ID:  <201003101421.o2AEL5qF061681@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: luigi
Date: Wed Mar 10 14:21:05 2010
New Revision: 204954
URL: http://svn.freebsd.org/changeset/base/204954

Log:
  fix handling of commands issued by RELENG_7 version of /sbin/ipfw,
  
  Submitted by:	Riccardo Panicucci

Modified:
  head/sys/netinet/ipfw/ip_dn_glue.c
  head/sys/netinet/ipfw/ip_fw_sockopt.c

Modified: head/sys/netinet/ipfw/ip_dn_glue.c
==============================================================================
--- head/sys/netinet/ipfw/ip_dn_glue.c	Wed Mar 10 13:54:13 2010	(r204953)
+++ head/sys/netinet/ipfw/ip_dn_glue.c	Wed Mar 10 14:21:05 2010	(r204954)
@@ -495,7 +495,7 @@ dn_compat_config_profile(struct dn_profi
 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;
 }
 

Modified: head/sys/netinet/ipfw/ip_fw_sockopt.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_sockopt.c	Wed Mar 10 13:54:13 2010	(r204953)
+++ head/sys/netinet/ipfw/ip_fw_sockopt.c	Wed Mar 10 14:21:05 2010	(r204954)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003101421.o2AEL5qF061681>