diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-26 18:17:55 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-06-26 18:17:55 +0000 |
commit | bdc0f5c45c706103e152c0beab9b55a7480c1af8 (patch) | |
tree | 0ba24243e4b1382beb8fbfd4a191a3d058297df2 /sys/netinet/ip_output.c | |
parent | 989450b1bff0f90ab71e253c215cdc79a7f895df (diff) |
no longer pass around **m
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r-- | sys/netinet/ip_output.c | 30 |
1 files changed, 11 insertions, 19 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index daef0dfeb88..77b3ff88c54 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.126 2001/06/25 17:16:23 angelos Exp $ */ +/* $OpenBSD: ip_output.c,v 1.127 2001/06/26 18:17:54 deraadt Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -589,17 +589,13 @@ sendit: * Packet filter */ #if NPF > 0 - { - struct mbuf *m1 = m; - if (pf_test(PF_OUT, &encif[0].sc_if, &m1) != PF_PASS) { - error = EHOSTUNREACH; - splx(s); - m_freem(m1); - goto done; - } - ip = mtod(m = m1, struct ip *); - hlen = ip->ip_hl << 2; + if (pf_test(PF_OUT, &encif[0].sc_if, m) != PF_PASS) { + error = EHOSTUNREACH; + splx(s); + m_freem(m); + goto done; } + hlen = ip->ip_hl << 2; #endif tdb = gettdb(sspi, &sdst, sproto); @@ -678,14 +674,10 @@ sendit: * Packet filter */ #if NPF > 0 - { - struct mbuf *m1 = m; - if (pf_test(PF_OUT, ifp, &m1) != PF_PASS) { - error = EHOSTUNREACH; - m_freem(m1); - goto done; - } - ip = mtod(m = m1, struct ip *); + if (pf_test(PF_OUT, ifp, m) != PF_PASS) { + error = EHOSTUNREACH; + m_freem(m); + goto done; } #endif /* Catch routing changes wrt. hardware checksumming for TCP or UDP. */ |