For now pass AF_UNSPEC to printsource() to ensure that both inet and inet6
authorclaudio <claudio@openbsd.org>
Wed, 15 Mar 2023 08:43:51 +0000 (08:43 +0000)
committerclaudio <claudio@openbsd.org>
Wed, 15 Mar 2023 08:43:51 +0000 (08:43 +0000)
addrs are fetched from the kernel. This needs more cleanup.

sbin/route/route.c

index 267a9e3..49b675f 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: route.c,v 1.263 2023/02/18 18:07:38 claudio Exp $     */
+/*     $OpenBSD: route.c,v 1.264 2023/03/15 08:43:51 claudio Exp $     */
 /*     $NetBSD: route.c,v 1.16 1996/04/15 18:27:05 cgd Exp $   */
 
 /*
@@ -511,7 +511,7 @@ setsource(int argc, char **argv)
        }
 
        if (argc <= 0 && ifindex == 0)
-               printsource(af, tableid);
+               printsource(AF_UNSPEC, tableid);
        if (argc > 1 && ifindex == 0)
                usage(NULL);