summaryrefslogtreecommitdiff
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-07-16 22:11:05 +0000
committerFederico G. Schwindt <fgsch@cvs.openbsd.org>2001-07-16 22:11:05 +0000
commit8a1a45a07cb27494dca6c1da17f86a2735835d5b (patch)
tree0b621a28f517eee041c577a724d2aa21a90c753f /sys/netinet/ip_input.c
parentd4ba725ee514e47ae818c8e70f06e3dcc78d2949 (diff)
Move altq after pf; suggested by aaron@, kjc@ ok.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index cade9bde7a0..4b27c4d2276 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_input.c,v 1.90 2001/07/05 16:45:54 jjbg Exp $ */
+/* $OpenBSD: ip_input.c,v 1.91 2001/07/16 22:11:04 fgsch Exp $ */
/* $NetBSD: ip_input.c,v 1.30 1996/03/16 23:53:58 christos Exp $ */
/*
@@ -361,12 +361,6 @@ ipv4_input(m)
ipstat.ips_inhwcsum++;
}
-#ifdef ALTQ
- if (altq_input != NULL && (*altq_input)(m, AF_INET) == 0)
- /* packet is dropped by traffic conditioner */
- return;
-#endif
-
/*
* Convert fields to host representation.
*/
@@ -395,18 +389,23 @@ ipv4_input(m)
m_adj(m, ip->ip_len - m->m_pkthdr.len);
}
+#if NPF > 0
/*
* Packet filter
*/
-#if NPF > 0
- {
- if (pf_test(PF_IN, m->m_pkthdr.rcvif, &m) != PF_PASS)
- goto bad;
+ if (pf_test(PF_IN, m->m_pkthdr.rcvif, &m) != PF_PASS)
+ goto bad;
- ip = mtod(m, struct ip *);
- hlen = ip->ip_hl << 2;
- }
+ ip = mtod(m, struct ip *);
+ hlen = ip->ip_hl << 2;
+#endif
+
+#ifdef ALTQ
+ if (altq_input != NULL && (*altq_input)(m, AF_INET) == 0)
+ /* packet is dropped by traffic conditioner */
+ return;
#endif
+
/*
* Process options and, if not destined for us,
* ship it on. ip_dooptions returns 1 when an