svn commit: r240130 - projects/pf/head/sys/contrib/pf/net
Gleb Smirnoff
glebius at FreeBSD.org
Wed Sep 5 08:50:42 UTC 2012
Author: glebius
Date: Wed Sep 5 08:50:41 2012
New Revision: 240130
URL: http://svn.freebsd.org/changeset/base/240130
Log:
Whitespace cleanup.
Modified:
projects/pf/head/sys/contrib/pf/net/if_pflog.c
projects/pf/head/sys/contrib/pf/net/if_pfsync.c
projects/pf/head/sys/contrib/pf/net/if_pfsync.h
projects/pf/head/sys/contrib/pf/net/pf.c
projects/pf/head/sys/contrib/pf/net/pf_if.c
projects/pf/head/sys/contrib/pf/net/pf_ioctl.c
projects/pf/head/sys/contrib/pf/net/pf_norm.c
projects/pf/head/sys/contrib/pf/net/pf_table.c
projects/pf/head/sys/contrib/pf/net/pfvar.h
Modified: projects/pf/head/sys/contrib/pf/net/if_pflog.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/if_pflog.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/if_pflog.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -1,10 +1,10 @@
/* $OpenBSD: if_pflog.c,v 1.26 2007/10/18 21:58:18 mpf Exp $ */
/*
* The authors of this code are John Ioannidis (ji at tla.org),
- * Angelos D. Keromytis (kermit at csd.uch.gr) and
+ * Angelos D. Keromytis (kermit at csd.uch.gr) and
* Niels Provos (provos at physnet.uni-hamburg.de).
*
- * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
+ * This code was written by John Ioannidis for BSD/OS in Athens, Greece,
* in November 1995.
*
* Ported to OpenBSD and NetBSD, with additional transforms, in December 1996,
@@ -20,7 +20,7 @@
* Permission to use, copy, and modify this software with or without fee
* is hereby granted, provided that this entire notice is included in
* all copies of any software which is or includes a copy or
- * modification of this software.
+ * modification of this software.
* You may use this code under the GNU public license if you so wish. Please
* contribute changes back to the authors under this freer than GPL license
* so that we may further the use of strong encryption without limitations to
Modified: projects/pf/head/sys/contrib/pf/net/if_pfsync.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/if_pfsync.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/if_pfsync.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -363,7 +363,7 @@ pfsync_clone_destroy(struct ifnet *ifp)
*/
while (sc->sc_deferred > 0) {
struct pfsync_deferral *pd = TAILQ_FIRST(&sc->sc_deferrals);
-
+
TAILQ_REMOVE(&sc->sc_deferrals, pd, pd_entry);
sc->sc_deferred--;
if (callout_stop(&pd->pd_tmo)) {
@@ -1215,7 +1215,7 @@ pfsync_update_net_tdb(struct pfsync_tdb
/* check for invalid values */
if (ntohl(pt->spi) <= SPI_RESERVED_MAX ||
(pt->dst.sa.sa_family != AF_INET &&
- pt->dst.sa.sa_family != AF_INET6))
+ pt->dst.sa.sa_family != AF_INET6))
goto bad;
tdb = gettdb(pt->spi, &pt->dst, pt->sproto);
@@ -1648,7 +1648,7 @@ pfsync_sendout(int schedswi)
_IF_ENQUEUE(&sc->sc_ifp->if_snd, m);
else {
m_freem(m);
- sc->sc_ifp->if_snd.ifq_drops++;
+ sc->sc_ifp->if_snd.ifq_drops++;
}
if (schedswi)
swi_sched(V_pfsync_swi_cookie, 0);
Modified: projects/pf/head/sys/contrib/pf/net/if_pfsync.h
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/if_pfsync.h Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/if_pfsync.h Wed Sep 5 08:50:41 2012 (r240130)
@@ -182,7 +182,7 @@ struct pfsync_del_c {
u_int32_t creatorid;
} __packed;
-/*
+/*
* INS_F, DEL_F
*/
Modified: projects/pf/head/sys/contrib/pf/net/pf.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pf.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -194,8 +194,8 @@ static struct mtx pf_sendqueue_mtx;
struct pf_flush_entry {
SLIST_ENTRY(pf_flush_entry) next;
struct pf_addr addr;
- sa_family_t af;
- uint8_t dir;
+ sa_family_t af;
+ uint8_t dir;
struct pf_rule *rule; /* never dereferenced */
};
@@ -700,7 +700,7 @@ pf_initialize()
V_pf_state_z = uma_zcreate("pf states", sizeof(struct pf_state),
NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0);
V_pf_limits[PF_LIMIT_STATES].zone = V_pf_state_z;
- uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT);
+ uma_zone_set_max(V_pf_state_z, PFSTATE_HIWAT);
V_pf_state_key_z = uma_zcreate("pf state keys",
sizeof(struct pf_state_key), pf_state_key_ctor, NULL, NULL, NULL,
@@ -1289,7 +1289,7 @@ pf_intr(void *v)
}
free(pfse, M_PFTEMP);
}
-
+
CURVNET_RESTORE();
}
@@ -1376,7 +1376,7 @@ pf_state_expires(const struct pf_state *
return (0);
KASSERT(state->timeout != PFTM_UNLINKED,
("pf_state_expires: timeout == PFTM_UNLINKED"));
- KASSERT((state->timeout < PFTM_MAX),
+ KASSERT((state->timeout < PFTM_MAX),
("pf_state_expires: timeout > PFTM_MAX"));
timeout = state->rule.ptr->timeout[state->timeout];
if (!timeout)
@@ -1409,7 +1409,7 @@ pf_purge_expired_src_nodes()
for (i = 0, sh = V_pf_srchash; i <= V_pf_srchashmask; i++, sh++) {
PF_HASHROW_LOCK(sh);
- LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next)
+ LIST_FOREACH_SAFE(cur, &sh->nodes, entry, next)
if (cur->states <= 0 && cur->expire <= time_uptime) {
if (cur->rule.ptr != NULL)
cur->rule.ptr->src_nodes--;
@@ -5218,7 +5218,7 @@ pf_route(struct mbuf **m, struct pf_rule
#endif
m0->m_pkthdr.csum_flags &= ifp->if_hwassist;
- /*
+ /*
* If small enough for interface, or the interface will take
* care of the fragmentation for us, we can just send directly.
*/
@@ -5237,7 +5237,7 @@ pf_route(struct mbuf **m, struct pf_rule
/* Balk when DF bit is set or the interface didn't support TSO. */
if ((ip->ip_off & IP_DF) || (m0->m_pkthdr.csum_flags & CSUM_TSO)) {
- error = EMSGSIZE;
+ error = EMSGSIZE;
KMOD_IPSTAT_INC(ips_cantfrag);
if (r->rt != PF_DUPTO) {
icmp_error(m0, ICMP_UNREACH, ICMP_UNREACH_NEEDFRAG, 0,
@@ -5443,7 +5443,7 @@ pf_check_proto_cksum(struct mbuf *m, int
} else {
ip = mtod(m, struct ip *);
sum = in_pseudo(ip->ip_src.s_addr,
- ip->ip_dst.s_addr, htonl((u_short)len +
+ ip->ip_dst.s_addr, htonl((u_short)len +
m->m_pkthdr.csum_data + IPPROTO_TCP));
}
sum ^= 0xffff;
@@ -5574,7 +5574,7 @@ pf_test(int dir, struct ifnet *ifp, stru
if (m->m_flags & M_SKIP_FIREWALL)
return (PF_PASS);
-
+
if (m->m_pkthdr.len < (int)sizeof(struct ip)) {
action = PF_DROP;
REASON_SET(&reason, PFRES_SHORT);
Modified: projects/pf/head/sys/contrib/pf/net/pf_if.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf_if.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pf_if.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -219,7 +219,7 @@ pfi_kif_attach(struct pfi_kif *kif, cons
* time value have pfi_get_ifaces handle this case. In
* pfi_get_ifaces it uses time_second if it sees the time is 0.
*/
- kif->pfik_tzero = time_second > 1 ? time_second : 0;
+ kif->pfik_tzero = time_second > 1 ? time_second : 0;
TAILQ_INIT(&kif->pfik_dynaddrs);
RB_INSERT(pfi_ifhead, &V_pfi_ifs, kif);
Modified: projects/pf/head/sys/contrib/pf/net/pf_ioctl.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf_ioctl.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pf_ioctl.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -160,7 +160,7 @@ static void tag_unref(struct pf_tags *
#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x
struct cdev *pf_dev;
-
+
/*
* XXX - These are new and need to be checked when moveing to a new version
*/
@@ -168,7 +168,7 @@ static void pf_clear_states(void);
static int pf_clear_tables(void);
static void pf_clear_srcnodes(struct pf_src_node *);
static void pf_tbladdr_copyout(struct pf_addr_wrap *);
-
+
/*
* Wrapper functions for pfil(9) hooks
*/
@@ -184,7 +184,7 @@ static int pf_check6_in(void *arg, struc
static int pf_check6_out(void *arg, struct mbuf **m, struct ifnet *ifp,
int dir, struct inpcb *inp);
#endif
-
+
static int hook_pf(void);
static int dehook_pf(void);
static int shutdown_pf(void);
@@ -2311,7 +2311,7 @@ DIOCGETSTATES_full:
newpa->kif = NULL;
switch (newpa->addr.type) {
- case PF_ADDR_DYNIFTL:
+ case PF_ADDR_DYNIFTL:
error = pfi_dynaddr_setup(&newpa->addr,
pca->af);
break;
@@ -3423,7 +3423,7 @@ shutdown_pf(void)
int error = 0;
u_int32_t t[5];
char nn = '\0';
-
+
V_pf_status.running = 0;
do {
if ((error = pf_begin_rules(&t[0], PF_RULESET_SCRUB, &nn))
@@ -3434,22 +3434,22 @@ shutdown_pf(void)
if ((error = pf_begin_rules(&t[1], PF_RULESET_FILTER, &nn))
!= 0) {
DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: FILTER\n"));
- break; /* XXX: rollback? */
+ break; /* XXX: rollback? */
}
if ((error = pf_begin_rules(&t[2], PF_RULESET_NAT, &nn))
!= 0) {
DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: NAT\n"));
- break; /* XXX: rollback? */
+ break; /* XXX: rollback? */
}
if ((error = pf_begin_rules(&t[3], PF_RULESET_BINAT, &nn))
!= 0) {
DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: BINAT\n"));
- break; /* XXX: rollback? */
+ break; /* XXX: rollback? */
}
if ((error = pf_begin_rules(&t[4], PF_RULESET_RDR, &nn))
!= 0) {
DPFPRINTF(PF_DEBUG_MISC, ("shutdown_pf: RDR\n"));
- break; /* XXX: rollback? */
+ break; /* XXX: rollback? */
}
/* XXX: these should always succeed here */
@@ -3492,7 +3492,7 @@ pf_check_in(void *arg, struct mbuf **m,
* in network stack. OpenBSD's network stack have converted
* ip_len/ip_off to host byte order frist as FreeBSD.
* Now this is not true anymore , so we should convert back to network
- * byte order.
+ * byte order.
*/
struct ip *h = NULL;
int chk;
@@ -3529,7 +3529,7 @@ pf_check_out(void *arg, struct mbuf **m,
* in network stack. OpenBSD's network stack have converted
* ip_len/ip_off to host byte order frist as FreeBSD.
* Now this is not true anymore , so we should convert back to network
- * byte order.
+ * byte order.
*/
struct ip *h = NULL;
int chk;
@@ -3627,7 +3627,7 @@ hook_pf(void)
#endif
if (V_pf_pfil_hooked)
- return (0);
+ return (0);
#ifdef INET
pfh_inet = pfil_head_get(PFIL_TYPE_AF, AF_INET);
@@ -3781,7 +3781,7 @@ pf_modevent(module_t mod, int type, void
return (error);
}
-
+
static moduledata_t pf_mod = {
"pf",
pf_modevent,
Modified: projects/pf/head/sys/contrib/pf/net/pf_norm.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf_norm.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pf_norm.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -289,7 +289,7 @@ pf_free_fragment(struct pf_fragment *fra
LIST_FIRST(&frag->fr_queue)->fr_off >
frent->fr_end),
("! (LIST_EMPTY() || LIST_FIRST()->fr_off >"
- " frent->fr_end): %s", __func__));
+ " frent->fr_end): %s", __func__));
uma_zfree(V_pf_frent_z, frent);
}
@@ -671,8 +671,8 @@ pf_fragcache(struct mbuf **m0, struct ip
m_adj(*m0, (h->ip_hl << 2) -
(*m0)->m_pkthdr.len);
- KASSERT(((*m0)->m_next == NULL),
- ("(*m0)->m_next != NULL: %s",
+ KASSERT(((*m0)->m_next == NULL),
+ ("(*m0)->m_next != NULL: %s",
__FUNCTION__));
m_adj(m, precut + (h->ip_hl << 2));
m_cat(*m0, m);
@@ -1412,7 +1412,7 @@ pf_normalize_tcp_init(struct mbuf *m, in
u_int8_t hdr[60];
u_int8_t *opt;
- KASSERT((src->scrub == NULL),
+ KASSERT((src->scrub == NULL),
("pf_normalize_tcp_init: src->scrub != NULL"));
src->scrub = uma_zalloc(V_pf_state_scrub_z, M_ZERO | M_NOWAIT);
@@ -1511,7 +1511,7 @@ pf_normalize_tcp_stateful(struct mbuf *m
int copyback = 0;
int got_ts = 0;
- KASSERT((src->scrub || dst->scrub),
+ KASSERT((src->scrub || dst->scrub),
("%s: src->scrub && dst->scrub!", __func__));
/*
@@ -1663,7 +1663,7 @@ pf_normalize_tcp_stateful(struct mbuf *m
* measurement of RTT (round trip time) and PAWS
* (protection against wrapped sequence numbers). PAWS
* gives us a set of rules for rejecting packets on
- * long fat pipes (packets that were somehow delayed
+ * long fat pipes (packets that were somehow delayed
* in transit longer than the time it took to send the
* full TCP sequence space of 4Gb). We can use these
* rules and infer a few others that will let us treat
Modified: projects/pf/head/sys/contrib/pf/net/pf_table.c
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pf_table.c Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pf_table.c Wed Sep 5 08:50:41 2012 (r240130)
@@ -332,7 +332,7 @@ pfr_del_addrs(struct pfr_table *tbl, str
*
* one is O(N) and is better for large 'n'
* one is O(n*LOG(N)) and is better for small 'n'
- *
+ *
* following code try to decide which one is best.
*/
for (i = kt->pfrkt_cnt; i > 0; i >>= 1)
@@ -601,7 +601,7 @@ pfr_get_astats(struct pfr_table *tbl, st
w.pfrw_free = kt->pfrkt_cnt;
rv = kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree, &w);
if (!rv)
- rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
+ rv = kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
&w);
if (!rv && (flags & PFR_FLAG_CLSTATS)) {
pfr_enqueue_addrs(kt, &workq, NULL, 0);
@@ -708,11 +708,11 @@ pfr_enqueue_addrs(struct pfr_ktable *kt,
w.pfrw_op = sweep ? PFRW_SWEEP : PFRW_ENQUEUE;
w.pfrw_workq = workq;
if (kt->pfrkt_ip4 != NULL)
- if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree,
+ if (kt->pfrkt_ip4->rnh_walktree(kt->pfrkt_ip4, pfr_walktree,
&w))
printf("pfr_enqueue_addrs: IPv4 walktree failed.\n");
if (kt->pfrkt_ip6 != NULL)
- if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
+ if (kt->pfrkt_ip6->rnh_walktree(kt->pfrkt_ip6, pfr_walktree,
&w))
printf("pfr_enqueue_addrs: IPv6 walktree failed.\n");
if (naddr != NULL)
@@ -1924,7 +1924,7 @@ pfr_match_addr(struct pfr_ktable *kt, st
if (ke && KENTRY_RNF_ROOT(ke))
ke = NULL;
break;
- }
+ }
#endif /* INET6 */
}
match = (ke && !ke->pfrke_not);
@@ -1959,7 +1959,7 @@ pfr_update_stats(struct pfr_ktable *kt,
if (ke && KENTRY_RNF_ROOT(ke))
ke = NULL;
break;
- }
+ }
#endif /* INET */
#ifdef INET6
case AF_INET6:
Modified: projects/pf/head/sys/contrib/pf/net/pfvar.h
==============================================================================
--- projects/pf/head/sys/contrib/pf/net/pfvar.h Wed Sep 5 07:47:09 2012 (r240129)
+++ projects/pf/head/sys/contrib/pf/net/pfvar.h Wed Sep 5 08:50:41 2012 (r240130)
@@ -1711,7 +1711,7 @@ VNET_DECLARE(struct pf_altqqueue *, pf_
VNET_DECLARE(struct pf_altqqueue *, pf_altqs_inactive);
#define V_pf_altqs_inactive VNET(pf_altqs_inactive)
-VNET_DECLARE(struct pf_rulequeue, pf_unlinked_rules);
+VNET_DECLARE(struct pf_rulequeue, pf_unlinked_rules);
#define V_pf_unlinked_rules VNET(pf_unlinked_rules)
void pf_initialize(void);
More information about the svn-src-projects
mailing list