diff options
author | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-03-02 07:59:41 +0000 |
---|---|---|
committer | Thorsten Lockert <tholo@cvs.openbsd.org> | 1997-03-02 07:59:41 +0000 |
commit | 9fafcc13d87f9598ac8d03693414845e346aeefb (patch) | |
tree | 0f0c62428d44c0620e15bb7eb7f6468640240e98 | |
parent | c1e8ce26cf56f211bd831ddb4dfc3bcf4c58aad0 (diff) |
Need to get a new pointer for the IP header after doing a pullup on the mbuf
-rw-r--r-- | sys/netinet/ip_output.c | 10 |
1 files 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: |