Interfaces that do checksum offloading indicate the checksum status of

received packets in csum_flags in the packet header.  Packets that are
forwarded over the bridge need to have csum_flags cleared before being
put on the output queue.  Do so in bridge_enqueue().

Discussed with Jason Thorpe.

Fixes PR kern/27007 and the first part of PR kern/21831.
This commit is contained in:
bad 2004-10-06 10:01:00 +00:00
parent ca40f65ce1
commit 2a256a96ac
1 changed files with 7 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: if_bridge.c,v 1.25 2004/10/05 03:36:45 christos Exp $ */
/* $NetBSD: if_bridge.c,v 1.26 2004/10/06 10:01:00 bad Exp $ */
/*
* Copyright 2001 Wasabi Systems, Inc.
@ -80,7 +80,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.25 2004/10/05 03:36:45 christos Exp $");
__KERNEL_RCSID(0, "$NetBSD: if_bridge.c,v 1.26 2004/10/06 10:01:00 bad Exp $");
#include "opt_bridge_ipf.h"
#include "opt_inet.h"
@ -1123,6 +1123,11 @@ bridge_enqueue(struct bridge_softc *sc, struct ifnet *dst_ifp, struct mbuf *m,
int len, error;
short mflags;
/*
* Clear any in-bound checksum flags for this packet.
*/
m->m_pkthdr.csum_flags = 0;
#ifdef PFIL_HOOKS
if (runfilt) {
if (pfil_run_hooks(&sc->sc_if.if_pfil, &m,