PERFORCE change 148757 for review

Sam Leffler sam at FreeBSD.org
Fri Aug 29 00:13:24 UTC 2008


http://perforce.freebsd.org/chv.cgi?CH=148757

Change 148757 by sam at sam_ebb on 2008/08/29 00:13:07

	o delete key after use; otherwise crypto module winges about it
	o use hack at in-kernel clone api to make progress

Affected files ...

.. //depot/projects/vap/tools/regression/net80211/tkip/test_tkip.c#4 edit

Differences ...

==== //depot/projects/vap/tools/regression/net80211/tkip/test_tkip.c#4 (text+ko) ====

@@ -229,7 +229,7 @@
 	struct ieee80211_key key;
 	struct mbuf *m = NULL;
 	const struct ieee80211_cipher *cip;
-	int hdrlen;
+	int hdrlen, result = 0;
 
 	printf("%s: ", t->name);
 
@@ -337,12 +337,12 @@
 	}
 	/* XXX check frame length and contents... */
 	printf("PASS\n");
-	return 1;
+	result = 1;
 bad:
 	if (m != NULL)
 		m_freem(m);
 	ieee80211_crypto_delkey(vap, &key);
-	return 0;
+	return result;
 }
 
 /*
@@ -409,7 +409,7 @@
 	icp.icp_opmode = IEEE80211_M_STA;
 
 	strlcpy(ifname, "wlan", sizeof(ifname));
-	error = if_clone_create(ifname, sizeof(ifname), (caddr_t) &icp);
+	error = if_clone_create_sys(ifname, sizeof(ifname), (caddr_t) &icp);
 	if (error != 0) {
 		printf("%s: unable to clone vap (error %d)!\n",
 		    __func__, error);


More information about the p4-projects mailing list