From owner-svn-ports-head@freebsd.org Tue Jul 10 13:05:10 2018 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C46761023384; Tue, 10 Jul 2018 13:05:10 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79F0475A46; Tue, 10 Jul 2018 13:05:10 +0000 (UTC) (envelope-from ehaupt@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5707B24529; Tue, 10 Jul 2018 13:05:10 +0000 (UTC) (envelope-from ehaupt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w6AD5Ah1057239; Tue, 10 Jul 2018 13:05:10 GMT (envelope-from ehaupt@FreeBSD.org) Received: (from ehaupt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w6AD59lW057237; Tue, 10 Jul 2018 13:05:09 GMT (envelope-from ehaupt@FreeBSD.org) Message-Id: <201807101305.w6AD59lW057237@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ehaupt set sender to ehaupt@FreeBSD.org using -f From: Emanuel Haupt Date: Tue, 10 Jul 2018 13:05:09 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r474364 - in head/dns/utdns: . files X-SVN-Group: ports-head X-SVN-Commit-Author: ehaupt X-SVN-Commit-Paths: in head/dns/utdns: . files X-SVN-Commit-Revision: 474364 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.27 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: Tue, 10 Jul 2018 13:05:11 -0000 Author: ehaupt Date: Tue Jul 10 13:05:09 2018 New Revision: 474364 URL: https://svnweb.freebsd.org/changeset/ports/474364 Log: Provide a patch to specify the destination port. Added: head/dns/utdns/files/patch-src_utdns.c (contents, props changed) Modified: head/dns/utdns/Makefile Modified: head/dns/utdns/Makefile ============================================================================== --- head/dns/utdns/Makefile Tue Jul 10 13:03:02 2018 (r474363) +++ head/dns/utdns/Makefile Tue Jul 10 13:05:09 2018 (r474364) @@ -4,6 +4,7 @@ PORTNAME= utdns PORTVERSION= 1.0 DISTVERSIONSUFFIX= .r1437 +PORTREVISION= 1 CATEGORIES= dns MASTER_SITES= https://www.cypherpunk.at/download/utdns/ \ LOCAL/ehaupt Added: head/dns/utdns/files/patch-src_utdns.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/dns/utdns/files/patch-src_utdns.c Tue Jul 10 13:05:09 2018 (r474364) @@ -0,0 +1,45 @@ +--- src/utdns.c.orig 2013-04-17 08:20:51 UTC ++++ src/utdns.c +@@ -622,7 +622,8 @@ static void usage(const char *argv0) + " -4 .......... Bind to IPv4 only instead of IP + IPv6.\n" + " -b .......... Background process and log to syslog.\n" + " -d .......... Set log level to LOG_DEBUG.\n" +- " -p ... Set incoming UDP port number.\n", ++ " -p ... Set incoming UDP port number.\n" ++ " -P ... Set destination port number.\n", + argv0); + } + +@@ -642,7 +643,8 @@ int main(int argc, char **argv) + (void) init_log("stderr", debuglevel); + #endif + +- while ((c = getopt(argc, argv, "4bdhp:")) != -1) ++ int dst_port = 53; ++ while ((c = getopt(argc, argv, "4bdhp:P:")) != -1) + { + switch (c) + { +@@ -665,6 +667,10 @@ int main(int argc, char **argv) + case 'p': + udp_port = atoi(optarg); + break; ++ ++ case 'P': ++ dst_port = atoi(optarg); ++ break; + } + } + +@@ -674,10 +680,9 @@ int main(int argc, char **argv) + exit(EXIT_FAILURE); + } + +- // FIXME: this should not be hardcoded + memset(&in, 0, sizeof(in)); + in.sin_family = AF_INET; +- in.sin_port = htons(53); ++ in.sin_port = htons(dst_port); + if (!inet_aton(argv[optind], &in.sin_addr)) + { + log_msg(LOG_ERR, "could not convert %s to in_addr\n", argv[optind]);