summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2011-01-05 17:36:55 +0000
committerbluhm <bluhm@openbsd.org>2011-01-05 17:36:55 +0000
commit04a3ab6a00adbc53691eedc588a78866bd5b31a8 (patch)
treed52180eedd18e1d501e181cf9fb8a210e680bee8
parent- remove unused headers wrapped in #if defined(DDB) (diff)
downloadwireguard-openbsd-04a3ab6a00adbc53691eedc588a78866bd5b31a8.tar.xz
wireguard-openbsd-04a3ab6a00adbc53691eedc588a78866bd5b31a8.zip
Remove mbuf ptr save dance in pf_test6(). It was a leftover with
misleading comment that did nothing. ok henning@ jsing@
-rw-r--r--sys/net/pf.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index f250e775803..f466609e2bd 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.716 2010/12/31 12:21:36 bluhm Exp $ */
+/* $OpenBSD: pf.c,v 1.717 2011/01/05 17:36:55 bluhm Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -6052,7 +6052,7 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
{
struct pfi_kif *kif;
u_short action, reason = 0, pflog = 0;
- struct mbuf *m = *m0, *n = NULL;
+ struct mbuf *m = *m0;
struct ip6_hdr *h;
struct pf_rule *a = NULL, *r = &pf_default_rule;
struct pf_state *s = NULL;
@@ -6117,9 +6117,6 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
}
#endif
- /* ptr to original, normalization can get us a new one */
- n = m;
-
if (pf_setup_pdesc(AF_INET6, dir, &pd, m, &action, &reason, kif, &a, &r,
&ruleset, &off, &hdrlen) == -1) {
if (action != PF_PASS)
@@ -6210,12 +6207,6 @@ pf_test6(int dir, struct ifnet *ifp, struct mbuf **m0,
}
done:
- /* if normalization got us a new mbuf, free original */
- if (n != m) {
- m_freem(n);
- n = NULL;
- }
-
/* handle dangerous IPv6 extension headers. */
if (action == PF_PASS && pd.rh_cnt &&
!((s && s->state_flags & PFSTATE_ALLOWOPTS) || r->allow_opts)) {