]> granicus.if.org Git - libnl/commitdiff
Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test
authorMichele Baldessari <michele@acksyn.org>
Tue, 28 Aug 2012 18:28:28 +0000 (20:28 +0200)
committerThomas Graf <tgraf@redhat.com>
Wed, 29 Aug 2012 10:00:24 +0000 (12:00 +0200)
Fix the always false if (a->rt_nr_nh != a->rt_nr_nh) test and compare
properly the a and b structs

lib/route/route_obj.c

index 685a926fcc87974812a885704e3fcb697b4a950a..40a157e259c962fa4f85870109bbfc695680accd 100644 (file)
@@ -335,7 +335,7 @@ static int route_compare(struct nl_object *_a, struct nl_object *_b,
                diff |= ROUTE_DIFF(FLAGS,
                          (a->rt_flags ^ b->rt_flags) & b->rt_flag_mask);
        } else {
-               if (a->rt_nr_nh != a->rt_nr_nh)
+               if (a->rt_nr_nh != b->rt_nr_nh)
                        goto nh_mismatch;
 
                /* search for a dup in each nh of a */