Fix rtnl_addr caching

addr_obj.ops.oo_id_attrs included ADDR_ATTR_PEER, so any address that
didn't have a peer address set would compare as unequal to itself,
meaning it could never be removed from a cache after it was added, etc.
This commit is contained in:
Dan Winship 2009-08-20 09:29:26 -04:00 committed by Thomas Graf
parent 1ed227d3a9
commit e0af9e1802

View file

@ -907,8 +907,7 @@ static struct nl_object_ops addr_obj_ops = {
.oo_compare = addr_compare,
.oo_attrs2str = addr_attrs2str,
.oo_id_attrs = (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX |
ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN |
ADDR_ATTR_PEER),
ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN),
};
static struct nl_af_group addr_groups[] = {