PERFORCE change 166335 for review

Ana Kukec anchie at FreeBSD.org
Mon Jul 20 20:41:27 UTC 2009


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

Change 166335 by anchie at anchie_malimis on 2009/07/20 20:40:34

	On the way back to kernel, mbuf flags (specifically M_MCAST) where
	changed. mbuf received through rtsock.c: route_output()	did not have
	M_MCAST flag set despite that the address was ff02::1:x.

Affected files ...

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

Differences ...

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

@@ -54,12 +54,14 @@
 	case SND_OUT:
 		ip6 = mtod(m, struct ip6_hdr *);
 
+		if (IN6_IS_ADDR_MULTICAST(&ip6->ip6_dst))
+			m->m_flags |= M_MCAST;
+
                 {
                 char ip6buf[INET6_ADDRSTRLEN];
                 printf("XXX-AK, send.c: ifp=%p, xname=%s, dst=%s\n", ifp, ifp->if_xname, ip6_sprintf(ip6buf, &ip6->ip6_dst));
                 }
 
-
         	dst = malloc (sizeof (struct sockaddr_in6), M_TEMP, M_NOWAIT);
 		bzero(dst, sizeof(*dst));
         	dst->sin6_len = sizeof(struct sockaddr_in6);
@@ -87,6 +89,9 @@
 {
 	struct ip6_hdr *ip6;
 
+	if (m->m_flags & M_MCAST)
+		printf("send_input: M_MCAST packet\n");
+
 	ip6 = mtod(m, struct ip6_hdr *);
 
 	/* 


More information about the p4-projects mailing list