]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Fixes serious bug in route attribute handing.
authorOndrej Zajicek <santiago@crfreenet.org>
Fri, 22 May 2009 13:16:53 +0000 (15:16 +0200)
committerOndrej Zajicek <santiago@crfreenet.org>
Fri, 22 May 2009 13:16:53 +0000 (15:16 +0200)
ea_same() sometimes returns true for different route attributes,
which caused that hash table in BGP does not work correctly and
some routes were sent with different attributes.

nest/rt-attr.c

index e79cba1fdd97bde6c075e9f4172fb9d74a7a5b20..2318f801b8afbd321e1a91aac5d6aebe70eb9f3e 100644 (file)
@@ -310,7 +310,7 @@ ea_same(ea_list *x, ea_list *y)
          a->flags != b->flags ||
          a->type != b->type ||
          ((a->type & EAF_EMBEDDED) ? a->u.data != b->u.data :
-          (a->u.ptr->length != b->u.ptr->length || memcmp(a->u.ptr, b->u.ptr, a->u.ptr->length))))
+          (a->u.ptr->length != b->u.ptr->length || memcmp(a->u.ptr->data, b->u.ptr->data, a->u.ptr->length))))
        return 0;
     }
   return 1;