Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Sep 2008 20:45:35 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 149353 for review
Message-ID:  <200809062045.m86KjZlH067946@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=149353

Change 149353 by sam@sam_ebb on 2008/09/06 20:44:47

	IFC @ 149343

Affected files ...

.. //depot/projects/vap/sbin/ipfw/ipfw2.c#8 integrate
.. //depot/projects/vap/sbin/natd/natd.c#5 integrate
.. //depot/projects/vap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#4 integrate
.. //depot/projects/vap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#5 integrate
.. //depot/projects/vap/sys/contrib/dev/ath/public/wisoc.hal.o.uu#1 branch
.. //depot/projects/vap/sys/contrib/dev/ath/public/wisoc.inc#1 branch
.. //depot/projects/vap/sys/net80211/ieee80211.h#15 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_ddb.c#25 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#36 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_ht.c#45 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_ht.h#20 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#65 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_ioctl.h#24 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_node.c#46 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_node.h#27 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_phy.c#10 integrate
.. //depot/projects/vap/sys/net80211/ieee80211_sta.c#18 integrate

Differences ...

==== //depot/projects/vap/sbin/ipfw/ipfw2.c#8 (text+ko) ====

@@ -17,7 +17,7 @@
  *
  * NEW command line interface for IP firewall facility
  *
- * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.120 2008/05/10 15:02:56 julian Exp $
+ * $FreeBSD: src/sbin/ipfw/ipfw2.c,v 1.121 2008/09/06 17:23:37 rik Exp $
  */
 
 #include <sys/param.h>
@@ -2429,7 +2429,7 @@
 		rulenum = atoi(av[0]);
 		new_set = atoi(av[2]);
 		if (!isdigit(*(av[0])) || (cmd == 3 && rulenum > RESVD_SET) ||
-			(cmd == 2 && rulenum == 65535) )
+			(cmd == 2 && rulenum == IPFW_DEFAULT_RULE) )
 			errx(EX_DATAERR, "invalid source number %s\n", av[0]);
 		if (!isdigit(*(av[2])) || new_set > RESVD_SET)
 			errx(EX_DATAERR, "invalid dest. set %s\n", av[1]);
@@ -2553,7 +2553,7 @@
 	 * need to scan the list to count them.
 	 */
 	for (nstat = 1, r = data, lim = (char *)data + nbytes;
-		    r->rulenum < 65535 && (char *)r < lim;
+		    r->rulenum < IPFW_DEFAULT_RULE && (char *)r < lim;
 		    ++nstat, r = NEXT(r) )
 		; /* nothing */
 
@@ -5045,7 +5045,8 @@
 			if (have_tag)
 				errx(EX_USAGE, "tag and untag cannot be "
 				    "specified more than once");
-			GET_UINT_ARG(tag, 1, 65534, i, rule_action_params);
+			GET_UINT_ARG(tag, 1, IPFW_DEFAULT_RULE - 1, i,
+			   rule_action_params);
 			have_tag = cmd;
 			fill_cmd(cmd, O_TAG, (i == TOK_TAG) ? 0: F_NOT, tag);
 			ac--; av++;
@@ -5521,8 +5522,8 @@
 			if (c->limit_mask == 0)
 				errx(EX_USAGE, "limit: missing limit mask");
 
-			GET_UINT_ARG(c->conn_limit, 1, 65534, TOK_LIMIT,
-			    rule_options);
+			GET_UINT_ARG(c->conn_limit, 1, IPFW_DEFAULT_RULE - 1,
+			    TOK_LIMIT, rule_options);
 
 			ac--; av++;
 			break;
@@ -5649,8 +5650,8 @@
 			else {
 				uint16_t tag;
 
-				GET_UINT_ARG(tag, 1, 65534, TOK_TAGGED,
-				    rule_options);
+				GET_UINT_ARG(tag, 1, IPFW_DEFAULT_RULE - 1,
+				    TOK_TAGGED, rule_options);
 				fill_cmd(cmd, O_TAGGED, 0, tag);
 			}
 			ac--; av++;
@@ -5978,7 +5979,7 @@
 	size = 0;
 	data = NULL;
 	frule = 0;
-	lrule = 65535; /* max ipfw rule number */
+	lrule = IPFW_DEFAULT_RULE; /* max ipfw rule number */
 	ac--; av++;
 
 	/* Parse parameters. */

==== //depot/projects/vap/sbin/natd/natd.c#5 (text+ko) ====

@@ -11,7 +11,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.53 2008/06/22 22:14:02 mav Exp $");
+__FBSDID("$FreeBSD: src/sbin/natd/natd.c,v 1.54 2008/09/06 17:26:52 rik Exp $");
 
 #define SYSLOG_NAMES
 
@@ -130,6 +130,7 @@
 static void	SetupSkinnyPort(const char *strValue);
 static void	NewInstance(const char *name);
 static void	DoGlobal (int fd);
+static int	CheckIpfwRulenum(unsigned int rnum);
 
 /*
  * Globals.
@@ -1947,6 +1948,10 @@
 	if (sscanf(strValue, "%u:%u", &base, &num) != 2)
 		errx(1, "punch_fw: basenumber:count parameter required");
 
+	if (CheckIpfwRulenum(base + num - 1) == -1)
+		errx(1, "punch_fw: basenumber:count parameter should fit "
+			"the maximum allowed rule numbers");
+
 	LibAliasSetFWBase(mla, base, num);
 	(void)LibAliasSetMode(mla, PKT_ALIAS_PUNCH_FW, PKT_ALIAS_PUNCH_FW);
 }
@@ -1991,3 +1996,22 @@
 	mla = ip->la;
 	mip = ip;
 }
+
+static int
+CheckIpfwRulenum(unsigned int rnum)
+{
+	unsigned int default_rule;
+	size_t len = sizeof(default_rule);
+
+	if (sysctlbyname("net.inet.ip.fw.default_rule", &default_rule, &len,
+		NULL, 0) == -1) {
+		warn("Failed to get the default ipfw rule number, using "
+		     "default historical value 65535.  The reason was");
+		default_rule = 65535;
+	}
+	if (rnum >= default_rule) {
+		return -1;
+	}
+
+	return 0;
+}

==== //depot/projects/vap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c#4 (text+ko) ====

@@ -1303,12 +1303,6 @@
 		}
 	}
 out:
-
-	if (error == 0) {
-		*vpp = ZTOV(zp);
-		vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
-	}
-
 	if (dl)
 		zfs_dirent_unlock(dl);
 
@@ -1588,8 +1582,6 @@
 	zfs_log_create(zilog, tx, TX_MKDIR, dzp, zp, dirname);
 	dmu_tx_commit(tx);
 
-	vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
-
 	zfs_dirent_unlock(dl);
 
 	ZFS_EXIT(zfsvfs);
@@ -2773,7 +2765,6 @@
 	if (error == 0) {
 		zfs_log_symlink(zilog, tx, TX_SYMLINK, dzp, zp, name, link);
 		*vpp = ZTOV(zp);
-		vn_lock(*vpp, LK_EXCLUSIVE | LK_RETRY);
 	}
 
 	dmu_tx_commit(tx);

==== //depot/projects/vap/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c#5 (text+ko) ====

@@ -117,6 +117,7 @@
 	if (cdrarg != NULL) {
 		error = getnewvnode("zfs", vfsp, &zfs_vnodeops, &vp);
 		ASSERT(error == 0);
+		vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 		zp->z_vnode = vp;
 		vp->v_data = (caddr_t)zp;
 		VN_LOCK_AREC(vp);
@@ -535,8 +536,10 @@
 
 		*zpp = zp;
 	} else {
-		if (ZTOV(zp) != NULL)
+		if (ZTOV(zp) != NULL) {
 			ZTOV(zp)->v_count = 0;
+			VOP_UNLOCK(ZTOV(zp), 0);
+		}
 		dmu_buf_rele(dbp, NULL);
 		zfs_znode_free(zp);
 	}
@@ -598,6 +601,7 @@
 			    &zp->z_vnode);
 			ASSERT(err == 0);
 			vp = ZTOV(zp);
+			vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
 			vp->v_data = (caddr_t)zp;
 			VN_LOCK_AREC(vp);
 			VN_LOCK_ASHARE(vp);
@@ -608,6 +612,7 @@
 			err = insmntque(vp, zfsvfs->z_vfs);
 			vp->v_vflag &= ~VV_FORCEINSMQ;
 			KASSERT(err == 0, ("insmntque() failed: error %d", err));
+			VOP_UNLOCK(vp, 0);
 		}
 		mutex_exit(&zp->z_lock);
 		ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
@@ -623,6 +628,7 @@
 	zfs_znode_dmu_init(zp);
 	ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
 	*zpp = zp;
+	VOP_UNLOCK(vp, 0);
 	return (0);
 }
 

==== //depot/projects/vap/sys/net80211/ieee80211.h#15 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211.h,v 1.21 2008/08/06 15:54:59 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211.h,v 1.22 2008/09/06 17:14:27 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_H_
 #define _NET80211_IEEE80211_H_

==== //depot/projects/vap/sys/net80211/ieee80211_ddb.c#25 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ddb.c,v 1.5 2008/08/25 05:20:29 julian Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ddb.c,v 1.7 2008/09/06 17:18:38 sam Exp $");
 
 #include "opt_ddb.h"
 #include "opt_wlan.h"

==== //depot/projects/vap/sys/net80211/ieee80211_freebsd.h#36 (text+ko) ====

@@ -22,7 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_freebsd.h,v 1.18 2008/05/28 23:10:53 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_freebsd.h,v 1.20 2008/09/06 17:29:11 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_FREEBSD_H_
 #define _NET80211_IEEE80211_FREEBSD_H_

==== //depot/projects/vap/sys/net80211/ieee80211_ht.c#45 (text+ko) ====

@@ -25,7 +25,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __FreeBSD__
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ht.c,v 1.12 2008/08/02 18:04:09 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ht.c,v 1.18 2008/09/06 17:42:51 sam Exp $");
 #endif
 
 /*

==== //depot/projects/vap/sys/net80211/ieee80211_ht.h#20 (text+ko) ====

@@ -22,7 +22,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_ht.h,v 1.6 2008/05/11 23:18:11 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ht.h,v 1.7 2008/09/06 17:29:11 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_HT_H_
 #define _NET80211_IEEE80211_HT_H_

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.c#65 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.62 2008/08/09 05:46:01 imp Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_ioctl.c,v 1.63 2008/09/06 17:43:47 sam Exp $");
 
 /*
  * IEEE 802.11 ioctl support (FreeBSD-specific)

==== //depot/projects/vap/sys/net80211/ieee80211_ioctl.h#24 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.27 2008/04/20 20:35:43 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_ioctl.h,v 1.28 2008/09/06 17:38:20 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_IOCTL_H_
 #define _NET80211_IEEE80211_IOCTL_H_

==== //depot/projects/vap/sys/net80211/ieee80211_node.c#46 (text+ko) ====

@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.99 2008/06/07 18:38:02 sam Exp $");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_node.c,v 1.100 2008/09/06 17:51:02 sam Exp $");
 
 #include "opt_wlan.h"
 

==== //depot/projects/vap/sys/net80211/ieee80211_node.h#27 (text+ko) ====

@@ -23,7 +23,7 @@
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  *
- * $FreeBSD: src/sys/net80211/ieee80211_node.h,v 1.31 2008/04/20 20:35:43 sam Exp $
+ * $FreeBSD: src/sys/net80211/ieee80211_node.h,v 1.34 2008/09/06 17:42:51 sam Exp $
  */
 #ifndef _NET80211_IEEE80211_NODE_H_
 #define _NET80211_IEEE80211_NODE_H_

==== //depot/projects/vap/sys/net80211/ieee80211_phy.c#10 (text+ko) ====

@@ -24,7 +24,7 @@
  */
 
 #include <sys/cdefs.h>
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_phy.c,v 1.3 2008/09/06 17:48:25 sam Exp $");
 
 /*
  * IEEE 802.11 PHY-related support.
@@ -174,6 +174,7 @@
     },
 };
 
+#undef	Mb
 #undef	B
 #undef	OFDM
 #undef	CCK

==== //depot/projects/vap/sys/net80211/ieee80211_sta.c#18 (text+ko) ====

@@ -25,7 +25,7 @@
 
 #include <sys/cdefs.h>
 #ifdef __FreeBSD__
-__FBSDID("$FreeBSD$");
+__FBSDID("$FreeBSD: src/sys/net80211/ieee80211_sta.c,v 1.2 2008/09/06 17:51:02 sam Exp $");
 #endif
 
 /*



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