Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net reset the csum_flags in bridge_brodcast() also for b...
details: https://anonhg.NetBSD.org/src/rev/06c55ee12b91
branches: trunk
changeset: 1008501:06c55ee12b91
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Tue Mar 24 13:30:54 2020 +0000
description:
reset the csum_flags in bridge_brodcast() also for bmcast path
for destination interfaces with real hardware offloading this fixes
multicast packet corruption; for xvif(4) this fix stops treating them
as having no csum
may fix PR kern/42386
diffstat:
sys/net/if_bridge.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 74ee2a034858 -r 06c55ee12b91 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Tue Mar 24 13:07:46 2020 +0000
+++ b/sys/net/if_bridge.c Tue Mar 24 13:30:54 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.168 2020/02/24 00:47:38 rin Exp $ */
+/* $NetBSD: if_bridge.c,v 1.169 2020/03/24 13:30:54 jdolecek Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.168 2020/02/24 00:47:38 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.169 2020/03/24 13:30:54 jdolecek Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -2101,6 +2101,12 @@
if_statinc(&sc->sc_if, if_oerrors);
goto next;
}
+ /*
+ * Before enqueueing this packet to the destination
+ * interface, clear any in-bound checksum flags to
+ * prevent them from being misused as out-bound flags.
+ */
+ mc->m_pkthdr.csum_flags = 0;
m_set_rcvif(mc, dst_if);
mc->m_flags &= ~M_PROMISC;
Home |
Main Index |
Thread Index |
Old Index