bgpd: fix overlay index comparison

To know if overlay index is the same between two route information,
then the two overlay index field is compared. If both fields are set to
null, then the comparison should be equal, then return true, which was
not done.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2017-02-09 09:09:54 +01:00
parent 31689a53f1
commit c298dae259

View File

@ -429,7 +429,7 @@ overlay_index_same(const struct attr_extra *ae1, const struct attr_extra *ae2)
if(!ae2 && ae1)
return false;
if(!ae1 && !ae2)
return false;
return true;
return !memcmp(&(ae1->evpn_overlay), &(ae2->evpn_overlay), sizeof(struct overlay_index));
}