From owner-svn-src-user@FreeBSD.ORG Tue Oct 13 17:41:46 2009 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7978C106568B; Tue, 13 Oct 2009 17:41:46 +0000 (UTC) (envelope-from eri@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4FFB48FC1C; Tue, 13 Oct 2009 17:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n9DHfkPj011911; Tue, 13 Oct 2009 17:41:46 GMT (envelope-from eri@svn.freebsd.org) Received: (from eri@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n9DHfk5C011909; Tue, 13 Oct 2009 17:41:46 GMT (envelope-from eri@svn.freebsd.org) Message-Id: <200910131741.n9DHfk5C011909@svn.freebsd.org> From: Ermal Luçi Date: Tue, 13 Oct 2009 17:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r198037 - user/eri/pf45/head/sys/contrib/pf/net X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 13 Oct 2009 17:41:46 -0000 Author: eri Date: Tue Oct 13 17:41:46 2009 New Revision: 198037 URL: http://svn.freebsd.org/changeset/base/198037 Log: Use M_SKIP_FIREWALL for FreeBSD. Modified: user/eri/pf45/head/sys/contrib/pf/net/pf.c Modified: user/eri/pf45/head/sys/contrib/pf/net/pf.c ============================================================================== --- user/eri/pf45/head/sys/contrib/pf/net/pf.c Tue Oct 13 17:33:55 2009 (r198036) +++ user/eri/pf45/head/sys/contrib/pf/net/pf.c Tue Oct 13 17:41:46 2009 (r198037) @@ -2158,19 +2158,19 @@ pf_send_tcp(const struct pf_rule *r, sa_ struct pf_mtag *pf_mtag; #endif - #ifdef __FreeBSD__ +#ifdef __FreeBSD__ KASSERT( - #ifdef INET +#ifdef INET af == AF_INET - #else +#else 0 - #endif +#endif || - #ifdef INET6 +#ifdef INET6 af == AF_INET6 - #else +#else 0 - #endif +#endif , ("Unsupported AF %d", af)); len = 0; th = NULL; @@ -2206,7 +2206,7 @@ pf_send_tcp(const struct pf_rule *r, sa_ return; #ifdef __FreeBSD__ #ifdef MAC - mac_netinet_firewall_send(m); + mac_netinet_firewall_send(m); #endif if ((pf_mtag = pf_get_mtag(m)) == NULL) { m_freem(m); @@ -6338,10 +6338,10 @@ pf_get_divert(struct mbuf *m) #ifdef INET int - #ifdef __FreeBSD__ - pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, - struct ether_header *eh, struct inpcb *inp) - #else +#ifdef __FreeBSD__ +pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, + struct ether_header *eh, struct inpcb *inp) +#else pf_test(int dir, struct ifnet *ifp, struct mbuf **m0, struct ether_header *eh) #endif @@ -6665,7 +6665,7 @@ done: s->nat_rule.ptr->action == PF_BINAT) && (ntohl(pd.dst->v4.s_addr) >> IN_CLASSA_NSHIFT) == IN_LOOPBACKNET) #ifdef __FreeBSD__ - pd.pf_mtag->flags |= PF_TAG_TRANSLATE_LOCALHOST; + m->m_flags |= M_SKIP_FIREWALL; #else m->m_pkthdr.pf.flags |= PF_TAG_TRANSLATE_LOCALHOST; #endif @@ -7151,7 +7151,7 @@ done: s->nat_rule.ptr->action == PF_BINAT) && IN6_IS_ADDR_LOOPBACK(&pd.dst->v6)) #ifdef __FreeBSD__ - pd.pf_mtag->flags |= PF_TAG_TRANSLATE_LOCALHOST; + m->m_flags |= M_SKIP_FIREWALL; #else m->m_pkthdr.pf.flags |= PF_TAG_TRANSLATE_LOCALHOST; #endif