diff options
author | glebius <glebius@FreeBSD.org> | 2012-10-26 21:06:33 +0000 |
---|---|---|
committer | glebius <glebius@FreeBSD.org> | 2012-10-26 21:06:33 +0000 |
commit | f79061ff05119f98b31bd77e88fa11b44e7c9a66 (patch) | |
tree | 9ac53896ef62a4ee92ccfe57fe595f704b26f17b /sys/net | |
parent | 64cf2bf393ba7f4f0615c554637bcef5fcd52d89 (diff) | |
download | FreeBSD-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')
-rw-r--r-- | sys/net/if_bridge.c | 4 |
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; |