summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_input.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-18 19:43:01 +0000
committerphk <phk@FreeBSD.org>2002-09-18 19:43:01 +0000
commit369ca07115f3e95429a31404e4fd6ffeddc8dc48 (patch)
treedbb0ae2556bb33b74fa26c9b632e8775fc06682f /sys/netinet/ip_input.c
parent50ca5d0c7b80dd7509172ab4ed237f25739c3c5b (diff)
downloadFreeBSD-src-369ca07115f3e95429a31404e4fd6ffeddc8dc48.zip
FreeBSD-src-369ca07115f3e95429a31404e4fd6ffeddc8dc48.tar.gz
Use m_fixhdr() rather than roll our own.
Diffstat (limited to 'sys/netinet/ip_input.c')
-rw-r--r--sys/netinet/ip_input.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/netinet/ip_input.c b/sys/netinet/ip_input.c
index a8aecfb..e9d1c09 100644
--- a/sys/netinet/ip_input.c
+++ b/sys/netinet/ip_input.c
@@ -1071,12 +1071,8 @@ inserted:
m->m_len += (IP_VHL_HL(ip->ip_vhl) << 2);
m->m_data -= (IP_VHL_HL(ip->ip_vhl) << 2);
/* some debugging cruft by sklower, below, will go away soon */
- if (m->m_flags & M_PKTHDR) { /* XXX this should be done elsewhere */
- register int plen = 0;
- for (t = m; t; t = t->m_next)
- plen += t->m_len;
- m->m_pkthdr.len = plen;
- }
+ if (m->m_flags & M_PKTHDR) /* XXX this should be done elsewhere */
+ m_fixhdr(m);
return (m);
dropfrag:
OpenPOWER on IntegriCloud