ACK

On 05/11/14 15:42, Jan Friesse wrote:
Checking code was there, sadly not correct, so it was possible to enter
one bindnet addr as IPv4 and second as IPv6. Fix is trivial.

Signed-off-by: Jan Friesse <[email protected]>
---
  exec/totemconfig.c |   11 ++++++-----
  1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/exec/totemconfig.c b/exec/totemconfig.c
index 1f969c3..edcb606 100644
--- a/exec/totemconfig.c
+++ b/exec/totemconfig.c
@@ -507,21 +507,22 @@ int totem_config_validate (
                        goto parse_error;
                }

-               if (totem_config->broadcast_use == 0 && 
totem_config->transport_number == 0) {
+               if (totem_config->broadcast_use == 0 && 
totem_config->transport_number == TOTEM_TRANSPORT_UDP) {
                        if (totem_config->interfaces[i].mcast_addr.family != 
totem_config->interfaces[i].bindnet.family) {
                                error_reason = "Multicast address family does not 
match bind address family";
                                goto parse_error;
                        }

-                       if (totem_config->interfaces[i].mcast_addr.family != 
totem_config->interfaces[i].bindnet.family) {
-                               error_reason =  "Not all bind address belong to the 
same IP family";
-                               goto parse_error;
-                       }
                        if (totemip_is_mcast 
(&totem_config->interfaces[i].mcast_addr) != 0) {
                                error_reason = "mcastaddr is not a correct multicast 
address.";
                                goto parse_error;
                        }
                }
+
+               if (totem_config->interfaces[0].bindnet.family != 
totem_config->interfaces[i].bindnet.family) {
+                       error_reason =  "Not all bind address belong to the same IP 
family";
+                       goto parse_error;
+               }
        }

        if (totem_config->version != 2) {


_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss

Reply via email to