[PATCH 2/2] idiag: fix idiagnl_exts2str()
Thomas Graf
tgraf at suug.ch
Tue Nov 25 02:49:56 PST 2014
On 11/25/14 at 11:35am, Thomas Haller wrote:
> idiagnl_exts2str() is used to print req->idiag_ext,
> which is the extention types combined as flags, such as
> ( (1 << (INET_DIAG_TOS - 1)) | (1 << (INET_DIAG_MEMINFO - 1)) ).
>
> This function was wrong from the beginning because the string lookup
> array had indexes such as 'INET_DIAG_TOS', instead of '(1 << (INET_DIAG_TOS - 1)'.
>
> Fix also idiagnl_attrs2str() which now converts an extension
> type (e.g. INET_DIAG_TOS) to a string. Still this function is
> deprecated, as the function name is not clear and it is not
> used or very useful.
>
> Fixes: 22eb2569a595be98ae09fc4192860c1d2c3aa54c
> Signed-off-by: Thomas Haller <thaller at redhat.com>
Acked-by: Thomas Graf <tgraf at suug.ch>
More information about the libnl
mailing list