From owner-svn-src-all@FreeBSD.ORG Fri Oct 21 11:11:18 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF5FC106564A; Fri, 21 Oct 2011 11:11:18 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEA558FC1A; Fri, 21 Oct 2011 11:11:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id p9LBBI8Q021798; Fri, 21 Oct 2011 11:11:18 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p9LBBInd021796; Fri, 21 Oct 2011 11:11:18 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201110211111.p9LBBInd021796@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 21 Oct 2011 11:11:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r226609 - head/sys/contrib/pf/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 21 Oct 2011 11:11:19 -0000 Author: glebius Date: Fri Oct 21 11:11:18 2011 New Revision: 226609 URL: http://svn.freebsd.org/changeset/base/226609 Log: In FreeBSD ip_output() expects ip_len and ip_off in host byte order PR: kern/159029 Modified: head/sys/contrib/pf/net/if_pfsync.c Modified: head/sys/contrib/pf/net/if_pfsync.c ============================================================================== --- head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 11:08:25 2011 (r226608) +++ head/sys/contrib/pf/net/if_pfsync.c Fri Oct 21 11:11:18 2011 (r226609) @@ -1959,7 +1959,11 @@ pfsyncioctl(struct ifnet *ifp, u_long cm ip->ip_hl = sizeof(sc->sc_template) >> 2; ip->ip_tos = IPTOS_LOWDELAY; /* len and id are set later */ +#ifdef __FreeBSD__ + ip->ip_off = IP_DF; +#else ip->ip_off = htons(IP_DF); +#endif ip->ip_ttl = PFSYNC_DFLTTL; ip->ip_p = IPPROTO_PFSYNC; ip->ip_src.s_addr = INADDR_ANY; @@ -2211,7 +2215,11 @@ pfsync_sendout(void) bcopy(&sc->sc_template, ip, sizeof(*ip)); offset = sizeof(*ip); +#ifdef __FreeBSD__ + ip->ip_len = m->m_pkthdr.len; +#else ip->ip_len = htons(m->m_pkthdr.len); +#endif ip->ip_id = htons(ip_randomid()); /* build the pfsync header */