[PATCH] Bug Fix: Fix rtnl_link_af_data_compare return value
Thomas Graf
tgraf at suug.ch
Sun Feb 24 11:12:18 EST 2013
On 02/15/13 at 10:26am, roopa at cumulusnetworks.com wrote:
> From: roopa <roopa at cumulusnetworks.com>
>
> This patch fixes a bug where because of the af_ops check
> being first in the function, we were returning ~0 if af_ops
> was null even if both objects really did not have af_data
> and we should be returning 0.
>
> Its better to have the af_data present check before anything else.
>
> So, Rearranged some of the code in rtnl_link_af_data_compare.
> Changes include:
> - Do the attribute present check before anything else
> - If ao_compare op not present, return ~0
>
> Signed-off-by: Roopa Prabhu <roopa at cumulusnetworks.com>
> Reviewed-by: Nolan Leake <nolan at cumulusnetworks.com>
> Reviewed-by: Shrijeet Mukherjee <shm at cumulusnetworks.com>
> Reviewed-by: Wilson Kok <wkok at cumulusnetworks.com>
Applied, thanks.
More information about the libnl
mailing list