libnl/lib/route/link
roopa ded20487fd link: Fix rtnl_link_af_data_compare return value
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@cumulusnetworks.com>
Reviewed-by: Nolan Leake <nolan@cumulusnetworks.com>
Reviewed-by: Shrijeet Mukherjee <shm@cumulusnetworks.com>
Reviewed-by: Wilson Kok <wkok@cumulusnetworks.com>
Signed-off-by: Thomas Graf <tgraf@suug.ch>
2013-02-24 17:11:36 +01:00
..
api.c link: Fix rtnl_link_af_data_compare return value 2013-02-24 17:11:36 +01:00
bonding.c bond: Provide rtnl_link_bond_alloc() 2013-02-14 12:48:00 +01:00
bridge.c bridge: Provide rtnl_link_bridge_alloc() 2013-02-14 12:34:57 +01:00
can.c can: Fix nested message creation in can_put_attrs() 2013-02-01 12:24:37 +01:00
dummy.c Move private header files to <netlink-private/*> 2013-01-24 13:51:24 +01:00
inet.c Move private header files to <netlink-private/*> 2013-01-24 13:51:24 +01:00
inet6.c Move private header files to <netlink-private/*> 2013-01-24 13:51:24 +01:00
vlan.c vlan: Provide rtnl_link_vlan_alloc() 2013-02-14 12:42:22 +01:00