Skip to contentSkip to conversation

ipv6 mcast: Use ipv6_addr_equal() in ip6_mc_source().

PATCH Applied YOSHIFUJI Hideaki 2 participants 2 messages Jan 29, 2013 – Jan 30, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/5 ipv6 mcast: Use ipv6_addr_equal() in ip6_mc_source().

---
 net/ipv6/mcast.c |    5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
net/ipv6/mcast.c +2 -3
index f25002a..8460a1f 100644
@@ -376,8 +376,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
 			goto done;	/* err = -EADDRNOTAVAIL */
 		rv = !0;
 		for (i=0; i<psl->sl_count; i++) {
-			rv = memcmp(&psl->sl_addr[i], source,
-				sizeof(struct in6_addr));
+			rv = !ipv6_addr_equal(&psl->sl_addr[i], source);
 			if (rv == 0)
 				break;
 		}
@@ -427,7 +426,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk,
 	}
 	rv = 1;	/* > 0 for insert logic below if sl_count is 0 */
 	for (i=0; i<psl->sl_count; i++) {
-		rv = memcmp(&psl->sl_addr[i], source, sizeof(struct in6_addr));
+		rv = !ipv6_addr_equal(&psl->sl_addr[i], source);
 		if (rv == 0)
 			break;
 	}
Signature · 1 line
1.7.9.5