From: YOSHIFUJI Hideaki / 吉藤英明 Date: Tue, 29 Jan 2013 12:48:23 +0000 (+0000) Subject: ipv6 mcast: Use ipv6_addr_equal() in ip6_mc_source(). X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=07c2fecc363c8f94a0bd2fdf9b7209ec6f5a0ab5;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git ipv6 mcast: Use ipv6_addr_equal() in ip6_mc_source(). Signed-off-by: YOSHIFUJI Hideaki Signed-off-by: David S. Miller --- diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index f25002aaf624..8460a1f54a76 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c @@ -376,8 +376,7 @@ int ip6_mc_source(int add, int omode, struct sock *sk, goto done; /* err = -EADDRNOTAVAIL */ rv = !0; for (i=0; isl_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; isl_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; }