Subject: kern/9772: Incorrect handling of ip multicast fragments.
To: None <gnats-bugs@gnats.netbsd.org>
From: None <art@dynarc.se>
List: netbsd-bugs
Date: 04/04/2000 06:41:45
>Number:         9772
>Category:       kern
>Synopsis:       Incorrect handling of ip multicast fragments.
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 04 06:16:01 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Artur Grabowski
>Release:        1.4.1 (problem also present in 1.3.2)
>Organization:
	Dynarc AB
>Environment:
	Custom 1.4.1.
>Description:
	ip_output doesn't copy the M_MCAST and M_BCAST flags to the
	new packets when fragmenting, which causes ether_output to set
	incorrect destination address on the ethernet packet.
>How-To-Repeat:
>Fix:
The diff could have bad spacing, sorry for that.

Index: ip_output.c
===================================================================
RCS file: /cvsroot/syssrc/sys/netinet/ip_output.c,v
retrieving revision 1.72
diff -u -u -r1.72 ip_output.c
--- ip_output.c 2000/03/31 14:31:03     1.72
+++ ip_output.c 2000/04/04 12:49:17
@@ -632,6 +632,8 @@
		m->m_data += max_linkhdr;
		mhip = mtod(m, struct ip *);
		*mhip = *ip;
+		/* we must inherit MCAST and BCAST flags */
+		m->m_flags |= m0->m_flags & (M_MCAST|M_BCAST);
		if (hlen > sizeof (struct ip)) {
			mhlen = ip_optcopy(ip, mhip) + sizeof (struct ip);
			mhip->ip_hl = mhlen >> 2;
>Release-Note:
>Audit-Trail:
>Unformatted: