diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-12-03 09:49:16 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2015-12-03 09:49:16 +0000 |
commit | efd99342372c4c161715d0228b95d1fa15518a15 (patch) | |
tree | 72b561db3ea56a4f10c479bc7bb95c576f842521 /sys | |
parent | ad0b1331f86a0251260c61dfab1c48c4e299cdff (diff) |
Rename pf_unlink_state() to pf_remove_state() so the name does not
collide with the statekey to inp unlinking.
OK sashan@ mpi@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/if_pfsync.c | 8 | ||||
-rw-r--r-- | sys/net/pf.c | 20 | ||||
-rw-r--r-- | sys/net/pf_ioctl.c | 8 | ||||
-rw-r--r-- | sys/net/pfvar.h | 6 | ||||
-rw-r--r-- | sys/netinet/in_pcb.c | 6 |
5 files changed, 24 insertions, 24 deletions
diff --git a/sys/net/if_pfsync.c b/sys/net/if_pfsync.c index 2b7fab26bd6..5e70099b07b 100644 --- a/sys/net/if_pfsync.c +++ b/sys/net/if_pfsync.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_pfsync.c,v 1.222 2015/11/10 06:36:14 dlg Exp $ */ +/* $OpenBSD: if_pfsync.c,v 1.223 2015/12/03 09:49:15 bluhm Exp $ */ /* * Copyright (c) 2002 Michael Shalayeff @@ -752,7 +752,7 @@ pfsync_in_clr(caddr_t buf, int len, int count, int flags) if (st->creatorid == creatorid && ((kif && st->kif == kif) || !kif)) { SET(st->state_flags, PFSTATE_NOSYNC); - pf_unlink_state(st); + pf_remove_state(st); } } } @@ -1056,7 +1056,7 @@ pfsync_in_del(caddr_t buf, int len, int count, int flags) continue; } SET(st->state_flags, PFSTATE_NOSYNC); - pf_unlink_state(st); + pf_remove_state(st); } return (0); @@ -1083,7 +1083,7 @@ pfsync_in_del_c(caddr_t buf, int len, int count, int flags) } SET(st->state_flags, PFSTATE_NOSYNC); - pf_unlink_state(st); + pf_remove_state(st); } return (0); diff --git a/sys/net/pf.c b/sys/net/pf.c index f392c8dbdad..1dfc09e5b46 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.954 2015/12/02 16:00:42 sashan Exp $ */ +/* $OpenBSD: pf.c,v 1.955 2015/12/03 09:49:15 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -668,7 +668,7 @@ pf_state_key_attach(struct pf_state_key *sk, struct pf_state *s, int idx) si->s->dst.state >= TCPS_FIN_WAIT_2) { si->s->src.state = si->s->dst.state = TCPS_CLOSED; - /* unlink late or sks can go away */ + /* remove late or sks can go away */ olds = si->s; } else { if (pf_status.debug >= LOG_NOTICE) { @@ -713,7 +713,7 @@ pf_state_key_attach(struct pf_state_key *sk, struct pf_state *s, int idx) TAILQ_INSERT_HEAD(&s->key[idx]->states, si, entry); if (olds) - pf_unlink_state(olds); + pf_remove_state(olds); return (0); } @@ -1249,7 +1249,7 @@ pf_src_tree_remove_state(struct pf_state *s) /* callers should be at splsoftnet */ void -pf_unlink_state(struct pf_state *cur) +pf_remove_state(struct pf_state *cur) { splsoftassert(IPL_SOFTNET); @@ -1280,14 +1280,14 @@ pf_unlink_state(struct pf_state *cur) } void -pf_unlink_divert_state(struct pf_state_key *sk) +pf_remove_divert_state(struct pf_state_key *sk) { struct pf_state_item *si; 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); + pf_remove_state(si->s); break; } } @@ -1349,15 +1349,15 @@ pf_purge_expired_states(u_int32_t maxcheck) next = TAILQ_NEXT(cur, entry_list); if (cur->timeout == PFTM_UNLINKED) { - /* free unlinked state */ + /* free removed state */ if (! locked) { rw_enter_write(&pf_consistency_lock); locked = 1; } pf_free_state(cur); } else if (pf_state_expires(cur) <= time_uptime) { - /* unlink and free expired state */ - pf_unlink_state(cur); + /* remove and free expired state */ + pf_remove_state(cur); if (! locked) { rw_enter_write(&pf_consistency_lock); locked = 1; @@ -4346,7 +4346,7 @@ pf_test_state(struct pf_pdesc *pd, struct pf_state **state, u_short *reason) } /* XXX make sure it's the same direction ?? */ (*state)->src.state = (*state)->dst.state = TCPS_CLOSED; - pf_unlink_state(*state); + pf_remove_state(*state); *state = NULL; pd->m->m_pkthdr.pf.inp = inp; return (PF_DROP); diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index af262870907..a34188bf33c 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.294 2015/11/24 13:37:16 mpi Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.295 2015/12/03 09:49:15 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1430,7 +1430,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) /* don't send out individual delete messages */ SET(s->state_flags, PFSTATE_NOSYNC); #endif /* NPFSYNC > 0 */ - pf_unlink_state(s); + pf_remove_state(s); killed++; } } @@ -1453,7 +1453,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) if (psk->psk_pfcmp.creatorid == 0) psk->psk_pfcmp.creatorid = pf_status.hostid; if ((s = pf_find_state_byid(&psk->psk_pfcmp))) { - pf_unlink_state(s); + pf_remove_state(s); psk->psk_killed = 1; } break; @@ -1499,7 +1499,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) !strcmp(psk->psk_label, s->rule.ptr->label))) && (!psk->psk_ifname[0] || !strcmp(psk->psk_ifname, s->kif->pfik_name))) { - pf_unlink_state(s); + pf_remove_state(s); killed++; } } diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index cd02361a5bf..ff4fa49f15c 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.424 2015/12/02 16:00:42 sashan Exp $ */ +/* $OpenBSD: pfvar.h,v 1.425 2015/12/03 09:49:15 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1669,8 +1669,8 @@ extern struct pool pf_state_scrub_pl; extern void pf_purge_thread(void *); extern void pf_purge_expired_src_nodes(int); extern void pf_purge_expired_states(u_int32_t); -extern void pf_unlink_state(struct pf_state *); -extern void pf_unlink_divert_state(struct pf_state_key *); +extern void pf_remove_state(struct pf_state *); +extern void pf_remove_divert_state(struct pf_state_key *); extern void pf_free_state(struct pf_state *); extern int pf_state_insert(struct pfi_kif *, struct pf_state_key **, diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c index fdc063a92c7..18541164858 100644 --- a/sys/netinet/in_pcb.c +++ b/sys/netinet/in_pcb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: in_pcb.c,v 1.190 2015/12/02 22:13:44 vgross Exp $ */ +/* $OpenBSD: in_pcb.c,v 1.191 2015/12/03 09:49:15 bluhm Exp $ */ /* $NetBSD: in_pcb.c,v 1.25 1996/02/13 23:41:53 christos Exp $ */ /* @@ -528,8 +528,8 @@ in_pcbdetach(struct inpcb *inp) ip_freemoptions(inp->inp_moptions); #if NPF > 0 if (inp->inp_pf_sk) { - pf_unlink_divert_state(inp->inp_pf_sk); - /* pf_unlink_divert_state() may have detached the state */ + pf_remove_divert_state(inp->inp_pf_sk); + /* pf_remove_divert_state() may have detached the state */ if (inp->inp_pf_sk) inp->inp_pf_sk->inp = NULL; } |