Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern don't warn about AF_LINK sockets with sa_len less t...
details: https://anonhg.NetBSD.org/src/rev/6c48206752b7
branches: trunk
changeset: 354857:6c48206752b7
user: christos <christos%NetBSD.org@localhost>
date: Sun Jul 02 02:39:18 2017 +0000
description:
don't warn about AF_LINK sockets with sa_len less than the size of the sockaddr
diffstat:
sys/kern/uipc_domain.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 765b7b23c6e8 -r 6c48206752b7 sys/kern/uipc_domain.c
--- a/sys/kern/uipc_domain.c Sun Jul 02 00:14:09 2017 +0000
+++ b/sys/kern/uipc_domain.c Sun Jul 02 02:39:18 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: uipc_domain.c,v 1.97 2017/07/01 16:59:12 christos Exp $ */
+/* $NetBSD: uipc_domain.c,v 1.98 2017/07/02 02:39:18 christos Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -32,7 +32,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.97 2017/07/01 16:59:12 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_domain.c,v 1.98 2017/07/02 02:39:18 christos Exp $");
#include <sys/param.h>
#include <sys/socket.h>
@@ -284,6 +284,8 @@
socklen_t len = sockaddr_getsize_by_family(sa->sa_family);
if (len == 0 || len == sa->sa_len)
return;
+ if (sa->sa_family == AF_LINK && sa->sa_len <= len)
+ return;
char buf[512];
sockaddr_format(sa, buf, sizeof(buf));
Home |
Main Index |
Thread Index |
Old Index