aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorGarrett Wollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
committerGarrett Wollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
commit5e2d069649f8e89ec8dd5f090113724c1e027bfc (patch)
tree6de727402c507fdf97751e5ba908730627692104 /sys/netinet/raw_ip.c
parenta6dbeb65a1e2f802eae45931a35c21f48f39f9b8 (diff)
downloadsrc-5e2d069649f8e89ec8dd5f090113724c1e027bfc.tar.gz
src-5e2d069649f8e89ec8dd5f090113724c1e027bfc.zip
Eliminate some more references to separate ip_v and ip_hl fields.
Notes
Notes: svn path=/head/; revision=17269
Diffstat (limited to 'sys/netinet/raw_ip.c')
-rw-r--r--sys/netinet/raw_ip.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c
index 325cbde57a72..be5c13b4628b 100644
--- a/sys/netinet/raw_ip.c
+++ b/sys/netinet/raw_ip.c
@@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* @(#)raw_ip.c 8.7 (Berkeley) 5/15/95
- * $Id: raw_ip.c,v 1.31 1996/05/22 17:23:09 wollman Exp $
+ * $Id: raw_ip.c,v 1.32 1996/07/20 00:16:20 alex Exp $
*/
#include <sys/param.h>
@@ -47,6 +47,7 @@
#include <net/if.h>
#include <net/route.h>
+#define _IP_VHL
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include <netinet/ip.h>
@@ -177,8 +178,9 @@ rip_output(m, so, dst)
ip = mtod(m, struct ip *);
/* don't allow both user specified and setsockopt options,
and don't allow packet length sizes that will crash */
- if (((ip->ip_hl != (sizeof (*ip) >> 2)) && inp->inp_options) ||
- (ip->ip_len > m->m_pkthdr.len)) {
+ if (((IP_VHL_HL(ip->ip_vhl) != (sizeof (*ip) >> 2))
+ && inp->inp_options)
+ || (ip->ip_len > m->m_pkthdr.len)) {
m_freem(m);
return EINVAL;
}