Răsfoiți Sursa

Revert "totemip: Add support for sin6_scope_id"

This reverts commit 02a760f9ac3587970f55aa4c3e94fa5b0615e313 which is
causing protocol incompatibility.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Jan Friesse 5 ani în urmă
părinte
comite
65d66ae98a
3 a modificat fișierele cu 4 adăugiri și 10 ștergeri
  1. 4 8
      exec/totemip.c
  2. 0 1
      include/corosync/coroapi.h
  3. 0 1
      include/corosync/totem/totemip.h

+ 4 - 8
exec/totemip.c

@@ -296,7 +296,7 @@ int totemip_totemip_to_sockaddr_convert(struct totem_ip_address *ip_addr,
 #endif
 		sin->sin6_family = ip_addr->family;
 		sin->sin6_port = ntohs(port);
-		sin->sin6_scope_id = ip_addr->sin6_scope_id;
+		sin->sin6_scope_id = 2;
 		memcpy(&sin->sin6_addr, ip_addr->addr, sizeof(struct in6_addr));
 
 		*addrlen = sizeof(struct sockaddr_in6);
@@ -331,13 +331,10 @@ int totemip_parse(struct totem_ip_address *totemip, const char *addr, int family
 	sa6 = (struct sockaddr_in6 *)ainfo->ai_addr;
 	totemip->family = ainfo->ai_family;
 
-	if (ainfo->ai_family == AF_INET) {
+	if (ainfo->ai_family == AF_INET)
 		memcpy(totemip->addr, &sa->sin_addr, sizeof(struct in_addr));
-	        totemip->sin6_scope_id = 0;
-	} else {
+	else
 		memcpy(totemip->addr, &sa6->sin6_addr, sizeof(struct in6_addr));
-	        totemip->sin6_scope_id = sa6->sin6_scope_id;
-        }
 
 	freeaddrinfo(ainfo);
 	return 0;
@@ -356,7 +353,6 @@ int totemip_sockaddr_to_totemip_convert(const struct sockaddr_storage *saddr,
 		const struct sockaddr_in *sin = (const struct sockaddr_in *)saddr;
 
 		memcpy(ip_addr->addr, &sin->sin_addr, sizeof(struct in_addr));
-		ip_addr->sin6_scope_id = 0;
 		ret = 0;
 	}
 
@@ -365,7 +361,7 @@ int totemip_sockaddr_to_totemip_convert(const struct sockaddr_storage *saddr,
 		  = (const struct sockaddr_in6 *)saddr;
 
 		memcpy(ip_addr->addr, &sin->sin6_addr, sizeof(struct in6_addr));
-		ip_addr->sin6_scope_id = sin->sin6_scope_id;
+
 		ret = 0;
 	}
 	return ret;

+ 0 - 1
include/corosync/coroapi.h

@@ -112,7 +112,6 @@ struct totem_ip_address {
 	unsigned int   nodeid;
 	unsigned short family;
 	unsigned char  addr[TOTEMIP_ADDRLEN];
-	unsigned int   sin6_scope_id;
 } __attribute__((packed));
 #endif
 

+ 0 - 1
include/corosync/totem/totemip.h

@@ -65,7 +65,6 @@ struct totem_ip_address
 	unsigned int   nodeid;
 	unsigned short family;
 	unsigned char  addr[TOTEMIP_ADDRLEN];
-	unsigned int   sin6_scope_id;
 } __attribute__((packed));
 
 struct totem_ip_if_address