From owner-svn-ports-head@freebsd.org Wed Nov 29 13:12:25 2017 Return-Path: Delivered-To: svn-ports-head@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 E4521E53AED; Wed, 29 Nov 2017 13:12:25 +0000 (UTC) (envelope-from des@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 A93A173C34; Wed, 29 Nov 2017 13:12:25 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vATDCOIn087937; Wed, 29 Nov 2017 13:12:24 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vATDCOlC087934; Wed, 29 Nov 2017 13:12:24 GMT (envelope-from des@FreeBSD.org) Message-Id: <201711291312.vATDCOlC087934@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 29 Nov 2017 13:12:24 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r455109 - in head/net-mgmt/collectd5: . files X-SVN-Group: ports-head X-SVN-Commit-Author: des X-SVN-Commit-Paths: in head/net-mgmt/collectd5: . files X-SVN-Commit-Revision: 455109 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 29 Nov 2017 13:12:26 -0000 Author: des Date: Wed Nov 29 13:12:24 2017 New Revision: 455109 URL: https://svnweb.freebsd.org/changeset/ports/455109 Log: Add a patch that sends a probe packet to the server when setting up the client socket. It helps in a few cases where the server has multiple addresses, only some of them are reachable, and connect() succeeds even though sendto() will fail. Approved by: maintainer Added: head/net-mgmt/collectd5/files/patch-src_libcollectdclient_network.c (contents, props changed) head/net-mgmt/collectd5/files/patch-src_network.c (contents, props changed) Modified: head/net-mgmt/collectd5/Makefile Modified: head/net-mgmt/collectd5/Makefile ============================================================================== --- head/net-mgmt/collectd5/Makefile Wed Nov 29 12:53:57 2017 (r455108) +++ head/net-mgmt/collectd5/Makefile Wed Nov 29 13:12:24 2017 (r455109) @@ -3,6 +3,7 @@ PORTNAME= collectd PORTVERSION= 5.8.0 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= https://storage.googleapis.com/collectd-tarballs/ PKGNAMESUFFIX= 5 Added: head/net-mgmt/collectd5/files/patch-src_libcollectdclient_network.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/collectd5/files/patch-src_libcollectdclient_network.c Wed Nov 29 13:12:24 2017 (r455109) @@ -0,0 +1,16 @@ +--- src/libcollectdclient/network.c.orig ++++ src/libcollectdclient/network.c +@@ -174,6 +174,13 @@ + continue; + } + ++ status = sendto(srv->fd, "", 1, 0, ai_ptr->ai_addr, ai_ptr->ai_addrlen); ++ if (status != 1) { ++ close(srv->fd); ++ srv->fd = -1; ++ continue; ++ } ++ + srv->sa = malloc(ai_ptr->ai_addrlen); + if (srv->sa == NULL) { + close(srv->fd); Added: head/net-mgmt/collectd5/files/patch-src_network.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/net-mgmt/collectd5/files/patch-src_network.c Wed Nov 29 13:12:24 2017 (r455109) @@ -0,0 +1,16 @@ +--- src/network.c.orig ++++ src/network.c +@@ -2000,6 +2000,13 @@ + continue; + } + ++ status = sendto(client->fd, "", 1, 0, ai_ptr->ai_addr, ai_ptr->ai_addrlen); ++ if (status != 1) { ++ close(client->fd); ++ client->fd = -1; ++ continue; ++ } ++ + client->addr = calloc(1, sizeof(*client->addr)); + if (client->addr == NULL) { + ERROR("network plugin: calloc failed.");