summaryrefslogtreecommitdiffstats
path: root/sys/netinet/raw_ip.c
diff options
context:
space:
mode:
authorwollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
committerwollman <wollman@FreeBSD.org>1996-07-24 18:46:19 +0000
commit730d9ea60bbd736aa6e38d5414dbd231e32a2605 (patch)
tree6de727402c507fdf97751e5ba908730627692104 /sys/netinet/raw_ip.c
parentad62df628f65fd31e61eee95b88b1a34274632d9 (diff)
downloadFreeBSD-src-730d9ea60bbd736aa6e38d5414dbd231e32a2605.zip
FreeBSD-src-730d9ea60bbd736aa6e38d5414dbd231e32a2605.tar.gz
Eliminate some more references to separate ip_v and ip_hl fields.
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 325cbde..be5c13b 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;
}
OpenPOWER on IntegriCloud