diff options
author | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-04-23 10:00:37 +0000 |
---|---|---|
committer | Alexander Bluhm <bluhm@cvs.openbsd.org> | 2011-04-23 10:00:37 +0000 |
commit | 014ce5d1a310508f33c8f8c2a80750864f6d371b (patch) | |
tree | c99250d00c9b1eda93610dfad2e193d18c5acaf3 /sys/net/pf_norm.c | |
parent | b7f06a49b087f06f340e2907d4c883241df7fe32 (diff) |
pf_scrub_ip() does not modify the given mbuf pointer. So don't
pass a pointer to a pointer to make the code in pf_test() clearer.
ok henning@
Diffstat (limited to 'sys/net/pf_norm.c')
-rw-r--r-- | sys/net/pf_norm.c | 8 |
1 files changed, 3 insertions, 5 deletions
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 */ |