Module Name: src
Committed By: jdolecek
Date: Tue Mar 24 13:30:54 UTC 2020
Modified Files:
src/sys/net: if_bridge.c
Log Message:
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
To generate a diff of this commit:
cvs rdiff -u -r1.168 -r1.169 src/sys/net/if_bridge.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/net/if_bridge.c
diff -u src/sys/net/if_bridge.c:1.168 src/sys/net/if_bridge.c:1.169
--- src/sys/net/if_bridge.c:1.168 Mon Feb 24 00:47:38 2020
+++ src/sys/net/if_bridge.c Tue Mar 24 13:30:54 2020
@@ -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 @@ bridge_broadcast(struct bridge_softc *sc
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;