tcp_input.c (121161) | tcp_input.c (121283) |
---|---|
1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 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_input.c 8.12 (Berkeley) 5/24/95 | 1/* 2 * Copyright (c) 1982, 1986, 1988, 1990, 1993, 1994, 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_input.c 8.12 (Berkeley) 5/24/95 |
34 * $FreeBSD: head/sys/netinet/tcp_input.c 121161 2003-10-17 15:46:31Z ume $ | 34 * $FreeBSD: head/sys/netinet/tcp_input.c 121283 2003-10-20 15:27:48Z ume $ |
35 */ 36 37#include "opt_ipfw.h" /* for ipfw_fwd */ 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42#include "opt_tcp_input.h" --- 2663 unchanged lines hidden (view full) --- 2706 } 2707 /* 2708 * if there's an mtu associated with the route, use it 2709 * else, use the link mtu. 2710 */ 2711 if (rt->rt_rmx.rmx_mtu) 2712 mss = rt->rt_rmx.rmx_mtu - min_protoh; 2713 else { | 35 */ 36 37#include "opt_ipfw.h" /* for ipfw_fwd */ 38#include "opt_inet6.h" 39#include "opt_ipsec.h" 40#include "opt_mac.h" 41#include "opt_tcpdebug.h" 42#include "opt_tcp_input.h" --- 2663 unchanged lines hidden (view full) --- 2706 } 2707 /* 2708 * if there's an mtu associated with the route, use it 2709 * else, use the link mtu. 2710 */ 2711 if (rt->rt_rmx.rmx_mtu) 2712 mss = rt->rt_rmx.rmx_mtu - min_protoh; 2713 else { |
2714#ifdef INET6 2715 mss = (isipv6 ? IN6_LINKMTU(rt->rt_ifp) : ifp->if_mtu) 2716 - min_protoh; 2717#else 2718 mss = ifp->if_mtu - min_protoh; 2719#endif |
|
2714 if (isipv6) { | 2720 if (isipv6) { |
2715 mss = ND_IFINFO(rt->rt_ifp)->linkmtu - min_protoh; | |
2716 if (!in6_localaddr(&inp->in6p_faddr)) 2717 mss = min(mss, tcp_v6mssdflt); 2718 } else { | 2721 if (!in6_localaddr(&inp->in6p_faddr)) 2722 mss = min(mss, tcp_v6mssdflt); 2723 } else { |
2719 mss = ifp->if_mtu - min_protoh; | |
2720 if (!in_localaddr(inp->inp_faddr)) 2721 mss = min(mss, tcp_mssdflt); 2722 } 2723 } 2724 mss = min(mss, offer); 2725 /* 2726 * maxopd stores the maximum length of data AND options 2727 * in a segment; maxseg is the amount of data in a normal --- 101 unchanged lines hidden (view full) --- 2829 2830 if (isipv6) 2831 rt = tcp_rtlookup6(&tp->t_inpcb->inp_inc); 2832 else 2833 rt = tcp_rtlookup(&tp->t_inpcb->inp_inc); 2834 if (rt == NULL) 2835 return (isipv6 ? tcp_v6mssdflt : tcp_mssdflt); 2836 | 2724 if (!in_localaddr(inp->inp_faddr)) 2725 mss = min(mss, tcp_mssdflt); 2726 } 2727 } 2728 mss = min(mss, offer); 2729 /* 2730 * maxopd stores the maximum length of data AND options 2731 * in a segment; maxseg is the amount of data in a normal --- 101 unchanged lines hidden (view full) --- 2833 2834 if (isipv6) 2835 rt = tcp_rtlookup6(&tp->t_inpcb->inp_inc); 2836 else 2837 rt = tcp_rtlookup(&tp->t_inpcb->inp_inc); 2838 if (rt == NULL) 2839 return (isipv6 ? tcp_v6mssdflt : tcp_mssdflt); 2840 |
2841#ifdef INET6 2842 return (isipv6 ? IN6_LINKMTU(rt->rt_ifp) : 2843 rt->rt_ifp->if_mtu - min_protoh); 2844#else |
|
2837 return (rt->rt_ifp->if_mtu - min_protoh); | 2845 return (rt->rt_ifp->if_mtu - min_protoh); |
2846#endif |
|
2838} 2839 2840 2841/* 2842 * On a partial ack arrives, force the retransmission of the 2843 * next unacknowledged segment. Do not clear tp->t_dupacks. 2844 * By setting snd_nxt to ti_ack, this forces retransmission timer to 2845 * be started again. --- 178 unchanged lines hidden --- | 2847} 2848 2849 2850/* 2851 * On a partial ack arrives, force the retransmission of the 2852 * next unacknowledged segment. Do not clear tp->t_dupacks. 2853 * By setting snd_nxt to ti_ack, this forces retransmission timer to 2854 * be started again. --- 178 unchanged lines hidden --- |