diff options
author | bluhm <bluhm@openbsd.org> | 2011-09-28 17:15:45 +0000 |
---|---|---|
committer | bluhm <bluhm@openbsd.org> | 2011-09-28 17:15:45 +0000 |
commit | 776f210a757411e26516e1d4d37240d9efa6bc98 (patch) | |
tree | 9e1563e167a455693547603b465e37d1aec5de2d /sys/net/pf_osfp.c | |
parent | tweak previous; (diff) | |
download | wireguard-openbsd-776f210a757411e26516e1d4d37240d9efa6bc98.tar.xz wireguard-openbsd-776f210a757411e26516e1d4d37240d9efa6bc98.zip |
As requested by henning, move the mbuf pointer into struct pf_pdesc.
Also sort pd to the beginning of the functions' parameter lists for
consistency.
ok henning
Diffstat (limited to 'sys/net/pf_osfp.c')
-rw-r--r-- | sys/net/pf_osfp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/sys/net/pf_osfp.c b/sys/net/pf_osfp.c index 8207b0d9060..eff891848b7 100644 --- a/sys/net/pf_osfp.c +++ b/sys/net/pf_osfp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_osfp.c,v 1.25 2011/09/22 14:57:12 bluhm Exp $ */ +/* $OpenBSD: pf_osfp.c,v 1.26 2011/09/28 17:15:45 bluhm Exp $ */ /* * Copyright (c) 2003 Mike Frantzen <frantzen@w4g.org> @@ -82,7 +82,7 @@ void pf_osfp_insert(struct pf_osfp_list *, * Returns the list of possible OSes. */ struct pf_osfp_enlist * -pf_osfp_fingerprint(struct pf_pdesc *pd, struct mbuf *m) +pf_osfp_fingerprint(struct pf_pdesc *pd) { struct tcphdr *th = pd->hdr.tcp; struct ip *ip = NULL; @@ -94,13 +94,14 @@ pf_osfp_fingerprint(struct pf_pdesc *pd, struct mbuf *m) switch (pd->af) { case AF_INET: - ip = mtod(m, struct ip *); + ip = mtod(pd->m, struct ip *); break; case AF_INET6: - ip6 = mtod(m, struct ip6_hdr *); + ip6 = mtod(pd->m, struct ip6_hdr *); break; } - if (!pf_pull_hdr(m, pd->off, hdr, th->th_off << 2, NULL, NULL, pd->af)) + if (!pf_pull_hdr(pd->m, pd->off, hdr, th->th_off << 2, NULL, NULL, + pd->af)) return (NULL); return (pf_osfp_fingerprint_hdr(ip, ip6, (struct tcphdr *)hdr)); |