From 9e00067635ef677a6a5b9114c1717edcd52520ade2a0fc63389dfcfe45669c96 Mon Sep 17 00:00:00 2001 From: Xin Liang Date: Wed, 22 Apr 2020 14:18:54 +0000 Subject: [PATCH] Accepting request 796298 from home:XinLiang:branches:network:ha-clustering:Factory - Revoke the patch bug-1163460-totemip-Add-support-for-sin6_scope_id.patch Deleted: bug-1163460-totemip-Add-support-for-sin6_scope_id.patch Reason: That path will cause problems while doing rolling upgrade, see bsc#1168771 OBS-URL: https://build.opensuse.org/request/show/796298 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/corosync?expand=0&rev=171 --- ...otemip-Add-support-for-sin6_scope_id.patch | 109 ------------------ corosync.changes | 8 ++ corosync.spec | 2 - 3 files changed, 8 insertions(+), 111 deletions(-) delete mode 100644 bug-1163460-totemip-Add-support-for-sin6_scope_id.patch diff --git a/bug-1163460-totemip-Add-support-for-sin6_scope_id.patch b/bug-1163460-totemip-Add-support-for-sin6_scope_id.patch deleted file mode 100644 index be3694a..0000000 --- a/bug-1163460-totemip-Add-support-for-sin6_scope_id.patch +++ /dev/null @@ -1,109 +0,0 @@ -From 36938e24a8d03f9b8fc97768ed08df36e63f61d0 Mon Sep 17 00:00:00 2001 -From: liangxin1300 -Date: Mon, 17 Feb 2020 22:24:31 +0800 -Subject: [PATCH] totemip: Add support for sin6_scope_id - -sin6_scope_id was not present in totemip structure making impossible to -use link-local ipv6 address. - -Patch adds sin6_scope_id and changes convert/copy functions to use it -(formally also comparator functions should be changed, but it seems to -cause more harm and it is not really needed). - -This makes corosync work with link-local addresses fine for both UDPU -and UDP transport as long as interface specification is used (so -fe80::xxxx:xxxx:xxxx:xxxx%eth0). - -(backported from master 934c47ed4384daf2819c26306bebba3225807499) - -Signed-off-by: liangxin1300 -Reviewed-by: Jan Friesse ---- - exec/totemip.c | 15 +++++++++++---- - include/corosync/coroapi.h | 1 + - include/corosync/totem/totemip.h | 1 + - 3 files changed, 13 insertions(+), 4 deletions(-) - -diff --git a/exec/totemip.c b/exec/totemip.c -index 28a88365..d8130831 100644 ---- a/exec/totemip.c -+++ b/exec/totemip.c -@@ -247,7 +247,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 = 2; -+ sin->sin6_scope_id = ip_addr->sin6_scope_id; - memcpy(&sin->sin6_addr, ip_addr->addr, sizeof(struct in6_addr)); - - *addrlen = sizeof(struct sockaddr_in6); -@@ -282,10 +282,13 @@ 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)); -- else -+ totemip->sin6_scope_id = 0; -+ } else { - memcpy(totemip->addr, &sa6->sin6_addr, sizeof(struct in6_addr)); -+ totemip->sin6_scope_id = sa6->sin6_scope_id; -+ } - - freeaddrinfo(ainfo); - return 0; -@@ -304,6 +307,7 @@ 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; - } - -@@ -312,7 +316,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; -@@ -445,6 +449,9 @@ int totemip_iface_check(struct totem_ip_address *bindnet, - if (addr_len == 0) - continue ; - -+ if (bindnet->sin6_scope_id != 0 && bindnet->sin6_scope_id != if_addr->interface_num) -+ continue; -+ - totemip_copy(&bn_netaddr, bindnet); - totemip_copy(&if_netaddr, &if_addr->ip_addr); - -diff --git a/include/corosync/coroapi.h b/include/corosync/coroapi.h -index 7e1f27cb..00173001 100644 ---- a/include/corosync/coroapi.h -+++ b/include/corosync/coroapi.h -@@ -112,6 +112,7 @@ struct totem_ip_address { - unsigned int nodeid; - unsigned short family; - unsigned char addr[TOTEMIP_ADDRLEN]; -+ unsigned int sin6_scope_id; - } __attribute__((packed)); - #endif - -diff --git a/include/corosync/totem/totemip.h b/include/corosync/totem/totemip.h -index 0168e66c..2ae0e03e 100644 ---- a/include/corosync/totem/totemip.h -+++ b/include/corosync/totem/totemip.h -@@ -65,6 +65,7 @@ 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 --- -2.21.1 - diff --git a/corosync.changes b/corosync.changes index 9561f65..d1cb93a 100644 --- a/corosync.changes +++ b/corosync.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Wed Apr 22 14:13:26 UTC 2020 - XinLiang + +- Revoke the patch bug-1163460-totemip-Add-support-for-sin6_scope_id.patch + Deleted: bug-1163460-totemip-Add-support-for-sin6_scope_id.patch + + Reason: That path will cause problems while doing rolling upgrade, see bsc#1168771 + ------------------------------------------------------------------- Fri Mar 20 14:07:26 UTC 2020 - XinLiang diff --git a/corosync.spec b/corosync.spec index d3b73a7..df89c4c 100644 --- a/corosync.spec +++ b/corosync.spec @@ -66,7 +66,6 @@ Patch7: corosync-2.3.4-fix-bashisms.patch Patch8: corosync-init-lockfile-path-error.patch Patch9: corosync-start-stop-level.patch Patch10: bug-1166899-quorumtool-Fix-exit-status-codes.patch -Patch11: bug-1163460-totemip-Add-support-for-sin6_scope_id.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build # openais is indeed gone and should be uninstalled. Yes, we do not @@ -142,7 +141,6 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build %patch8 -p1 %patch9 -p1 %patch10 -p1 -%patch11 -p1 %build %if %{with runautogen}