Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/netinet correct bad ip checksum on multicast loopback pa...
details: https://anonhg.NetBSD.org/src/rev/f45771d4c4eb
branches: trunk
changeset: 521464:f45771d4c4eb
user: itojun <itojun%NetBSD.org@localhost>
date: Thu Jan 31 07:45:22 2002 +0000
description:
correct bad ip checksum on multicast loopback packet. PR14597
diffstat:
sys/netinet/ip_output.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diffs (32 lines):
diff -r d8dbf404dfcf -r f45771d4c4eb sys/netinet/ip_output.c
--- a/sys/netinet/ip_output.c Thu Jan 31 07:05:43 2002 +0000
+++ b/sys/netinet/ip_output.c Thu Jan 31 07:45:22 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ip_output.c,v 1.92 2002/01/22 03:53:55 itojun Exp $ */
+/* $NetBSD: ip_output.c,v 1.93 2002/01/31 07:45:22 itojun Exp $ */
/*
* Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -102,7 +102,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.92 2002/01/22 03:53:55 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_output.c,v 1.93 2002/01/31 07:45:22 itojun Exp $");
#include "opt_pfil_hooks.h"
#include "opt_ipsec.h"
@@ -1643,6 +1643,13 @@
ip = mtod(copym, struct ip *);
HTONS(ip->ip_len);
HTONS(ip->ip_off);
+
+ if (copym->m_pkthdr.csum_flags & (M_CSUM_TCPv4|M_CSUM_UDPv4)) {
+ in_delayed_cksum(m);
+ copym->m_pkthdr.csum_flags &=
+ ~(M_CSUM_TCPv4|M_CSUM_UDPv4);
+ }
+
ip->ip_sum = 0;
ip->ip_sum = in_cksum(copym, ip->ip_hl << 2);
(void) looutput(ifp, copym, sintosa(dst), NULL);
Home |
Main Index |
Thread Index |
Old Index