From owner-p4-projects@FreeBSD.ORG Tue Apr 22 22:37:30 2008 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id D4F201065673; Tue, 22 Apr 2008 22:37:29 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97099106566B for ; Tue, 22 Apr 2008 22:37:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 920238FC20 for ; Tue, 22 Apr 2008 22:37:29 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id m3MMbTIO014686 for ; Tue, 22 Apr 2008 22:37:29 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id m3MMbTiW014684 for perforce@freebsd.org; Tue, 22 Apr 2008 22:37:29 GMT (envelope-from jb@freebsd.org) Date: Tue, 22 Apr 2008 22:37:29 GMT Message-Id: <200804222237.m3MMbTiW014684@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 140431 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Apr 2008 22:37:30 -0000 http://perforce.freebsd.org/chv.cgi?CH=140431 Change 140431 by jb@freebsd3 on 2008/04/22 22:37:12 IF7 Affected files ... .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/devid.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/libintl.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/mnttab.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/priv.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/solaris.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/zone.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/lib/libumem/umem.c#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/lib/libumem/umem.h#3 integrate .. //depot/projects/dtrace7/src/cddl/compat/opensolaris/misc/mkdirp.c#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/kern/opensolaris_string.c#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/rpc/xdr.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/acl.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/byteorder.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/callb.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/dkio.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/mntent.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/sysmacros.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/taskq.h#3 integrate .. //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/taskq_impl.h#3 integrate .. //depot/projects/dtrace7/src/sys/dev/acpi_support/acpi_asus.c#3 integrate .. //depot/projects/dtrace7/src/sys/net/bpf.c#2 integrate .. //depot/projects/dtrace7/src/sys/netinet/ip_input.c#3 integrate .. //depot/projects/dtrace7/src/sys/netinet/ip_ipsec.c#3 integrate .. //depot/projects/dtrace7/src/sys/netinet/ip_ipsec.h#2 integrate .. //depot/projects/dtrace7/src/sys/netinet/tcp_var.h#4 integrate Differences ... ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/devid.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/cddl/compat/opensolaris/include/devid.h,v 1.3.2.2 2008/04/22 09:21:27 jb Exp $ */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/libintl.h#3 (text+ko) ==== @@ -1,3 +1,5 @@ +/* $FreeBSD: src/cddl/compat/opensolaris/include/libintl.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ + #ifndef _LIBINTL_H_ #define _LIBINTL_H_ ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/mnttab.h#3 (text+ko) ==== @@ -1,3 +1,5 @@ +/* $FreeBSD: src/cddl/compat/opensolaris/include/mnttab.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ + #ifndef _OPENSOLARIS_MNTTAB_H_ #define _OPENSOLARIS_MNTTAB_H_ ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/priv.h#3 (text+ko) ==== @@ -1,3 +1,5 @@ +/* $FreeBSD: src/cddl/compat/opensolaris/include/priv.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ + #ifndef _OPENSOLARIS_PRIV_H_ #define _OPENSOLARIS_PRIV_H_ ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/solaris.h#3 (text+ko) ==== @@ -1,3 +1,5 @@ +/* $FreeBSD: src/cddl/compat/opensolaris/include/solaris.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ + #ifndef _SOLARIS_H_ #define _SOLARIS_H_ ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/include/zone.h#3 (text+ko) ==== @@ -1,3 +1,5 @@ +/* $FreeBSD: src/cddl/compat/opensolaris/include/zone.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ + #ifndef _ZONE_H_ #define _ZONE_H_ ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/lib/libumem/umem.c#3 (text+ko) ==== @@ -17,6 +17,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/cddl/compat/opensolaris/lib/libumem/umem.c,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ /* * Copyright 2006 Ricardo Correia. All rights reserved. ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/lib/libumem/umem.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/cddl/compat/opensolaris/lib/libumem/umem.h,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/cddl/compat/opensolaris/misc/mkdirp.c#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/cddl/compat/opensolaris/misc/mkdirp.c,v 1.2.2.2 2008/04/22 09:21:28 jb Exp $ */ /* Copyright (c) 1988 AT&T */ ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/kern/opensolaris_string.c#3 (text+ko) ==== @@ -17,6 +17,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/kern/opensolaris_string.c,v 1.3.2.2 2008/04/22 09:21:28 jb Exp $ */ /* * Copyright 2007 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/rpc/xdr.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/rpc/xdr.h,v 1.3.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/acl.h#3 (text+ko) ==== @@ -17,6 +17,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/acl.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/byteorder.h#3 (text+ko) ==== @@ -17,6 +17,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/byteorder.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/callb.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/callb.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/dkio.h#3 (text+ko) ==== @@ -17,6 +17,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/dkio.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2006 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/mntent.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/mntent.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2005 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/sysmacros.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/sysmacros.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */ /* All Rights Reserved */ ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/taskq.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/taskq.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/cddl/compat/opensolaris/sys/taskq_impl.h#3 (text+ko) ==== @@ -18,6 +18,8 @@ * information: Portions Copyright [yyyy] [name of copyright owner] * * CDDL HEADER END + * + * $FreeBSD: src/sys/cddl/compat/opensolaris/sys/taskq_impl.h,v 1.2.2.2 2008/04/22 09:21:29 jb Exp $ */ /* * Copyright 2004 Sun Microsystems, Inc. All rights reserved. ==== //depot/projects/dtrace7/src/sys/dev/acpi_support/acpi_asus.c#3 (text+ko) ==== @@ -25,7 +25,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.30.2.1 2008/04/14 16:50:55 jkim Exp $"); +__FBSDID("$FreeBSD: src/sys/dev/acpi_support/acpi_asus.c,v 1.30.2.2 2008/04/22 12:44:39 rpaulo Exp $"); /* * Driver for extra ACPI-controlled gadgets (hotkeys, leds, etc) found on @@ -375,6 +375,20 @@ { .name = NULL } }; +/* + * EeePC have an Asus ASUS010 gadget interface, + * but they can't be probed quite the same way as Asus laptops. + */ +static struct acpi_asus_model acpi_eeepc_models[] = { + { + .name = "EEE", + .brn_get = "\\_SB.ATKD.PBLG", + .brn_set = "\\_SB.ATKD.PBLS" + }, + + { .name = NULL } +}; + static struct { char *name; char *description; @@ -444,13 +458,17 @@ ACPI_BUFFER Buf; ACPI_OBJECT Arg, *Obj; ACPI_OBJECT_LIST Args; - static char *asus_ids[] = { "ATK0100", NULL }; + static char *asus_ids[] = { "ATK0100", "ASUS010", NULL }; + char *rstr; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); - if (acpi_disabled("asus") || - ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids) == NULL) + if (acpi_disabled("asus")) + return (ENXIO); + rstr = ACPI_ID_PROBE(device_get_parent(dev), dev, asus_ids); + if (rstr == NULL) { return (ENXIO); + } sc = device_get_softc(dev); sc->dev = dev; @@ -489,6 +507,14 @@ AcpiOsFree(Buf.Pointer); return (0); } + + /* if EeePC */ + if (strncmp("ASUS010", rstr, 7) == 0) { + sc->model = &acpi_eeepc_models[0]; + device_set_desc(dev, "ASUS EeePC"); + AcpiOsFree(Buf.Pointer); + return (0); + } } sb = sbuf_new(NULL, NULL, 0, SBUF_AUTOEXTEND); ==== //depot/projects/dtrace7/src/sys/net/bpf.c#2 (text+ko) ==== @@ -33,7 +33,7 @@ * * @(#)bpf.c 8.4 (Berkeley) 1/9/95 * - * $FreeBSD: src/sys/net/bpf.c,v 1.181.2.1 2007/10/20 15:09:24 csjp Exp $ + * $FreeBSD: src/sys/net/bpf.c,v 1.181.2.3 2008/04/22 15:53:07 jkim Exp $ */ #include "opt_bpf.h" @@ -85,8 +85,6 @@ #define PRINET 26 /* interruptible */ -#define M_SKIP_BPF M_SKIP_FIREWALL - /* * bpf_iflist is a list of BPF interface structures, each corresponding to a * specific DLT. The same network interface might have several BPF interface @@ -644,9 +642,9 @@ mc = m_dup(m, M_DONTWAIT); if (mc != NULL) mc->m_pkthdr.rcvif = ifp; - /* XXX Do not return the same packet twice. */ + /* Set M_PROMISC for outgoing packets to be discarded. */ if (d->bd_direction == BPF_D_INOUT) - m->m_flags |= M_SKIP_BPF; + m->m_flags |= M_PROMISC; } else mc = NULL; @@ -1332,9 +1330,9 @@ } } -#define BPF_CHECK_DIRECTION(d, m) \ - if (((d)->bd_direction == BPF_D_IN && (m)->m_pkthdr.rcvif == NULL) || \ - ((d)->bd_direction == BPF_D_OUT && (m)->m_pkthdr.rcvif != NULL)) +#define BPF_CHECK_DIRECTION(d, i) \ + (((d)->bd_direction == BPF_D_IN && (i) == NULL) || \ + ((d)->bd_direction == BPF_D_OUT && (i) != NULL)) /* * Incoming linkage from device drivers, when packet is in an mbuf chain. @@ -1347,8 +1345,9 @@ int gottime; struct timeval tv; - if (m->m_flags & M_SKIP_BPF) { - m->m_flags &= ~M_SKIP_BPF; + /* Skip outgoing duplicate packets. */ + if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { + m->m_flags &= ~M_PROMISC; return; } @@ -1358,7 +1357,7 @@ BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - BPF_CHECK_DIRECTION(d, m) + if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif)) continue; BPFD_LOCK(d); ++d->bd_rcount; @@ -1401,8 +1400,9 @@ int gottime; struct timeval tv; - if (m->m_flags & M_SKIP_BPF) { - m->m_flags &= ~M_SKIP_BPF; + /* Skip outgoing duplicate packets. */ + if ((m->m_flags & M_PROMISC) != 0 && m->m_pkthdr.rcvif == NULL) { + m->m_flags &= ~M_PROMISC; return; } @@ -1421,7 +1421,7 @@ BPFIF_LOCK(bp); LIST_FOREACH(d, &bp->bif_dlist, bd_next) { - BPF_CHECK_DIRECTION(d, m) + if (BPF_CHECK_DIRECTION(d, m->m_pkthdr.rcvif)) continue; BPFD_LOCK(d); ++d->bd_rcount; ==== //depot/projects/dtrace7/src/sys/netinet/ip_input.c#3 (text+ko) ==== @@ -30,7 +30,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/ip_input.c,v 1.332.2.1 2007/12/19 08:10:30 guido Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/ip_input.c,v 1.332.2.2 2008/04/22 12:02:55 bz Exp $"); #include "opt_bootp.h" #include "opt_ipfw.h" @@ -1249,6 +1249,7 @@ struct in_ifaddr *ia = NULL; struct mbuf *mcopy; struct in_addr dest; + struct route ro; int error, type = 0, code = 0, mtu = 0; if (m->m_flags & (M_BCAST|M_MCAST) || in_canforward(ip->ip_dst) == 0) { @@ -1326,7 +1327,6 @@ dest.s_addr = 0; if (!srcrt && ipsendredirects && ia->ia_ifp == m->m_pkthdr.rcvif) { struct sockaddr_in *sin; - struct route ro; struct rtentry *rt; bzero(&ro, sizeof(ro)); @@ -1358,7 +1358,20 @@ RTFREE(rt); } - error = ip_output(m, NULL, NULL, IP_FORWARDING, NULL, NULL); + /* + * Try to cache the route MTU from ip_output so we can consider it for + * the ICMP_UNREACH_NEEDFRAG "Next-Hop MTU" field described in RFC1191. + */ + bzero(&ro, sizeof(ro)); + rtalloc_ign(&ro, RTF_CLONING); + + error = ip_output(m, NULL, &ro, IP_FORWARDING, NULL, NULL); + + if (error == EMSGSIZE && ro.ro_rt) + mtu = ro.ro_rt->rt_rmx.rmx_mtu; + if (ro.ro_rt) + RTFREE(ro.ro_rt); + if (error) ipstat.ips_cantforward++; else { @@ -1394,14 +1407,23 @@ code = ICMP_UNREACH_NEEDFRAG; #ifdef IPSEC - mtu = ip_ipsec_mtu(m); + /* + * If IPsec is configured for this path, + * override any possibly mtu value set by ip_output. + */ + mtu = ip_ipsec_mtu(m, mtu); #endif /* IPSEC */ /* + * If the MTU was set before make sure we are below the + * interface MTU. * If the MTU wasn't set before use the interface mtu or * fall back to the next smaller mtu step compared to the * current packet size. */ - if (mtu == 0) { + if (mtu != 0) { + if (ia != NULL) + mtu = min(mtu, ia->ia_ifp->if_mtu); + } else { if (ia != NULL) mtu = ia->ia_ifp->if_mtu; else ==== //depot/projects/dtrace7/src/sys/netinet/ip_ipsec.c#3 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/netinet/ip_ipsec.c,v 1.8.2.1 2008/03/21 23:22:06 bz Exp $"); +__FBSDID("$FreeBSD: src/sys/netinet/ip_ipsec.c,v 1.8.2.2 2008/04/22 12:02:55 bz Exp $"); #include "opt_ipsec.h" @@ -191,9 +191,8 @@ * Returns MTU suggestion for ICMP needfrag reply. */ int -ip_ipsec_mtu(struct mbuf *m) +ip_ipsec_mtu(struct mbuf *m, int mtu) { - int mtu = 0; /* * If the packet is routed over IPsec tunnel, tell the * originator the tunnel MTU. ==== //depot/projects/dtrace7/src/sys/netinet/ip_ipsec.h#2 (text+ko) ==== @@ -26,7 +26,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $FreeBSD: src/sys/netinet/ip_ipsec.h,v 1.2 2007/08/05 16:16:15 bz Exp $ + * $FreeBSD: src/sys/netinet/ip_ipsec.h,v 1.2.2.1 2008/04/22 12:02:55 bz Exp $ */ #ifndef _NETINET_IP_IPSEC_H_ @@ -35,7 +35,7 @@ int ip_ipsec_filtertunnel(struct mbuf *); int ip_ipsec_fwd(struct mbuf *); int ip_ipsec_input(struct mbuf *); -int ip_ipsec_mtu(struct mbuf *); +int ip_ipsec_mtu(struct mbuf *, int); int ip_ipsec_output(struct mbuf **, struct inpcb *, int *, int *, struct route **, struct route *, struct sockaddr_in **, struct in_ifaddr **, struct ifnet **); ==== //depot/projects/dtrace7/src/sys/netinet/tcp_var.h#4 (text+ko) ==== @@ -27,7 +27,7 @@ * SUCH DAMAGE. * * @(#)tcp_var.h 8.4 (Berkeley) 5/24/95 - * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.157.2.2 2008/03/11 06:34:28 silby Exp $ + * $FreeBSD: src/sys/netinet/tcp_var.h,v 1.157.2.3 2008/04/22 11:57:04 bz Exp $ */ #ifndef _NETINET_TCP_VAR_H_ @@ -235,17 +235,14 @@ * to tcp_dooptions and tcp_addoptions. * The binary order of the to_flags is relevant for packing of the * options in tcp_addoptions. - * SACK should be kept after TS; some broken cable modem / router - * devices were found in the field that ignore SYN-ACKs with - * SACK before TS. */ struct tcpopt { u_long to_flags; /* which options are present */ #define TOF_MSS 0x0001 /* maximum segment size */ #define TOF_SCALE 0x0002 /* window scaling */ +#define TOF_SACKPERM 0x0004 /* SACK permitted */ #define TOF_TS 0x0010 /* timestamp */ -#define TOF_SIGNATURE 0x0020 /* TCP-MD5 signature option (RFC2385) */ -#define TOF_SACKPERM 0x0040 /* SACK permitted */ +#define TOF_SIGNATURE 0x0040 /* TCP-MD5 signature option (RFC2385) */ #define TOF_SACK 0x0080 /* Peer sent SACK option */ #define TOF_MAXOPT 0x0100 u_int32_t to_tsval; /* new timestamp */