ClusterLabs/resource-agents — Issue #29: Failed to bind IPv6 address on adaptor using IPv6addr.c resource agents
Author: jackwangchina
Created: 2011-11-01 08:34:45+00:00
State: open

Environment 1:(32bit Fedora12)

uname -a
Linux localhost.localdomain 2.6.32.26-175.fc12.i686.PAE #1 SMP Wed Dec 1 21:45:50 UTC 2010 i686 i686 i386 GNU/Linux

cat /etc/issue
Fedora release 12 (Constantine)

resource-agents: resource-agents-3.0.17-1.fc12.i686

pacemaker: pacemaker-1.0.7-1.fc12.i686

crm configure primitive test_IPv6 ocf:heartbeat:IPv6addr params ipv6addr="fe80::0250:56ff:fea2:ff3" cidr_netmask="64" nic="eth0" op monitor timeout="15s" interval="15s"

we can find fe80::0250:56ff:fea2:ff3 binded to eth0,but there's error message in /var/log/messages:
ocalhost IPv6addr: [13246]: ERROR: bind() failed: Invalid argument

This really can bind ipv6 address on adaptor ,but there's error message!!!!!!

Environment 1:(64bit Centos5.5)
uname -a
Linux localhost.localdomain 2.6.18-194.el5 #1 SMP Fri Apr 2 14:58:14 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

cat /etc/issue
CentOS release 5.5 (Final)

resource-agents : resource-agents-1.0.4-1.1.el5
pacemaker:pacemaker-1.0.11-1.2.el5

crm configure primitive test_IPv6 ocf:heartbeat:IPv6addr params ipv6addr="fe80::0250:56ff:fea2:ff3" cidr_netmask="64" nic="eth0" op monitor timeout="15s" interval="15s",

we can find we can find fe80::0250:56ff:fea2:ff3 could not bind to eth0,
error log in /var/log/messages:
Nov 1 03:06:37 localhost IPv6addr: [5372]: ERROR: bind() failed: Invalid argument
Nov 1 03:06:37 localhost kernel: IPv6addr[5372]: segfault at 0000003ffffffffd rip 0000003dae27273e rsp 00007fffe1cb8b00 error 4
Nov 1 03:06:37 localhost lrmd: [5330]: WARN: Managed testbni_1:start process 5372 killed by signal 11 [SIGSEGV - Segmentation violation].
Nov 1 03:06:37 localhost lrmd: [5330]: ERROR: Managed testbni_1:start process 5372 dumped core

I debug the code find that the Invalid argument is not a big deal,it seemed u_int8_t *payload in send_ua(struct in6_addr* src_ip, char* if_name) not initiallized on 64-bit os,and then when free(payload) ,kernel error happens!!!

I check the source code of these 2 IPv6addr.c is the same ,if i compile on the first env(fedora12) ,then copied to centos(64-bit),and create resource ,it can bind ipv6 address to adaptor ,the same with working on env1,also have error messages.