tcp_output.c (104815) | tcp_output.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_output.c 8.4 (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_output.c 8.4 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/tcp_output.c 104815 2002-10-10 19:21:50Z dillon $ | 34 * $FreeBSD: head/sys/netinet/tcp_output.c 105194 2002-10-16 01:54:46Z sam $ |
35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 42#include <sys/param.h> --- 827 unchanged lines hidden (view full) --- 870 * Neighbor Discovery. 871 */ 872 ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, 873 tp->t_inpcb->in6p_route.ro_rt ? 874 tp->t_inpcb->in6p_route.ro_rt->rt_ifp 875 : NULL); 876 877 /* TODO: IPv6 IP6TOS_ECT bit on */ | 35 */ 36 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_mac.h" 40#include "opt_tcpdebug.h" 41 42#include <sys/param.h> --- 827 unchanged lines hidden (view full) --- 870 * Neighbor Discovery. 871 */ 872 ip6->ip6_hlim = in6_selecthlim(tp->t_inpcb, 873 tp->t_inpcb->in6p_route.ro_rt ? 874 tp->t_inpcb->in6p_route.ro_rt->rt_ifp 875 : NULL); 876 877 /* TODO: IPv6 IP6TOS_ECT bit on */ |
878#ifdef IPSEC 879 if (ipsec_setsocket(m, so) != 0) { 880 m_freem(m); 881 error = ENOBUFS; 882 goto out; 883 } 884#endif /*IPSEC*/ | |
885 error = ip6_output(m, 886 tp->t_inpcb->in6p_outputopts, 887 &tp->t_inpcb->in6p_route, | 878 error = ip6_output(m, 879 tp->t_inpcb->in6p_outputopts, 880 &tp->t_inpcb->in6p_route, |
888 (so->so_options & SO_DONTROUTE), NULL, NULL); | 881 (so->so_options & SO_DONTROUTE), NULL, NULL, 882 tp->t_inpcb); |
889 } else 890#endif /* INET6 */ 891 { 892 struct rtentry *rt; 893 ip->ip_len = m->m_pkthdr.len; 894#ifdef INET6 895 if (INP_CHECK_SOCKAF(so, AF_INET6)) 896 ip->ip_ttl = in6_selecthlim(tp->t_inpcb, --- 12 unchanged lines hidden (view full) --- 909 * disabled) 910 */ 911 if (path_mtu_discovery 912 && (rt = tp->t_inpcb->inp_route.ro_rt) 913 && rt->rt_flags & RTF_UP 914 && !(rt->rt_rmx.rmx_locks & RTV_MTU)) { 915 ip->ip_off |= IP_DF; 916 } | 883 } else 884#endif /* INET6 */ 885 { 886 struct rtentry *rt; 887 ip->ip_len = m->m_pkthdr.len; 888#ifdef INET6 889 if (INP_CHECK_SOCKAF(so, AF_INET6)) 890 ip->ip_ttl = in6_selecthlim(tp->t_inpcb, --- 12 unchanged lines hidden (view full) --- 903 * disabled) 904 */ 905 if (path_mtu_discovery 906 && (rt = tp->t_inpcb->inp_route.ro_rt) 907 && rt->rt_flags & RTF_UP 908 && !(rt->rt_rmx.rmx_locks & RTV_MTU)) { 909 ip->ip_off |= IP_DF; 910 } |
917#ifdef IPSEC 918 ipsec_setsocket(m, so); 919#endif /*IPSEC*/ | |
920 error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route, | 911 error = ip_output(m, tp->t_inpcb->inp_options, &tp->t_inpcb->inp_route, |
921 (so->so_options & SO_DONTROUTE), 0); | 912 (so->so_options & SO_DONTROUTE), 0, tp->t_inpcb); |
922 } 923 if (error) { 924 925 /* 926 * We know that the packet was lost, so back out the 927 * sequence number advance, if any. 928 */ 929 if (tp->t_force == 0 || !callout_active(tp->tt_persist)) { --- 81 unchanged lines hidden --- | 913 } 914 if (error) { 915 916 /* 917 * We know that the packet was lost, so back out the 918 * sequence number advance, if any. 919 */ 920 if (tp->t_force == 0 || !callout_active(tp->tt_persist)) { --- 81 unchanged lines hidden --- |