diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-19 22:31:29 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2002-05-19 22:31:29 +0000 |
commit | 2425f737eab3f9344009137f8ea11221c501b0d9 (patch) | |
tree | 7367121dcd38ffa7ad5b64de3f5fd624500174d3 /sys/net | |
parent | d56d91018f492cff4d0c24852fab8dfb226a17dd (diff) |
KNF again
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/pf.c | 6 | ||||
-rw-r--r-- | sys/net/pf_norm.c | 6 | ||||
-rw-r--r-- | sys/net/pfvar.h | 28 |
3 files changed, 20 insertions, 20 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index e41cf344e23..ee1f2893b38 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.208 2002/05/12 02:21:14 itojun Exp $ */ +/* $OpenBSD: pf.c,v 1.209 2002/05/19 22:31:28 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -940,7 +940,7 @@ pf_dynaddr_update(void *p) if (ad->undefined || memcmp(a, b, sizeof(*a))) { bcopy(b, a, sizeof(*a)); - changed = 1; + changed = 1; } } else if (ad->af == AF_INET6) { struct in6_addr *a, *b; @@ -951,7 +951,7 @@ pf_dynaddr_update(void *p) if (ad->undefined || memcmp(a, b, sizeof(*a))) { bcopy(b, a, sizeof(*a)); - changed = 1; + changed = 1; } } if (changed) diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c index 0ca14a4ffe2..759c899a300 100644 --- a/sys/net/pf_norm.c +++ b/sys/net/pf_norm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.26 2002/05/09 21:58:12 jasoni Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.27 2002/05/19 22:31:28 deraadt Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -589,7 +589,7 @@ pf_normalize_tcp(int dir, struct ifnet *ifp, struct mbuf *m, int ipoff, r = r->skip[PF_SKIP_AF]; else if (r->proto && r->proto != pd->proto) r = r->skip[PF_SKIP_PROTO]; - else if (r->src.noroute && pf_routable(pd->src, af)) + else if (r->src.noroute && pf_routable(pd->src, af)) r = TAILQ_NEXT(r, entries); else if (!r->src.noroute && !PF_AZERO(&r->src.mask, af) && !PF_MATCHA(r->src.not, &r->src.addr.addr, &r->src.mask, @@ -690,7 +690,7 @@ pf_normalize_tcpopt(struct pf_rule *r, struct mbuf *m, struct tcphdr *th, thoff = th->th_off << 2; cnt = thoff - sizeof(struct tcphdr); optp = mtod(m, caddr_t) + off + sizeof(struct tcphdr); - + for (; cnt > 0; cnt -= optlen, optp += optlen) { opt = optp[0]; if (opt == TCPOPT_EOL) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 40ed54aefcb..14faf009c44 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.72 2002/05/12 00:54:56 dhartmei Exp $ */ +/* $OpenBSD: pfvar.h,v 1.73 2002/05/19 22:31:28 deraadt Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -55,8 +55,8 @@ enum { PF_LIMIT_STATES=0, PF_LIMIT_FRAGS=1, PF_LIMIT_MAX=2 }; struct pf_addr { union { - struct in_addr v4; - struct in6_addr v6; + struct in_addr v4; + struct in6_addr v6; u_int8_t addr8[16]; u_int16_t addr16[8]; u_int32_t addr32[4]; @@ -283,7 +283,7 @@ struct pf_state_host { }; struct pf_state_peer { - u_int32_t seqlo; /* Max sequence number sent */ + u_int32_t seqlo; /* Max sequence number sent */ u_int32_t seqhi; /* Max the other end ACKd + win */ u_int32_t seqdiff; /* Sequence number modulator */ u_int16_t max_win; @@ -375,7 +375,7 @@ struct pf_tree_key { TAILQ_HEAD(pf_rulequeue, pf_rule); struct pf_pdesc { - u_int64_t tot_len; /* Make Mickey money */ + u_int64_t tot_len; /* Make Mickey money */ union { struct tcphdr *tcp; struct udphdr *udp; @@ -388,7 +388,7 @@ struct pf_pdesc { struct pf_addr *src; struct pf_addr *dst; u_int16_t *ip_sum; - u_int32_t p_len; /* total length of payload */ + u_int32_t p_len; /* total length of payload */ u_int16_t flags; /* Let SCRUB trigger behavior in * state code. Easier than tags */ u_int8_t af; @@ -455,7 +455,7 @@ struct pf_status { u_int32_t debug; }; -#define PFFRAG_FRENT_HIWAT 5000 /* Number of fragment entries */ +#define PFFRAG_FRENT_HIWAT 5000 /* Number of fragment entries */ #define PFFRAG_FRAG_HIWAT 1000 /* Number of fragmented packets */ /* @@ -568,20 +568,20 @@ struct pfioc_limit { #define DIOCSTART _IO ('D', 1) #define DIOCSTOP _IO ('D', 2) #define DIOCBEGINRULES _IOWR('D', 3, u_int32_t) -#define DIOCADDRULE _IOWR('D', 4, struct pfioc_rule) +#define DIOCADDRULE _IOWR('D', 4, struct pfioc_rule) #define DIOCCOMMITRULES _IOWR('D', 5, u_int32_t) #define DIOCGETRULES _IOWR('D', 6, struct pfioc_rule) -#define DIOCGETRULE _IOWR('D', 7, struct pfioc_rule) +#define DIOCGETRULE _IOWR('D', 7, struct pfioc_rule) #define DIOCBEGINNATS _IOWR('D', 8, u_int32_t) -#define DIOCADDNAT _IOWR('D', 9, struct pfioc_nat) +#define DIOCADDNAT _IOWR('D', 9, struct pfioc_nat) #define DIOCCOMMITNATS _IOWR('D', 10, u_int32_t) #define DIOCGETNATS _IOWR('D', 11, struct pfioc_nat) -#define DIOCGETNAT _IOWR('D', 12, struct pfioc_nat) +#define DIOCGETNAT _IOWR('D', 12, struct pfioc_nat) #define DIOCBEGINRDRS _IOWR('D', 13, u_int32_t) -#define DIOCADDRDR _IOWR('D', 14, struct pfioc_rdr) +#define DIOCADDRDR _IOWR('D', 14, struct pfioc_rdr) #define DIOCCOMMITRDRS _IOWR('D', 15, u_int32_t) #define DIOCGETRDRS _IOWR('D', 16, struct pfioc_rdr) -#define DIOCGETRDR _IOWR('D', 17, struct pfioc_rdr) +#define DIOCGETRDR _IOWR('D', 17, struct pfioc_rdr) #define DIOCCLRSTATES _IO ('D', 18) #define DIOCGETSTATE _IOWR('D', 19, struct pfioc_state) #define DIOCSETSTATUSIF _IOWR('D', 20, struct pfioc_if) @@ -637,7 +637,7 @@ int pf_match_gid(u_int8_t, gid_t, gid_t, gid_t); void pf_normalize_init(void); int pf_normalize_ip(struct mbuf **, int, struct ifnet *, u_short *); void pf_purge_expired_fragments(void); -int pf_routable(struct pf_addr *addr, int af); +int pf_routable(struct pf_addr *addr, int af); extern struct pf_rulequeue *pf_rules_active; extern struct pf_status pf_status; |