From 0cc4167aba1b0d37922e6b21edfbca2809e16f25 Mon Sep 17 00:00:00 2001 From: deraadt Date: Thu, 30 Jan 1997 22:41:59 +0000 Subject: [PATCH] for IP_HDRINCL option, use ip_len/ip_off in network order; lidl@va.pubnix.com --- sys/netinet/raw_ip.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sys/netinet/raw_ip.c b/sys/netinet/raw_ip.c index 97d641fddb4..1efb0a209f3 100644 --- a/sys/netinet/raw_ip.c +++ b/sys/netinet/raw_ip.c @@ -1,4 +1,4 @@ -/* $OpenBSD: raw_ip.c,v 1.8 1997/01/26 01:23:44 tholo Exp $ */ +/* $OpenBSD: raw_ip.c,v 1.9 1997/01/30 22:41:59 deraadt Exp $ */ /* $NetBSD: raw_ip.c,v 1.25 1996/02/18 18:58:33 christos Exp $ */ /* @@ -190,6 +190,8 @@ rip_output(m, va_alist) return (EMSGSIZE); } ip = mtod(m, struct ip *); + NTOHS(ip->ip_len); + NTOHS(ip->ip_off); /* * don't allow both user specified and setsockopt options, * and don't allow packet length sizes that will crash -- 2.20.1