From owner-svn-ports-all@freebsd.org Wed Apr 27 20:05:12 2016 Return-Path: Delivered-To: svn-ports-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1F6EB1E26A; Wed, 27 Apr 2016 20:05:12 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85B0E138E; Wed, 27 Apr 2016 20:05:12 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u3RK5B0C095219; Wed, 27 Apr 2016 20:05:11 GMT (envelope-from tijl@FreeBSD.org) Received: (from tijl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u3RK5Bd0095217; Wed, 27 Apr 2016 20:05:11 GMT (envelope-from tijl@FreeBSD.org) Message-Id: <201604272005.u3RK5Bd0095217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: tijl set sender to tijl@FreeBSD.org using -f From: Tijl Coosemans Date: Wed, 27 Apr 2016 20:05:11 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r414130 - in head/net/csync2: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: SVN commit messages for the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Apr 2016 20:05:12 -0000 Author: tijl Date: Wed Apr 27 20:05:11 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) Added: head/net/csync2/files/patch-csync2.c (contents, props changed) Modified: head/net/csync2/Makefile Modified: head/net/csync2/Makefile ============================================================================== --- head/net/csync2/Makefile Wed Apr 27 19:24:33 2016 (r414129) +++ head/net/csync2/Makefile Wed Apr 27 20:05:11 2016 (r414130) @@ -3,7 +3,7 @@ PORTNAME= csync2 PORTVERSION= 2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net MASTER_SITES= http://oss.linbit.com/csync2/ Added: head/net/csync2/files/patch-csync2.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net/csync2/files/patch-csync2.c Wed Apr 27 20:05:11 2016 (r414130) @@ -0,0 +1,21 @@ +--- csync2.c.orig 2013-05-02 12:58:04 UTC ++++ csync2.c +@@ -256,7 +256,7 @@ static int csync_server_bind(void) + struct addrinfo hints; + struct addrinfo *result, *rp; + int save_errno; +- int sfd = -1, s, on = 1; ++ int sfd = -1, s, off = 0, on = 1; + memset(&hints, 0, sizeof(struct addrinfo)); + hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */ + hints.ai_socktype = SOCK_STREAM; +@@ -284,6 +284,9 @@ static int csync_server_bind(void) + goto error; + if (setsockopt(sfd, IPPROTO_TCP, TCP_NODELAY, &on, (socklen_t) sizeof(on)) < 0) + goto error; ++ if (rp->ai_family == AF_INET6) ++ if (setsockopt(sfd, IPPROTO_IPV6, IPV6_V6ONLY, &off, (socklen_t) sizeof(off)) < 0) ++ goto error; + + if (bind(sfd, rp->ai_addr, rp->ai_addrlen) == 0) + break; /* Success */