dect
/
libnl
Archived
13
0
Fork 0

link: move af_data_compare to the end

In the current code if rtnl_link_af_data_compare returns value > 0
we mark PROTINFO attribute in the diff mask and return without
comparing flags.

This patch makes af_data to be the last thing we compare.

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>
This commit is contained in:
roopa 2013-02-15 10:26:29 -08:00 committed by Thomas Graf
parent 1ecf98a23e
commit 8f151fadda
1 changed files with 6 additions and 6 deletions

View File

@ -867,6 +867,12 @@ static int link_compare(struct nl_object *_a, struct nl_object *_b,
diff |= LINK_DIFF(NUM_RX_QUEUES,a->l_num_rx_queues != b->l_num_rx_queues);
diff |= LINK_DIFF(GROUP, a->l_group != b->l_group);
if (flags & LOOSE_COMPARISON)
diff |= LINK_DIFF(FLAGS,
(a->l_flags ^ b->l_flags) & b->l_flag_mask);
else
diff |= LINK_DIFF(FLAGS, a->l_flags != b->l_flags);
/*
* Compare LINK_ATTR_PROTINFO af_data
*/
@ -875,12 +881,6 @@ static int link_compare(struct nl_object *_a, struct nl_object *_b,
goto protinfo_mismatch;
}
if (flags & LOOSE_COMPARISON)
diff |= LINK_DIFF(FLAGS,
(a->l_flags ^ b->l_flags) & b->l_flag_mask);
else
diff |= LINK_DIFF(FLAGS, a->l_flags != b->l_flags);
out:
return diff;