From owner-svn-src-head@FreeBSD.ORG Tue May 31 15:05:29 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 980811065673; Tue, 31 May 2011 15:05:29 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 886EB8FC0A; Tue, 31 May 2011 15:05:29 +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 p4VF5TMn028606; Tue, 31 May 2011 15:05:29 GMT (envelope-from bz@svn.freebsd.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id p4VF5Ta8028602; Tue, 31 May 2011 15:05:29 GMT (envelope-from bz@svn.freebsd.org) Message-Id: <201105311505.p4VF5Ta8028602@svn.freebsd.org> From: "Bjoern A. Zeeb" Date: Tue, 31 May 2011 15:05:29 +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: r222529 - head/sys/contrib/pf/net X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 31 May 2011 15:05:29 -0000 Author: bz Date: Tue May 31 15:05:29 2011 New Revision: 222529 URL: http://svn.freebsd.org/changeset/base/222529 Log: Remove some further INET related symbols from pf to allow the module to not only compile bu load as well for testing with IPv6-only kernels. For the moment we ignore the csum change in pf_ioctl.c given the pending update to pf45. Reported by: dru Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems MFC after: 20 days Modified: head/sys/contrib/pf/net/pf.c head/sys/contrib/pf/net/pf_ioctl.c head/sys/contrib/pf/net/pf_norm.c Modified: head/sys/contrib/pf/net/pf.c ============================================================================== --- head/sys/contrib/pf/net/pf.c Tue May 31 15:02:30 2011 (r222528) +++ head/sys/contrib/pf/net/pf.c Tue May 31 15:05:29 2011 (r222529) @@ -6132,9 +6132,11 @@ pf_routable(struct pf_addr *addr, sa_fam #ifdef __FreeBSD__ /* XXX MRT not always INET */ /* stick with table 0 though */ +#ifdef INET if (af == AF_INET) in_rtalloc_ign((struct route *)&ro, 0, 0); else +#endif rtalloc_ign((struct route *)&ro, 0); #else /* ! __FreeBSD__ */ rtalloc_noclone((struct route *)&ro, NO_CLONING); @@ -6214,9 +6216,11 @@ pf_rtlabel_match(struct pf_addr *addr, s # ifdef RTF_PRCLONING rtalloc_ign((struct route *)&ro, (RTF_CLONING|RTF_PRCLONING)); # else /* !RTF_PRCLONING */ +#ifdef INET if (af == AF_INET) in_rtalloc_ign((struct route *)&ro, 0, 0); else +#endif rtalloc_ign((struct route *)&ro, 0); # endif #else /* ! __FreeBSD__ */ @@ -6789,11 +6793,13 @@ pf_check_proto_cksum(struct mbuf *m, int KMOD_UDPSTAT_INC(udps_badsum); break; } +#ifdef INET case IPPROTO_ICMP: { KMOD_ICMPSTAT_INC(icps_checksum); break; } +#endif #ifdef INET6 case IPPROTO_ICMPV6: { @@ -6889,9 +6895,11 @@ pf_check_proto_cksum(struct mbuf *m, int case IPPROTO_UDP: KMOD_UDPSTAT_INC(udps_badsum); break; +#ifdef INET case IPPROTO_ICMP: KMOD_ICMPSTAT_INC(icps_checksum); break; +#endif #ifdef INET6 case IPPROTO_ICMPV6: KMOD_ICMP6STAT_INC(icp6s_checksum); Modified: head/sys/contrib/pf/net/pf_ioctl.c ============================================================================== --- head/sys/contrib/pf/net/pf_ioctl.c Tue May 31 15:02:30 2011 (r222528) +++ head/sys/contrib/pf/net/pf_ioctl.c Tue May 31 15:05:29 2011 (r222529) @@ -3735,9 +3735,12 @@ pf_check6_out(void *arg, struct mbuf **m */ int chk; - /* We need a proper CSUM befor we start (s. OpenBSD ip_output) */ + /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { +#ifdef INET + /* XXX-BZ copy&paste error from r126261? */ in_delayed_cksum(*m); +#endif (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; } chk = pf_test6(PF_OUT, ifp, m, NULL, inp); Modified: head/sys/contrib/pf/net/pf_norm.c ============================================================================== --- head/sys/contrib/pf/net/pf_norm.c Tue May 31 15:02:30 2011 (r222528) +++ head/sys/contrib/pf/net/pf_norm.c Tue May 31 15:05:29 2011 (r222529) @@ -949,6 +949,7 @@ pf_fragcache(struct mbuf **m0, struct ip return (NULL); } +#ifdef INET int pf_normalize_ip(struct mbuf **m0, int dir, struct pfi_kif *kif, u_short *reason, struct pf_pdesc *pd) @@ -1198,6 +1199,7 @@ pf_normalize_ip(struct mbuf **m0, int di return (PF_DROP); } +#endif #ifdef INET6 int