From 40a63d93aa9e9ade23421f8b1eaa8c59d57fc359 Mon Sep 17 00:00:00 2001 From: Joerg Wunsch Date: Sun, 2 Jul 1995 16:45:07 +0000 Subject: [PATCH] Slightly modify my previous change to return EINVAL instead of EFAULT. Submitted by: Peter Wemm --- sys/netinet/ip_output.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index a77ed022686e..e6e3fe263479 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -31,7 +31,7 @@ * SUCH DAMAGE. * * @(#)ip_output.c 8.3 (Berkeley) 1/21/94 - * $Id: ip_output.c,v 1.20 1995/06/13 17:51:14 wollman Exp $ + * $Id: ip_output.c,v 1.21 1995/07/01 19:09:40 joerg Exp $ */ #include @@ -554,9 +554,7 @@ ip_ctloutput(op, so, level, optname, mp) case IP_RECVOPTS: case IP_RECVRETOPTS: case IP_RECVDSTADDR: - if (m == 0) - error = EFAULT; - else if (m->m_len != sizeof(int)) + if (m == 0 || m->m_len != sizeof(int)) error = EINVAL; else { optval = *mtod(m, int *);