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/netinet/ip_mroute.c | |
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/netinet/ip_mroute.c')
-rw-r--r-- | sys/netinet/ip_mroute.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/netinet/ip_mroute.c b/sys/netinet/ip_mroute.c index b72885f..5b33504 100644 --- a/sys/netinet/ip_mroute.c +++ b/sys/netinet/ip_mroute.c @@ -2404,7 +2404,8 @@ pim_register_prepare(struct ip *ip, struct mbuf *m) ip->ip_sum = in_cksum(mb_copy, ip->ip_hl << 2); } else { /* Fragment the packet */ - if (ip_fragment(ip, &mb_copy, mtu, 0, CSUM_DELAY_IP) != 0) { + mb_copy->m_pkthdr.csum_flags |= CSUM_IP; + if (ip_fragment(ip, &mb_copy, mtu, 0) != 0) { m_freem(mb_copy); return NULL; } |