[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kernel/2163: IPv4 multicast packets not looped back to host
>Number: 2163
>Category: kernel
>Synopsis: IPv4 multicast packets not looped back to host
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: bugs
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Nov 1 10:50:01 MST 2001
>Last-Modified:
>Originator: Goeran Bengtson
>Organization:
Chalmers
>Release: current
>Environment:
System : OpenBSD 3.0
Architecture: OpenBSD.any
Machine : any
>Description:
IP multicast (IPv4) packets sent by an OpenBSD host are not correctly
looped back to the host even if IP_MULTICAST_LOOP is set (the default).
The reason is that after delayed checksumming was introduced,
checksumming isn't done before ip_mloopback is called resulting in
checksum errors on receive.
>How-To-Repeat:
Send IPv4 multicast packets on a socket with IP_MULTICAST_LOOP set.
>Fix:
Suggested fix follows:
Index: ip_output.c
===================================================================
RCS file: /cvs/src/sys/netinet/ip_output.c,v
retrieving revision 1.137
diff -u -r1.137 ip_output.c
--- ip_output.c 2001/08/26 21:12:06 1.137
+++ ip_output.c 2001/11/01 17:22:04
@@ -453,6 +453,15 @@
* on the outgoing interface, and the caller did not
* forbid loopback, loop back a copy.
*/
+ /*
+ * Can't defer TCP/UDP checksumming, do the
+ * computation now.
+ */
+ if (m->m_pkthdr.csum & (M_TCPV4_CSUM_OUT | M_UDPV4_CSUM_OUT)) {
+ in_delayed_cksum(m);
+ m->m_pkthdr.csum &=
+ ~(M_UDPV4_CSUM_OUT | M_TCPV4_CSUM_OUT);
+ }
ip_mloopback(ifp, m, dst);
}
#ifdef MROUTING
>Audit-Trail:
>Unformatted: