From 5896eaf8cf3b9a9c9c60b6b44925039f3ca4e71f Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Dec 08 2015 10:22:53 +0000 Subject: import corosync-2.3.4-7.el7_2.1 --- diff --git a/SOURCES/bz1283067-1-totemudp-Move-udp-bind-so-that-multicast-works-with-.patch b/SOURCES/bz1283067-1-totemudp-Move-udp-bind-so-that-multicast-works-with-.patch new file mode 100644 index 0000000..89b618c --- /dev/null +++ b/SOURCES/bz1283067-1-totemudp-Move-udp-bind-so-that-multicast-works-with-.patch @@ -0,0 +1,62 @@ +From 165561df9ba1e0be2a11ff550b70da94990eb2f5 Mon Sep 17 00:00:00 2001 +From: Christine Caulfield +Date: Mon, 16 Nov 2015 16:00:36 +0000 +Subject: [PATCH] totemudp: Move udp bind() so that multicast works with IPv6 + +It seems that the IPv6 multicast parameters only take effect when bind() +is called, so I've moved the mcast recv socket bind() to the bottom of +totemudp_build_sockets_ip(). + +Signed-off-by: Christine Caulfield +Reviewed-by: Jan Friesse +--- + exec/totemudp.c | 26 ++++++++++++++------------ + 1 files changed, 14 insertions(+), 12 deletions(-) + +diff --git a/exec/totemudp.c b/exec/totemudp.c +index 8ed87ce..31d0570 100644 +--- a/exec/totemudp.c ++++ b/exec/totemudp.c +@@ -761,18 +761,6 @@ static int totemudp_build_sockets_ip ( + } + + /* +- * Bind to multicast socket used for multicast receives +- */ +- totemip_totemip_to_sockaddr_convert(mcast_address, +- instance->totem_interface->ip_port, &sockaddr, &addrlen); +- res = bind (sockets->mcast_recv, (struct sockaddr *)&sockaddr, addrlen); +- if (res == -1) { +- LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, +- "Unable to bind the socket to receive multicast packets"); +- return (-1); +- } +- +- /* + * Create local multicast loop socket + */ + if (socketpair(AF_UNIX, SOCK_DGRAM, 0, sockets->local_mcast_loop) == -1) { +@@ -1054,6 +1042,20 @@ static int totemudp_build_sockets_ip ( + break; + } + ++ /* ++ * Bind to multicast socket used for multicast receives ++ * This needs to happen after all of the multicast setsockopt() calls ++ * as the kernel seems to only put them into effect (for IPV6) when bind() ++ * is called. ++ */ ++ totemip_totemip_to_sockaddr_convert(mcast_address, ++ instance->totem_interface->ip_port, &sockaddr, &addrlen); ++ res = bind (sockets->mcast_recv, (struct sockaddr *)&sockaddr, addrlen); ++ if (res == -1) { ++ LOGSYS_PERROR (errno, instance->totemudp_log_level_warning, ++ "Unable to bind the socket to receive multicast packets"); ++ return (-1); ++ } + return 0; + } + +-- +1.7.1 + diff --git a/SPECS/corosync.spec b/SPECS/corosync.spec index 40d1334..912abde 100644 --- a/SPECS/corosync.spec +++ b/SPECS/corosync.spec @@ -21,7 +21,7 @@ Name: corosync Summary: The Corosync Cluster Engine and Application Programming Interfaces Version: 2.3.4 -Release: 7%{?gitver}%{?dist} +Release: 7%{?gitver}%{?dist}.1 License: BSD Group: System Environment/Base URL: http://www.corosync.org/ @@ -56,6 +56,7 @@ Patch25: bz1229194-2-votequorum-Fix-auto_tie_breaker-behaviour-in-odd-siz.patch Patch26: bz1226842-1-Add-note-about-rrp-active-beeing-unsupported.patch Patch27: bz1225441-1-Log-Add-logrotate-configuration-file.patch Patch28: bz682771-3-Don-t-link-with-libz-when-not-needed.patch +Patch29: bz1283067-1-totemudp-Move-udp-bind-so-that-multicast-works-with-.patch %if 0%{?rhel} ExclusiveArch: i686 x86_64 s390x @@ -133,6 +134,7 @@ BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX) %patch26 -p1 -b .bz1226842-1 %patch27 -p1 -b .bz1225441-1 %patch28 -p1 -b .bz682771-3 +%patch29 -p1 -b .bz1283067-1 %build %if %{with runautogen} @@ -396,6 +398,12 @@ The Corosync Cluster Engine APIs. %{_mandir}/man8/quorum_overview.8* %changelog +* Wed Nov 18 2015 Jan Friesse 2.3.4-7.1 +- Resolves: rhbz#1283067 + +- totemudp: Move udp bind() so that multicast works with IPv6 (rhbz#1283067) +- merge upstream commit 165561df9ba1e0be2a11ff550b70da94990eb2f5 (rhbz#1283067) + * Mon Jun 22 2015 Jan Friesse 2.3.4-7 - Related: rhbz#682771