From nobody Mon Jan 24 08:34:23 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id A4313198FAB7; Mon, 24 Jan 2022 08:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Jj3Dv3Ws8z4dJs; Mon, 24 Jan 2022 08:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643013263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdqLHS1zIPGRe5EuIXBoQ+L5kJqS1Y8RC4sjV9GYY1c=; b=K0yYOGyS1dqT81/KgC1LzLiJ8xOgML8cv+13Nt/rHBlKa0Id7VGIX5cKR94r/SJzM92sMn SN4GVi32BBOxfBMTzLKGHJSWLRyc/a6KN9zFbW1tEZsUm1/k1dtd1Yei86wOH6FrJnmHXc ChrfCBlTWGgs2kLyZQEbsSkB0QGxfOMPG7XxgbYiFmX2vkrIuZOMgr2zMpqWciWMBojXxM oHuJBlSDbzDmEq9/i52kU6tlpRpXkuFH8sYCJ1ve6lPt2BMfkGAW+ccp46V/RzwkdFs9iW fOgPX5UMLOZVvwehEMLaJ5vGlzqvocPHzkQmQ4rfGcfo4wG0r7bjONvrQmT9KA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5221112ECB; Mon, 24 Jan 2022 08:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20O8YNMh078633; Mon, 24 Jan 2022 08:34:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20O8YNak078632; Mon, 24 Jan 2022 08:34:23 GMT (envelope-from git) Date: Mon, 24 Jan 2022 08:34:23 GMT Message-Id: <202201240834.20O8YNak078632@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 45bed8722929 - main - mail/mlmmj: fix ipv6 support List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45bed872292949334ac6e47c409002e1f93b1043 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1643013263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FdqLHS1zIPGRe5EuIXBoQ+L5kJqS1Y8RC4sjV9GYY1c=; b=oqPQxS7gOWFtMDvf6KitNL3wMoXJ92rXESM1n+MKKejS5u81RDhDXvenyU2mrWb6AP7iv0 TFfmyFe5hXj1YWkS4fDfyL/3SULulXeK74cJ6RajsWEZ3HgsHn7LVbDh3qy4l6WhP2n4xw i9s8HELTGVAo0K7PpISKbL9xUNe4Sc/d7Y+biHDUT07zwhYpgdJc97xtiWFXXAb8VgUAuQ YPX/9zJ+zOulP3emuejgWxntexPZ8232sfxumjyRGcansKXVET0VUdCgmzVpC5t9taO87x we9Wx85RsDiS+pxpAyAR1hdj81Q4mq2zxqkbJt/k6L9QSjNo7fglnLMxyYgLTg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1643013263; a=rsa-sha256; cv=none; b=wb9y/LyQj9cegCXDefn3/PPzW0a1GVLTJszPwXqDpmJLa8mOSD/j80uXraxHD1tb5XLN+N W09ERDlCcuLBll2/E4IOKINU2W465Gs2rMd1royutjGgp4tm+qrqSMCzXQrtj937aeM5wS fjYvsGXb5IjvGLq1NoUv+evtPtnXUF+qV1/bQP3NBUJcJOE0ANmh0mn86fQCJH8JP6C2Bg arIDte5iQxILpdA1/9iuINrhiv2xuByklU5sLAR7rJf73XYgAZgkOecUw+By/Z5MYDHF6W tiR9rmoGNb7gylJT0y0yr1kfdswZUWMTkTbFI+w/a2ZuJhV2Z+jUMrxjCvnwOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/ports/commit/?id=45bed872292949334ac6e47c409002e1f93b1043 commit 45bed872292949334ac6e47c409002e1f93b1043 Author: Baptiste Daroussin AuthorDate: 2022-01-24 08:33:32 +0000 Commit: Baptiste Daroussin CommitDate: 2022-01-24 08:34:13 +0000 mail/mlmmj: fix ipv6 support --- mail/mlmmj/Makefile | 2 +- mail/mlmmj/files/patch-src_init__sockfd.c | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/mail/mlmmj/Makefile b/mail/mlmmj/Makefile index b8b31051d641..c1655ca42f86 100644 --- a/mail/mlmmj/Makefile +++ b/mail/mlmmj/Makefile @@ -2,7 +2,7 @@ PORTNAME= mlmmj PORTVERSION= 1.3.0 -PORTREVISION= 9 +PORTREVISION= 10 CATEGORIES= mail MASTER_SITES= http://mlmmj.org/releases/ diff --git a/mail/mlmmj/files/patch-src_init__sockfd.c b/mail/mlmmj/files/patch-src_init__sockfd.c index 5eb98647a35d..009c421a3f84 100644 --- a/mail/mlmmj/files/patch-src_init__sockfd.c +++ b/mail/mlmmj/files/patch-src_init__sockfd.c @@ -8,7 +8,7 @@ #include #include #include -@@ -29,35 +30,53 @@ +@@ -29,35 +30,50 @@ #include #include #include @@ -32,6 +32,8 @@ } - *sockfd = socket(PF_INET, SOCK_STREAM, 0); +- if(*sockfd == -1) { +- log_error(LOG_ARGS, "Could not get socket"); + memset(&hints, 0, sizeof(hints)); + hints.ai_socktype = SOCK_STREAM; + hints.ai_family = PF_UNSPEC; @@ -39,10 +41,6 @@ + if (getaddrinfo(relayhost, srv, &hints, &ai) != 0) { + log_error(LOG_ARGS, "Unable to lookup for relayhost %s:%s", + relayhost, srv); -+ return; -+ } - if(*sockfd == -1) { - log_error(LOG_ARGS, "Could not get socket"); return; } - addr.sin_family = PF_INET; @@ -50,11 +48,12 @@ - addr.sin_port = htons(port); - len = sizeof(addr); - if(connect(*sockfd, (struct sockaddr *)&addr, len) == -1) { ++ + for (curai = ai; curai != NULL; curai = curai->ai_next) { + if ((sd = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { + continue; + } -+ if (connect(sd, ai->ai_addr, ai->ai_addrlen) == 0) { ++ if (connect(sd, ai->ai_addr, ai->ai_addrlen) != 0) { + close(sd); + sd = -1; + continue;