Module Name: src
Committed By: msaitoh
Date: Tue Sep 18 09:27:35 UTC 2018
Modified Files:
src/sys/net: if_bridge.c
Log Message:
- Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
pointer.
- Modify comment.
To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 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.157 src/sys/net/if_bridge.c:1.158
--- src/sys/net/if_bridge.c:1.157 Fri Sep 14 11:05:09 2018
+++ src/sys/net/if_bridge.c Tue Sep 18 09:27:35 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bridge.c,v 1.157 2018/09/14 11:05:09 msaitoh Exp $ */
+/* $NetBSD: if_bridge.c,v 1.158 2018/09/18 09:27:35 msaitoh Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.157 2018/09/14 11:05:09 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.158 2018/09/18 09:27:35 msaitoh Exp $");
#ifdef _KERNEL_OPT
#include "opt_bridge_ipf.h"
@@ -1764,7 +1764,9 @@ bridge_forward(struct bridge_softc *sc,
bridge_release_member(sc, bif, &psref);
/*
- * Clear any in-bound checksum flags for this packet.
+ * Before enqueueing this packet to the destination interface,
+ * clear any in-bound checksum flags to prevent them from being
+ * misused as out-bound flags.
*/
m->m_pkthdr.csum_flags = 0;
@@ -1978,11 +1980,12 @@ bridge_broadcast(struct bridge_softc *sc
sc->sc_if.if_oerrors++;
goto next;
}
-
/*
- * Clear any in-bound checksum flags for this packet.
+ * Before enqueueing this packet to the destination
+ * interface, clear any in-bound checksum flags to
+ * prevent them from being misused as out-bound flags.
*/
- m->m_pkthdr.csum_flags = 0;
+ mc->m_pkthdr.csum_flags = 0;
ACQUIRE_GLOBAL_LOCKS();
bridge_enqueue(sc, dst_if, mc, 1);