Hi people,

according to sysctl(3), AF_ROUTE is incorrect as a second level name for
the CTL_NET sysctl. The attached patch corrects this. Since PF_ROUTE is
defined to AF_ROUTE, there are no functional changes, but the style
stays consistent this way.

I have also noticed that sysctl(3) does not document the NET_RT_TABLE
fifth-level name for CTL_NET/PF_ROUTE. Is this intentional or should I
write another patch correcting that?

Sincerely,

        Gregor Best
Index: route.c
===================================================================
RCS file: /usr/src/cvs/src/sbin/route/route.c,v
retrieving revision 1.167
diff -u -p -r1.167 route.c
--- route.c     8 May 2014 09:28:08 -0000       1.167
+++ route.c     17 Jun 2014 13:20:08 -0000
@@ -1678,7 +1678,7 @@ gettable(const char *s)
                errx(1, "invalid table id: %s", errstr);
 
        mib[0] = CTL_NET;
-       mib[1] = AF_ROUTE;
+       mib[1] = PF_ROUTE;
        mib[2] = 0;
        mib[3] = 0;
        mib[4] = NET_RT_TABLE;

Reply via email to