From f38681367f8386ef637168f699010ca13cc2e22c Mon Sep 17 00:00:00 2001 From: tholo Date: Sun, 2 Mar 1997 07:59:40 +0000 Subject: [PATCH] Need to get a new pointer for the IP header after doing a pullup on the mbuf --- sys/netinet/ip_output.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index 15db85f0ed0..0a7585d2232 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ip_output.c,v 1.10 1997/03/02 07:32:15 angelos Exp $ */ +/* $OpenBSD: ip_output.c,v 1.11 1997/03/02 07:59:40 tholo Exp $ */ /* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */ /* @@ -160,10 +160,12 @@ ip_output(m0, va_alist) dst->sen_ip_src = ip->ip_src; dst->sen_ip_dst = ip->ip_dst; dst->sen_proto = ip->ip_p; - - if ((m->m_len < hlen + 2*sizeof(u_int16_t)) && - ((m = m_pullup(m, hlen + 2*sizeof(u_int16_t))) == 0)) + + if (m->m_len < hlen + 2*sizeof(u_int16_t)) { + if ((m = m_pullup(m, hlen + 2*sizeof(u_int16_t))) == 0) goto bad; + ip = mtod(m, struct ip *); + } switch (ip->ip_p) { case IPPROTO_TCP: -- 2.20.1