Patch: correct sysctl parameter in /sbin/route

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Patch: correct sysctl parameter in /sbin/route

Gregor Best
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

route-table-sysctl.patch (490 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Patch: correct sysctl parameter in /sbin/route

Philip Guenther-2
On Tue, Jun 17, 2014 at 6:27 AM, Gregor Best <[hidden email]> wrote:
>
> 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.
>

Yep.  Patch applied and same fix applied in several other locations.

sysctl({CTL_NET}) is one of the few places where a PF_* is actually correct
to use in userspace.



> 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?
>

That's a bug, yes.


Philip Guenther