summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c12
-rw-r--r--sys/net/pf_norm.c4
2 files changed, 14 insertions, 2 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 9ededb5fbce..b62cac1a3fa 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.759 2011/07/04 18:12:51 bluhm Exp $ */
+/* $OpenBSD: pf.c,v 1.760 2011/07/05 19:53:43 mikeb Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -2755,8 +2755,10 @@ pf_test_rule(struct pf_rule **rm, struct pf_state **sm, int direction,
act.rtableid = pd->rdomain;
SLIST_INIT(&rules);
+#ifdef INET6
if (af == AF_INET6)
ifq = &ip6intrq;
+#endif
if (direction == PF_IN && pf_check_congestion(ifq)) {
REASON_SET(&reason, PFRES_CONGEST);
@@ -5714,6 +5716,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0,
*hdrlen = ICMP_MINLEN;
break;
}
+#ifdef INET6
case IPPROTO_ICMPV6: {
size_t icmp_hlen = sizeof(struct icmp6_hdr);
@@ -5738,6 +5741,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0,
*hdrlen = icmp_hlen;
break;
}
+#endif /* INET6 */
}
return (0);
}
@@ -6058,8 +6062,10 @@ done:
case PF_DIVERT:
if (af == AF_INET)
divert_packet(m, dir);
+#ifdef INET6
if (af == AF_INET6)
divert6_packet(m, dir);
+#endif
*m0 = NULL;
action = PF_PASS;
break;
@@ -6068,18 +6074,22 @@ done:
if (r->rt) {
if (af == AF_INET)
pf_route(m0, r, dir, kif->pfik_ifp, s);
+#ifdef INET6
if (af == AF_INET6)
pf_route6(m0, r, dir, kif->pfik_ifp, s);
+#endif
}
break;
}
+#ifdef INET6
/* if reassembled packet passed, create new fragments */
if (pf_status.reass && action == PF_PASS && *m0 && fwdir == PF_FWD) {
struct m_tag *mtag;
if ((mtag = m_tag_find(m, PACKET_TAG_PF_REASSEMBLED, NULL)))
action = pf_refragment6(m0, mtag, fwdir);
}
+#endif
return (action);
}
diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c
index 6d42f096422..25b85a518b1 100644
--- a/sys/net/pf_norm.c
+++ b/sys/net/pf_norm.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_norm.c,v 1.136 2011/07/03 18:08:02 claudio Exp $ */
+/* $OpenBSD: pf_norm.c,v 1.137 2011/07/05 19:53:43 mikeb Exp $ */
/*
* Copyright 2001 Niels Provos <provos@citi.umich.edu>
@@ -127,9 +127,11 @@ int pf_isfull_fragment(struct pf_fragment *);
struct mbuf *pf_join_fragment(struct pf_fragment *);
int pf_reassemble(struct mbuf **, struct ip *, int,
u_short *);
+#ifdef INET6
int pf_reassemble6(struct mbuf **, struct ip6_hdr *,
struct ip6_frag *, u_int16_t, u_int16_t, int,
u_short *);
+#endif
/* Globals */
struct pool pf_frent_pl, pf_frag_pl;