Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dist/pf/net It is normal for socket credentials to be mi...



details:   https://anonhg.NetBSD.org/src/rev/033aae3bc9d7
branches:  trunk
changeset: 359661:033aae3bc9d7
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Feb 19 23:03:00 2018 +0000

description:
It is normal for socket credentials to be missing for incoming sockets,
so don't warn.

diffstat:

 sys/dist/pf/net/pf.c |  11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)

diffs (33 lines):

diff -r 01e0840f5ba4 -r 033aae3bc9d7 sys/dist/pf/net/pf.c
--- a/sys/dist/pf/net/pf.c      Mon Feb 19 22:01:15 2018 +0000
+++ b/sys/dist/pf/net/pf.c      Mon Feb 19 23:03:00 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pf.c,v 1.79 2018/02/18 21:51:28 christos Exp $ */
+/*     $NetBSD: pf.c,v 1.80 2018/02/19 23:03:00 christos Exp $ */
 /*     $OpenBSD: pf.c,v 1.552.2.1 2007/11/27 16:37:57 henning Exp $ */
 
 /*
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.79 2018/02/18 21:51:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pf.c,v 1.80 2018/02/19 23:03:00 christos Exp $");
 
 #include "pflog.h"
 
@@ -2847,13 +2847,8 @@
                break;
 #endif /* INET6 */
        }
-       if (so == NULL)
+       if (so == NULL || so->so_cred == NULL)
                return -1;
-       if (so->so_cred == NULL) {
-               DPFPRINTF(PF_DEBUG_URGENT,
-                   ("%s: so->so_cred == NULL so=%p\n", __func__, so));
-               return -1;
-       }
        pd->lookup.uid = kauth_cred_geteuid(so->so_cred);
        pd->lookup.gid = kauth_cred_getegid(so->so_cred);
 #else



Home | Main Index | Thread Index | Old Index