diff options
-rw-r--r-- | sys/net/pf.c | 10 | ||||
-rw-r--r-- | sys/net/pf_norm.c | 8 | ||||
-rw-r--r-- | sys/net/pfvar.h | 6 |
3 files changed, 11 insertions, 13 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c index 8a0dcf54cf6..ce3ad1968ec 100644 --- a/sys/net/pf.c +++ b/sys/net/pf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf.c,v 1.740 2011/04/12 10:47:29 mikeb Exp $ */ +/* $OpenBSD: pf.c,v 1.741 2011/04/23 10:00:36 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -5921,14 +5921,14 @@ done: "ip options in pf_test()"); } - pf_scrub_ip(&m, s->state_flags, s->min_ttl, s->set_tos); + pf_scrub_ip(m, s->state_flags, s->min_ttl, s->set_tos); pf_tag_packet(m, s->tag, s->rtableid[pd.didx]); if (pqid || (pd.tos & IPTOS_LOWDELAY)) qid = s->pqid; else qid = s->qid; } else { - pf_scrub_ip(&m, r->scrub_flags, r->min_ttl, r->set_tos); + pf_scrub_ip(m, r->scrub_flags, r->min_ttl, r->set_tos); if (pqid || (pd.tos & IPTOS_LOWDELAY)) qid = r->pqid; else @@ -6205,13 +6205,13 @@ done: if (action != PF_DROP) { if (s) { - pf_scrub_ip6(&m, s->min_ttl); + pf_scrub_ip6(m, s->min_ttl); if (pqid || (pd.tos & IPTOS_LOWDELAY)) qid = s->pqid; else qid = s->qid; } else { - pf_scrub_ip6(&m, r->min_ttl); + pf_scrub_ip6(m, r->min_ttl); if (pqid || (pd.tos & IPTOS_LOWDELAY)) qid = r->pqid; else diff --git a/sys/net/pf_norm.c b/sys/net/pf_norm.c index ac65abc4766..fe8bcc732fe 100644 --- a/sys/net/pf_norm.c +++ b/sys/net/pf_norm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_norm.c,v 1.131 2011/04/04 14:14:53 henning Exp $ */ +/* $OpenBSD: pf_norm.c,v 1.132 2011/04/23 10:00:36 bluhm Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -1548,9 +1548,8 @@ pf_normalize_mss(struct mbuf *m, int off, struct pf_pdesc *pd, u_int16_t maxmss) } void -pf_scrub_ip(struct mbuf **m0, u_int16_t flags, u_int8_t min_ttl, u_int8_t tos) +pf_scrub_ip(struct mbuf *m, u_int16_t flags, u_int8_t min_ttl, u_int8_t tos) { - struct mbuf *m = *m0; struct ip *h = mtod(m, struct ip *); /* Clear IP_DF if no-df was requested */ @@ -1572,9 +1571,8 @@ pf_scrub_ip(struct mbuf **m0, u_int16_t flags, u_int8_t min_ttl, u_int8_t tos) #ifdef INET6 void -pf_scrub_ip6(struct mbuf **m0, u_int8_t min_ttl) +pf_scrub_ip6(struct mbuf *m, u_int8_t min_ttl) { - struct mbuf *m = *m0; struct ip6_hdr *h = mtod(m, struct ip6_hdr *); /* Enforce a minimum ttl, may cause endless packet loops */ diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index be46c54d605..b10e21f0156 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pfvar.h,v 1.328 2011/04/22 15:49:28 bluhm Exp $ */ +/* $OpenBSD: pfvar.h,v 1.329 2011/04/23 10:00:36 bluhm Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -1790,8 +1790,8 @@ int pf_normalize_tcp_stateful(struct mbuf *, int, struct pf_pdesc *, u_short *, struct tcphdr *, struct pf_state *, struct pf_state_peer *, struct pf_state_peer *, int *); int pf_normalize_mss(struct mbuf *, int, struct pf_pdesc *, u_int16_t); -void pf_scrub_ip(struct mbuf **, u_int16_t, u_int8_t, u_int8_t); -void pf_scrub_ip6(struct mbuf **, u_int8_t); +void pf_scrub_ip(struct mbuf *, u_int16_t, u_int8_t, u_int8_t); +void pf_scrub_ip6(struct mbuf *, u_int8_t); u_int32_t pf_state_expires(const struct pf_state *); void pf_purge_expired_fragments(void); |