PERFORCE change 166151 for review

Ana Kukec anchie at FreeBSD.org
Wed Jul 15 22:40:19 UTC 2009


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

Change 166151 by anchie at anchie_malimis on 2009/07/15 22:39:20

	Bug fix related to sockaddr_in6 dst address.	

Affected files ...

.. //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#17 edit

Differences ...

==== //depot/projects/soc2009/anchie_send/src/sys/netinet6/send.c#17 (text+ko) ====

@@ -21,6 +21,7 @@
 send_output(struct mbuf *m, struct ifnet *ifp, int in)
 {
 	struct ip6_hdr *ip6;
+	struct sockaddr_in6 *dst;
 
 	printf("send_output\n");
 
@@ -31,13 +32,20 @@
 	 */
 
 	ip6 = mtod(m, struct ip6_hdr *);
-	struct in6_addr dst = ip6->ip6_dst;
+	//struct in6_addr dst = ip6->ip6_dst;
+	//dst = &ip6->ip6_dst;
+
+        dst = malloc (2 * sizeof (struct sockaddr_in6), M_TEMP, M_NOWAIT);
+        dst->sin6_len = sizeof(struct sockaddr_in6);
+        dst->sin6_family = AF_INET6;
+        dst->sin6_addr = ip6->ip6_dst;
 
 	/* 
 	 * From nd6.c: nd6_output_lle(). 
 	 * ToFix: kernel panic: Duplicate free of item (mbuf). 
 	 */
-	return (*ifp->if_output)(ifp, m, (struct sockaddr *)&dst, NULL);
+	return (*ifp->if_output)(ifp, m, (struct sockaddr *)dst, NULL);
+	//return (0);
 }
 
 static int


More information about the p4-projects mailing list