tcp_input.c (235961) | tcp_input.c (236170) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2007-2008,2010 5 * Swinburne University of Technology, Melbourne, Australia. 6 * Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org> 7 * Copyright (c) 2010 The FreeBSD Foundation 8 * Copyright (c) 2010-2011 Juniper Networks, Inc. --- 34 unchanged lines hidden (view full) --- 43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 45 * SUCH DAMAGE. 46 * 47 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 48 */ 49 50#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 1995 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (c) 2007-2008,2010 5 * Swinburne University of Technology, Melbourne, Australia. 6 * Copyright (c) 2009-2010 Lawrence Stewart <lstewart@freebsd.org> 7 * Copyright (c) 2010 The FreeBSD Foundation 8 * Copyright (c) 2010-2011 Juniper Networks, Inc. --- 34 unchanged lines hidden (view full) --- 43 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 44 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 45 * SUCH DAMAGE. 46 * 47 * @(#)tcp_input.c 8.12 (Berkeley) 5/24/95 48 */ 49 50#include <sys/cdefs.h> |
51__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 235961 2012-05-25 02:23:26Z bz $"); | 51__FBSDID("$FreeBSD: head/sys/netinet/tcp_input.c 236170 2012-05-28 09:30:13Z bz $"); |
52 53#include "opt_ipfw.h" /* for ipfw_fwd */ 54#include "opt_inet.h" 55#include "opt_inet6.h" 56#include "opt_ipsec.h" 57#include "opt_tcpdebug.h" 58 59#include <sys/param.h> --- 524 unchanged lines hidden (view full) --- 584 TCPSTAT_INC(tcps_rcvshort); 585 return; 586 } 587 } 588 589 ip6 = mtod(m, struct ip6_hdr *); 590 th = (struct tcphdr *)((caddr_t)ip6 + off0); 591 tlen = sizeof(*ip6) + ntohs(ip6->ip6_plen) - off0; | 52 53#include "opt_ipfw.h" /* for ipfw_fwd */ 54#include "opt_inet.h" 55#include "opt_inet6.h" 56#include "opt_ipsec.h" 57#include "opt_tcpdebug.h" 58 59#include <sys/param.h> --- 524 unchanged lines hidden (view full) --- 584 TCPSTAT_INC(tcps_rcvshort); 585 return; 586 } 587 } 588 589 ip6 = mtod(m, struct ip6_hdr *); 590 th = (struct tcphdr *)((caddr_t)ip6 + off0); 591 tlen = sizeof(*ip6) + ntohs(ip6->ip6_plen) - off0; |
592 if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID) { | 592 if (m->m_pkthdr.csum_flags & CSUM_DATA_VALID_IPV6) { |
593 if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) 594 th->th_sum = m->m_pkthdr.csum_data; 595 else 596 th->th_sum = in6_cksum_pseudo(ip6, tlen, 597 IPPROTO_TCP, m->m_pkthdr.csum_data); 598 th->th_sum ^= 0xffff; 599 } else 600 th->th_sum = in6_cksum(m, IPPROTO_TCP, off0, tlen); --- 3025 unchanged lines hidden --- | 593 if (m->m_pkthdr.csum_flags & CSUM_PSEUDO_HDR) 594 th->th_sum = m->m_pkthdr.csum_data; 595 else 596 th->th_sum = in6_cksum_pseudo(ip6, tlen, 597 IPPROTO_TCP, m->m_pkthdr.csum_data); 598 th->th_sum ^= 0xffff; 599 } else 600 th->th_sum = in6_cksum(m, IPPROTO_TCP, off0, tlen); --- 3025 unchanged lines hidden --- |