summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>1995-07-02 16:45:07 +0000
committerjoerg <joerg@FreeBSD.org>1995-07-02 16:45:07 +0000
commitd295fcd0723746eaaf90f53ac3d9dedcbc702077 (patch)
treea09b49a632789c7b3020e71d737790b929a4b115 /sys
parentb3c0c683f386f462539ed7919799865ba537a32c (diff)
downloadFreeBSD-src-d295fcd0723746eaaf90f53ac3d9dedcbc702077.zip
FreeBSD-src-d295fcd0723746eaaf90f53ac3d9dedcbc702077.tar.gz
Slightly modify my previous change to return EINVAL instead of
EFAULT. Submitted by: Peter Wemm
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index a77ed02..e6e3fe2 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 <sys/param.h>
@@ -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 *);
OpenPOWER on IntegriCloud