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 --- 16 unchanged lines hidden (view full) --- 25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * 29 * @(#)tcp_subr.c 8.2 (Berkeley) 5/24/95 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/netinet/tcp_subr.c 262763 2014-03-05 01:17:47Z glebius $"); |
34 35#include "opt_compat.h" 36#include "opt_inet.h" 37#include "opt_inet6.h" 38#include "opt_ipsec.h" 39#include "opt_tcpdebug.h" 40 41#include <sys/param.h> --- 1764 unchanged lines hidden (view full) --- 1806 dst = (struct sockaddr_in *)&sro.ro_dst; 1807 dst->sin_family = AF_INET; 1808 dst->sin_len = sizeof(*dst); 1809 dst->sin_addr = inc->inc_faddr; 1810 in_rtalloc_ign(&sro, 0, inc->inc_fibnum); 1811 } 1812 if (sro.ro_rt != NULL) { 1813 ifp = sro.ro_rt->rt_ifp; |
1814 if (sro.ro_rt->rt_mtu == 0) |
1815 maxmtu = ifp->if_mtu; 1816 else |
1817 maxmtu = min(sro.ro_rt->rt_mtu, ifp->if_mtu); |
1818 1819 /* Report additional interface capabilities. */ 1820 if (cap != NULL) { 1821 if (ifp->if_capenable & IFCAP_TSO4 && 1822 ifp->if_hwassist & CSUM_TSO) 1823 cap->ifcap |= CSUM_TSO; 1824 cap->tsomax = ifp->if_hw_tsomax; 1825 } --- 17 unchanged lines hidden (view full) --- 1843 if (!IN6_IS_ADDR_UNSPECIFIED(&inc->inc6_faddr)) { 1844 sro6.ro_dst.sin6_family = AF_INET6; 1845 sro6.ro_dst.sin6_len = sizeof(struct sockaddr_in6); 1846 sro6.ro_dst.sin6_addr = inc->inc6_faddr; 1847 in6_rtalloc_ign(&sro6, 0, inc->inc_fibnum); 1848 } 1849 if (sro6.ro_rt != NULL) { 1850 ifp = sro6.ro_rt->rt_ifp; |
1851 if (sro6.ro_rt->rt_mtu == 0) |
1852 maxmtu = IN6_LINKMTU(sro6.ro_rt->rt_ifp); 1853 else |
1854 maxmtu = min(sro6.ro_rt->rt_mtu, |
1855 IN6_LINKMTU(sro6.ro_rt->rt_ifp)); 1856 1857 /* Report additional interface capabilities. */ 1858 if (cap != NULL) { 1859 if (ifp->if_capenable & IFCAP_TSO6 && 1860 ifp->if_hwassist & CSUM_TSO) 1861 cap->ifcap |= CSUM_TSO; 1862 cap->tsomax = ifp->if_hw_tsomax; --- 554 unchanged lines hidden --- |