summaryrefslogtreecommitdiff
path: root/sys/netinet
diff options
context:
space:
mode:
authorAlexandr Nedvedicky <sashan@cvs.openbsd.org>2015-12-02 16:00:43 +0000
committerAlexandr Nedvedicky <sashan@cvs.openbsd.org>2015-12-02 16:00:43 +0000
commitf0a004ba8a87e9ca6577ba721ab81ac1a46cf63c (patch)
treea8d33e9375b3ff83dfa8d32b3fa4933ca6ffba69 /sys/netinet
parent094e8a89de1f9ba6603647dc94f67d877fe04eb7 (diff)
- hide PF internals to pf_unlink_divert_state() from in_pcb.c
OK mpi@, bluhm@
Diffstat (limited to 'sys/netinet')
-rw-r--r--sys/netinet/in_pcb.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 006fdf3fdb8..cb95f7208f9 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: in_pcb.c,v 1.188 2015/10/30 09:39:42 bluhm Exp $ */
+/* $OpenBSD: in_pcb.c,v 1.189 2015/12/02 16:00:42 sashan Exp $ */
/* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */
/*
@@ -507,17 +507,8 @@ in_pcbdetach(struct inpcb *inp)
ip_freemoptions(inp->inp_moptions);
#if NPF > 0
if (inp->inp_pf_sk) {
- struct pf_state_key *sk;
- struct pf_state_item *si;
-
- sk = inp->inp_pf_sk;
- TAILQ_FOREACH(si, &sk->states, entry)
- if (sk == si->s->key[PF_SK_STACK] && si->s->rule.ptr &&
- si->s->rule.ptr->divert.port) {
- pf_unlink_state(si->s);
- break;
- }
- /* pf_unlink_state() may have detached the state */
+ pf_unlink_divert_state(inp->inp_pf_sk);
+ /* pf_unlink_divert_state() may have detached the state */
if (inp->inp_pf_sk)
inp->inp_pf_sk->inp = NULL;
}