summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-26 18:17:55 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-06-26 18:17:55 +0000
commitbdc0f5c45c706103e152c0beab9b55a7480c1af8 (patch)
tree0ba24243e4b1382beb8fbfd4a191a3d058297df2 /sys/netinet/ip_output.c
parent989450b1bff0f90ab71e253c215cdc79a7f895df (diff)
no longer pass around **m
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c30
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. */