Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Dec 2007 07:16:57 GMT
From:      Zhouyi ZHOU <zhouzhouyi@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 131652 for review
Message-ID:  <200712260716.lBQ7Gv6F078960@repoman.freebsd.org>

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

Change 131652 by zhouzhouyi@zhouzhouyi_mactest on 2007/12/26 07:16:53

	Add test case for IPv6 fragment and defragment, waiting rwatson to do something :) 

Affected files ...

.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tcpconnect6.c#3 edit
.. //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet6/00.t#2 edit

Differences ...

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tcpconnect6.c#3 (text+ko) ====

@@ -137,7 +137,10 @@
 			err(1, "waiter: semop +1");
 
 	while (keepaccept) {
+		char *buf = malloc(20000);
 		accept_sock = accept(listen_sock, NULL, NULL);
+		read(accept_sock, buf, 20000);
+		free(buf);
 		close(accept_sock);
 		count++;
 		if (count == 1)
@@ -180,6 +183,7 @@
 
 		h_addr_index = 0;
 		while (hp->h_addr_list[h_addr_index] != NULL) {
+			char *buf;
 		        bcopy(hp->h_addr_list[h_addr_index], &server.sin6_addr,
         		            hp->h_length);
 	        	server.sin6_port =  htons(port);
@@ -191,6 +195,9 @@
 		            }
 		            perror("connecting stream socket");
 		        }
+			buf = malloc(20000); /*force ipv6 to fragment*/
+			write(sock, buf, 20000);
+			free(buf);
         		break;
     		}
 

==== //depot/projects/soc2007/zhouzhouyi_mactest_soc/regression/mactest/tests/netinet6/00.t#2 (text+ko) ====

@@ -35,7 +35,7 @@
 		    echo "1"
 
 #case 1: check the in_pcb alloc and destroy for IPv6
-
+		    ifconfig lo0 mtu 1000
     		    echo "pid = -2 inpcb_init_label" > ${mactest_conf}
 		    echo "pid = -2 inpcb_create:biba/high,mls/low biba/high,mls/low" >> ${mactest_conf}
 		    echo "pid = -2 inpcb_destroy_label" >> ${mactest_conf}



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