summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-18 21:58:07 +0000
committerMartin Pieuchot <mpi@cvs.openbsd.org>2015-07-18 21:58:07 +0000
commitf7278fa288c69abb8b3850850ad90fd2e8429820 (patch)
tree75ee047486ac1ca226985c7ce302ac6fe65829e5 /sys/net
parentdf7524d69186d470e4a7e83b763b823f1bce4a1f (diff)
NET_RT_DUMP is dumb and tries to iterates over all possible AF tables
of a given rtable if none is specified. In this case do not return an error if a table is missing for one of the ~30 funky AF defines we have in <sys/socket.h> Breakage found by and fix discussed with claudio@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/rtsock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index 88826887e4d..5183568d8d4 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.165 2015/07/18 15:51:16 mpi Exp $ */
+/* $OpenBSD: rtsock.c,v 1.166 2015/07/18 21:58:06 mpi Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -1363,6 +1363,8 @@ sysctl_rtable(int *name, u_int namelen, void *where, size_t *given, void *new,
continue;
error = rtable_walk(tableid, i, sysctl_dumpentry, &w);
+ if (error == EAFNOSUPPORT)
+ error = 0;
if (error)
break;
}