summaryrefslogtreecommitdiffstats
path: root/sys/net/if_bridge.c
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2012-10-26 21:06:33 +0000
committerglebius <glebius@FreeBSD.org>2012-10-26 21:06:33 +0000
commitf79061ff05119f98b31bd77e88fa11b44e7c9a66 (patch)
tree9ac53896ef62a4ee92ccfe57fe595f704b26f17b /sys/net/if_bridge.c
parent64cf2bf393ba7f4f0615c554637bcef5fcd52d89 (diff)
downloadFreeBSD-src-f79061ff05119f98b31bd77e88fa11b44e7c9a66.zip
FreeBSD-src-f79061ff05119f98b31bd77e88fa11b44e7c9a66.tar.gz
o Remove last argument to ip_fragment(), and obtain all needed information
on checksums directly from mbuf flags. This simplifies code. o Clear CSUM_IP from the mbuf in ip_fragment() if we did checksums in hardware. Some driver may not announce CSUM_IP in theur if_hwassist, although try to do checksums if CSUM_IP set on mbuf. Example is em(4). o While here, consistently use CSUM_IP instead of its alias CSUM_DELAY_IP. After this change CSUM_DELAY_IP vanishes from the stack. Submitted by: Sebastian Kuzminsky <seb lineratesystems.com>
Diffstat (limited to 'sys/net/if_bridge.c')
-rw-r--r--sys/net/if_bridge.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c
index 11cd3d6..e935782 100644
--- a/sys/net/if_bridge.c
+++ b/sys/net/if_bridge.c
@@ -3379,8 +3379,8 @@ bridge_fragment(struct ifnet *ifp, struct mbuf *m, struct ether_header *eh,
goto out;
ip = mtod(m, struct ip *);
- error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist,
- CSUM_DELAY_IP);
+ m->m_pkthdr.csum_flags |= CSUM_IP;
+ error = ip_fragment(ip, &m, ifp->if_mtu, ifp->if_hwassist);
if (error)
goto out;
OpenPOWER on IntegriCloud