Bug 208928 - net/csync2 binds only to ipv6
Summary: net/csync2 binds only to ipv6
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Many People
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-20 04:19 UTC by ari
Modified: 2016-04-27 20:08 UTC (History)
1 user (show)

See Also:
alexey: maintainer-feedback+


Attachments
patch-csync2.c (772 bytes, patch)
2016-04-25 14:36 UTC, Tijl Coosemans
tijl: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ari 2016-04-20 04:19:36 UTC
Since the upgrade to 2.0, csync now binds only to IPv6 where that is available on the system.

http://lists.linbit.com/pipermail/csync2/2016-April/000020.html
Comment 1 Alexey Degtyarev 2016-04-23 18:27:31 UTC
Did you missed to attach a patch to approve?

BTW, see no reason to change default $csync2_flags unless something is broken.  Please use your own combination in rc.conf(5).
Comment 2 ari 2016-04-25 06:04:26 UTC
I have no patch because I don't know how to fix this. If it cannot be fixed, then I think FreeBSD should revert to the 1.x versions of csync2.

I don't think it is reasonable to assume users no longer require IPv4.
Comment 3 Alexey Degtyarev 2016-04-25 06:42:51 UTC
You could set $csync2_flags to whatever you needs in rc.conf(5):

csync2_enable=yes
csync2_flags="-ii -v -N 127.0.0.1"
Comment 4 ari 2016-04-25 07:52:48 UTC
Do you think it is acceptable that users upgrading their FreeBSD ports system would be required to use an undocumented hack; which even when used, substantially changes the behaviour of the port from the previous version, since it is no longer possible to bind to multiple addresses?

I think that the philosophy of the FreeBSD ports tree would go against such surprise to users, and a more correct approach would be either to fix it (if you possess the knowledge of FreeBSD ip libraries) or revert.
Comment 5 Tijl Coosemans freebsd_committer freebsd_triage 2016-04-25 14:36:28 UTC
Created attachment 169678 [details]
patch-csync2.c

Try rebuilding csync2 with this patch in /usr/ports/net/csync2/files/.
Comment 6 ari 2016-04-27 08:02:16 UTC
I can confirm that before the patch I see this:

# netstat -na | grep 30865
tcp6       0      0 *.30865                *.*                    LISTEN

and after the patch I see:

# netstat -na | grep 30865
tcp46      0      0 *.30865                *.*                    LISTEN


Thanks for your work. I've reported it upstream to see if it might get merged.
Comment 7 Alexey Degtyarev 2016-04-27 19:23:10 UTC
Looks like nothing to approve because upstream has merged the patch?  Anyway I'm okay with that change and thanks for quick fix.
Comment 8 commit-hook freebsd_committer freebsd_triage 2016-04-27 20:05:52 UTC
A commit references this bug:

Author: tijl
Date: Wed Apr 27 20:05:11 UTC 2016
New revision: 414130
URL: https://svnweb.freebsd.org/changeset/ports/414130

Log:
  Rather than listening on two sockets, one for IPv4 and one for IPv6 the
  csync server listens on one IPv6 socket and uses IPv4 mapped IPv6 addresses
  to support IPv4.  This IPv6 feature is disabled by default on FreeBSD so
  add a patch to enable it on the server socket.

  PR:		208928
  Tested by:	ari@ish.com.au
  Approved by:	alexey@renatasystems.org (maintainer)

Changes:
  head/net/csync2/Makefile
  head/net/csync2/files/patch-csync2.c