svn commit: r218857 - projects/pf/pf45/sys/contrib/pf/net
Bjoern A. Zeeb
bz at FreeBSD.org
Sat Feb 19 17:10:11 UTC 2011
Author: bz
Date: Sat Feb 19 17:10:10 2011
New Revision: 218857
URL: http://svn.freebsd.org/changeset/base/218857
Log:
Make compile without INET6 (not sure about w/o INET yet).
Modified:
projects/pf/pf45/sys/contrib/pf/net/pf.c
Modified: projects/pf/pf45/sys/contrib/pf/net/pf.c
==============================================================================
--- projects/pf/pf45/sys/contrib/pf/net/pf.c Sat Feb 19 17:09:26 2011 (r218856)
+++ projects/pf/pf45/sys/contrib/pf/net/pf.c Sat Feb 19 17:10:10 2011 (r218857)
@@ -3663,18 +3663,26 @@ pf_test_rule(struct pf_rule **rm, struct
!(th->th_flags & TH_RST)) {
u_int32_t ack = ntohl(th->th_seq) + pd->p_len;
int len = 0;
+#ifdef INET
struct ip *h4;
+#endif
+#ifdef INET6
struct ip6_hdr *h6;
+#endif
switch (af) {
+#ifdef INET
case AF_INET:
h4 = mtod(m, struct ip *);
len = ntohs(h4->ip_len) - off;
break;
+#endif
+#ifdef INET6
case AF_INET6:
h6 = mtod(m, struct ip6_hdr *);
len = ntohs(h6->ip6_plen) - (off - sizeof(*h6));
break;
+#endif
}
if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af))
More information about the svn-src-projects
mailing list