Hello,

We are currently trying to use Corosync (trunk) on FreeBSD with IPv6 addresses, and we have some issues: - Coroparse.c has some difficulties with the character ':' in IPv6 addresses (Is there even a reason to consider ':' as a whitespace ?). One of our interns (Aurelien Ansel) made the patch joined to this mail to fix this issue.
- Once coroparse.c is fixed, we get the following assertion error:
Assertion failed: (instance->my_id.addr[iface_no].nodeid), function main_iface_change_fn, file totemsrp.c, line 4254.

The first issue happens likely on every OS, but we would like to know if someone else experienced/-es the second one (preferably on another OS to figure out if it's due to a BSD-ism or not).

Just for the record, I've also attached the corosync.conf we used for our test.

diff --git a/trunk/exec/coroparse.c b/trunk/exec/coroparse.c
index 82abe83..ee38bc1 100644
--- a/trunk/exec/coroparse.c
+++ b/trunk/exec/coroparse.c
@@ -86,6 +86,19 @@ static char *remove_whitespace(char *string)
        return start;
 }
 
+static char *remove_whitespace_value(char *string)
+{
+       char *start = string+strspn(string, " \t");
+       char *end = start+(strlen(start))-1;
+
+       while ((*end == ' ' || *end == '\t' || *end == '{') && end > start)
+               end--;
+       if (end != start)
+               *(end+1) = '\0';
+
+       return start;
+}
+
 #define PCHECK_ADD_SUBSECTION 1
 #define PCHECK_ADD_ITEM       2
 
@@ -155,7 +168,7 @@ static int parse_section(FILE *fp,
 
                        *(loc-1) = '\0';
                        key = remove_whitespace(line);
-                       value = remove_whitespace(loc);
+                       value = remove_whitespace_value(loc);
                        if (parser_check_item_call) {
                                if (!parser_check_item_call(objdb, 
parent_handle, PCHECK_ADD_ITEM,
                                    key, error_string))
-- 
1.6.4

aisexec {
        user: camu 
        group: camu
}

totem {
        version: 2
        nodeid: 999
        threads: 0
        secauth: off
        vsftype: none
        rrp_mode: active
        heartbeat_failures_allowed: 3
        max_network_delay: 50
        interface {
                ringnumber: 0
                bindnetaddr: fe80::223:aeff:fe6c:c046
                mcastport: 5405
                mcastaddr: ff02:1::
        }
}

logging {
        to_stderr: yes
        to_file: no
        timestamp: on
        debug: off
}

amf {
        mode: disabled
}

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

_______________________________________________
Openais mailing list
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/openais

Reply via email to