diff --git a/lib/route/link.c b/lib/route/link.c index 7450545..77dd7f1 100644 --- a/lib/route/link.c +++ b/lib/route/link.c @@ -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;