Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/net - Fix bridge_enqueue() which was broken by last comm...
details: https://anonhg.NetBSD.org/src/rev/ee2c6460f4a0
branches: trunk
changeset: 433518:ee2c6460f4a0
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Sep 18 09:27:35 2018 +0000
description:
- Fix bridge_enqueue() which was broken by last commit. Use correct mbuf
pointer.
- Modify comment.
diffstat:
sys/net/if_bridge.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r 5c2abf47b3ac -r ee2c6460f4a0 sys/net/if_bridge.c
--- a/sys/net/if_bridge.c Tue Sep 18 09:09:26 2018 +0000
+++ b/sys/net/if_bridge.c Tue Sep 18 09:27:35 2018 +0000
@@ -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_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 @@
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);
Home |
Main Index |
Thread Index |
Old Index