[PATCH] Fix rtnl_addr caching

Dan Winship danw at redhat.com
Thu Aug 20 09:29:26 EDT 2009


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.
---
 lib/route/addr.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/lib/route/addr.c b/lib/route/addr.c
index fa9d0f4..d14c481 100644
--- a/lib/route/addr.c
+++ b/lib/route/addr.c
@@ -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[] = {
-- 
1.6.2.5



--------------080701050804010708060701--



More information about the libnl mailing list