On Mon, Apr 18, 2016 at 07:16:31PM +1000, Aristedes Maniatis wrote:
> I have a server where I upgraded csync2 to version 2.0 by mistake. 
> Unfortunately I cannot find any changelogs or documentation for the new 
> version. I started reading commit messages, but its pretty slow going.
> 
> Unfortunately csync now binds only to the ipv6 address and ignores all the 
> ipv4 addresses. Running csync like this:

I don't think so.
It's supposed to bind to something that is suitable for *both* IPv6 and IPv4.

Tried to "telnet" (or socat) to that port, using an IPv4 address?
Should give at least an established TCP connection.


>     csync2 -ii -v
> 
> gives me only
> 
>     # netstat -na | grep 30865
>     tcp6       0      0 *.30865                *.*                    LISTEN
> 
> 
> Although I don't have ipv6 specifically configured, it is enabled in
> the kernel and present on localhost. It appears that ipv6 prevents
> csync listening on ipv4 at all.
> 
> 
> # ifconfig
> em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>       
> options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
>       ether 00:30:48:7d:26:50
>       nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>       media: Ethernet autoselect (1000baseT <full-duplex>)
>       status: active
> em1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>       
> options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
>       ether 00:30:48:7d:26:50
>       nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>       media: Ethernet autoselect (1000baseT <full-duplex>)
>       status: active
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
>       options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
>       inet6 ::1 prefixlen 128
>       inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
>       inet 127.0.0.1 netmask 0xff000000
>       nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
> lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
>       
> options=4219b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,WOL_MAGIC,VLAN_HWTSO>
>       ether 00:30:48:7d:26:50
>       inet 10.100.2.1 netmask 0xffff0000 broadcast 10.100.255.255
>       inet 10.100.53.1 netmask 0xffffffff broadcast 10.100.53.1
>       inet 10.100.80.1 netmask 0xffffffff broadcast 10.100.80.1
>       inet 10.100.48.1 netmask 0xffffffff broadcast 10.100.48.1
>       nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
>       media: Ethernet autoselect
>       status: active
>       laggproto failover lagghash l2,l3,l4
>       laggport: em0 flags=5<MASTER,ACTIVE>
>       laggport: em1 flags=0<>
> 
> 
> 
> Is there a way to force csync to bind to a specific IP address?
> Or compile out ipv6 support completely?

You can tell it to bind to "-N your.node.name".
If not specified, it will use the "any" address
(pass a NULL node to getaddrinfo)

The relevant function is "csync_server_bind()" in csync2.c

It uses getaddrinfo with hints set to AF_UNSPEC to get
at a socket address to bind to that is supposed
to allow both IPv6 and IPv4.
At least that's how it works here.

If you want a personal quickfix,
you can s/AF_UNSPEC/AF_INET/ and hope for the best.

If you want to figure out what actually goes wrong,
and help find a real fix, that's the place to start.

Cheers,

        Lars

_______________________________________________
Csync2 mailing list
Csync2@lists.linbit.com
http://lists.linbit.com/mailman/listinfo/csync2

Reply via email to