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
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to