network - Fix pf build when no INET6
authorIlya Dryomov <idryomov@gmail.com>
Tue, 4 Jan 2011 12:13:27 +0000 (14:13 +0200)
committerIlya Dryomov <idryomov@gmail.com>
Tue, 4 Jan 2011 12:13:27 +0000 (14:13 +0200)
  * Definition of struct ip6_hdr is not included when no INET6, #ifdef
    out the code that uses it.

sys/net/pf/pf.c

index 1dc8d4d..770f5f8 100644 (file)
@@ -3477,10 +3477,12 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction,
                                h4 = mtod(m, struct ip *);
                                len = h4->ip_len - off;
                                break;
+#ifdef INET6
                        case AF_INET6:
                                h6 = mtod(m, struct ip6_hdr *);
                                len = h6->ip6_plen - (off - sizeof(*h6));
                                break;
+#endif
                        }
 
                        if (pf_check_proto_cksum(m, off, len, IPPROTO_TCP, af))