tcp_subr.c (104825) | tcp_subr.c (105194) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1995 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 17 unchanged lines hidden (view full) --- 26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 31 * SUCH DAMAGE. 32 * 33 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/tcp_subr.c 104825 2002-10-10 21:41:30Z dillon $ | 34 * $FreeBSD: head/sys/netinet/tcp_subr.c 105194 2002-10-16 01:54:46Z sam $ |
35 */ 36 37#include "opt_compat.h" 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42 --- 467 unchanged lines hidden (view full) --- 510 htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p))); 511 m->m_pkthdr.csum_flags = CSUM_TCP; 512 m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); 513 } 514#ifdef TCPDEBUG 515 if (tp == NULL || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) 516 tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); 517#endif | 35 */ 36 37#include "opt_compat.h" 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42 --- 467 unchanged lines hidden (view full) --- 510 htons((u_short)(tlen - sizeof(struct ip) + ip->ip_p))); 511 m->m_pkthdr.csum_flags = CSUM_TCP; 512 m->m_pkthdr.csum_data = offsetof(struct tcphdr, th_sum); 513 } 514#ifdef TCPDEBUG 515 if (tp == NULL || (tp->t_inpcb->inp_socket->so_options & SO_DEBUG)) 516 tcp_trace(TA_OUTPUT, 0, tp, mtod(m, void *), th, 0); 517#endif |
518#ifdef IPSEC 519 if (ipsec_setsocket(m, tp ? tp->t_inpcb->inp_socket : NULL) != 0) { 520 m_freem(m); 521 return; 522 } 523#endif | |
524#ifdef INET6 525 if (isipv6) { | 518#ifdef INET6 519 if (isipv6) { |
526 (void)ip6_output(m, NULL, ro6, ipflags, NULL, NULL); | 520 (void)ip6_output(m, NULL, ro6, ipflags, NULL, NULL, 521 tp ? tp->t_inpcb : NULL); |
527 if (ro6 == &sro6 && ro6->ro_rt) { 528 RTFREE(ro6->ro_rt); 529 ro6->ro_rt = NULL; 530 } 531 } else 532#endif /* INET6 */ 533 { | 522 if (ro6 == &sro6 && ro6->ro_rt) { 523 RTFREE(ro6->ro_rt); 524 ro6->ro_rt = NULL; 525 } 526 } else 527#endif /* INET6 */ 528 { |
534 (void) ip_output(m, NULL, ro, ipflags, NULL); | 529 (void) ip_output(m, NULL, ro, ipflags, NULL, tp ? tp->t_inpcb : NULL); |
535 if (ro == &sro && ro->ro_rt) { 536 RTFREE(ro->ro_rt); 537 ro->ro_rt = NULL; 538 } 539 } 540} 541 542/* --- 1153 unchanged lines hidden --- | 530 if (ro == &sro && ro->ro_rt) { 531 RTFREE(ro->ro_rt); 532 ro->ro_rt = NULL; 533 } 534 } 535} 536 537/* --- 1153 unchanged lines hidden --- |