Sfoglia il codice sorgente

totemip: compare sin6_scope_id and interface_num

When user configure a specific interface like vlan
with the same IPv6 link-local address, Corosync should
compare sin6_scope_id with interface_num, to make sure got
the right interface to bind

Signed-off-by: liangxin1300 <XLiang@suse.com>
Reviewed-by: Jan Friesse <jfriesse@redhat.com>
liangxin1300 6 anni fa
parent
commit
efd34df531
1 ha cambiato i file con 3 aggiunte e 0 eliminazioni
  1. 3 0
      exec/totemip.c

+ 3 - 0
exec/totemip.c

@@ -573,6 +573,9 @@ int totemip_iface_check(struct totem_ip_address *bindnet,
 		if (addr_len == 0)
 		if (addr_len == 0)
 			continue ;
 			continue ;
 
 
+		if (bindnet->sin6_scope_id != 0 && bindnet->sin6_scope_id != if_addr->interface_num)
+			continue;
+
 		totemip_copy(&bn_netaddr, bindnet);
 		totemip_copy(&bn_netaddr, bindnet);
 		totemip_copy(&if_netaddr, &if_addr->ip_addr);
 		totemip_copy(&if_netaddr, &if_addr->ip_addr);