summaryrefslogtreecommitdiff
path: root/usr.bin/fstat/fstat.c
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2019-01-21 07:16:29 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2019-01-21 07:16:29 +0000
commit1ca84404dc18f4025a22874094ecbb4326948860 (patch)
tree10be6d08910d6ed7516fa0eaa0a98be6ebb68938 /usr.bin/fstat/fstat.c
parentefacbb98b3b9283b1ddccc3df30b5787a36a7b86 (diff)
explicitly handle printing the AF_KEY socket type as "pfkey"
i was looking for it and had to think very hard and read /usr/include/sys/socket.h before i found it here. ok deraadt@ ok claudio@ who wanted it to look like AF_ROUTE output
Diffstat (limited to 'usr.bin/fstat/fstat.c')
-rw-r--r--usr.bin/fstat/fstat.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 3671baa863a..f694d3bdfd8 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.95 2018/09/16 02:44:06 millert Exp $ */
+/* $OpenBSD: fstat.c,v 1.96 2019/01/21 07:16:28 dlg Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <Todd.Miller@courtesan.com>
@@ -788,6 +788,11 @@ socktrans(struct kinfo_file *kf)
printf(" %d ", kf->so_protocol);
hide((void *)(uintptr_t)kf->f_data);
break;
+ case AF_KEY:
+ printf("* pfkey %s", stype);
+ printf(" %d ", kf->so_protocol);
+ hide((void *)(uintptr_t)kf->f_data);
+ break;
default:
/* print protocol number and socket address */
printf("* %d %s", kf->so_family, stype);