summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2005-12-10 18:40:30 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2005-12-10 18:40:30 +0000
commit1a60e73994dd31f6d156236fdef6ab94432e54bd (patch)
treeff1351daef8e14d488f396f1225998f0908d966d /sys/net
parent39286003ee93d2daa2d29422b4e1b833a73559c0 (diff)
m_pullup() the whole header, not the number of bytes in an int. Found
by lint. ok deraadt@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/if_gre.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c
index 0866ec7d824..6b71b794734 100644
--- a/sys/net/if_gre.c
+++ b/sys/net/if_gre.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_gre.c,v 1.36 2005/08/14 09:55:56 markus Exp $ */
+/* $OpenBSD: if_gre.c,v 1.37 2005/12/10 18:40:29 krw Exp $ */
/* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */
/*
@@ -265,8 +265,7 @@ gre_output(struct ifnet *ifp, struct mbuf *m, struct sockaddr *dst,
inp = mtod(m, struct ip *);
if (m->m_len < inp->ip_hl << 2) {
- m = m_pullup(m,
- sizeof(inp->ip_hl << 2));
+ m = m_pullup(m, inp->ip_hl << 2);
if (m == NULL) {
IF_DROP(&ifp->if_snd);
error = ENOBUFS;