From MAILER-DAEMON Mon Apr 26 15:29:09 2021
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1lb6uq-0005ke-7Z
	for mharc-commit-inetutils@gnu.org; Mon, 26 Apr 2021 15:29:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52744)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <simon@josefsson.org>)
 id 1lb6uo-0005ix-8j
 for commit-inetutils@gnu.org; Mon, 26 Apr 2021 15:29:06 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:45157)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <simon@josefsson.org>) id 1lb6un-0004Tl-FG
 for commit-inetutils@gnu.org; Mon, 26 Apr 2021 15:29:05 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 66976)
 id 239E920D0F; Mon, 26 Apr 2021 15:29:05 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. v2.0-7-g4587969
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4ad0b48bcba08d0b1c31bc9aafde545ac277dd43
X-Git-Newrev: 4587969cf6aa0da90508ff1e3fd7976420ee3e7c
Message-Id: <20210426192905.239E920D0F@vcs0.savannah.gnu.org>
Date: Mon, 26 Apr 2021 15:29:04 -0400 (EDT)
From: simon@josefsson.org (Simon Josefsson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Mon, 26 Apr 2021 19:29:06 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  4587969cf6aa0da90508ff1e3fd7976420ee3e7c (commit)
       via  6360616c53d868cdbbc819f99ee404517adf12d5 (commit)
      from  4ad0b48bcba08d0b1c31bc9aafde545ac277dd43 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=4587969cf6aa0da90508ff1e3fd7976420ee3e7c


commit 4587969cf6aa0da90508ff1e3fd7976420ee3e7c
Author: Ashish SHUKLA <ashish.is@lostca.se>
Date:   Sun Apr 25 09:23:41 2021 +0530

    whois: Update whois server for .IN
    
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/whois/tld_serv_list b/whois/tld_serv_list
index d9257f3..41083c1 100644
--- a/whois/tld_serv_list
+++ b/whois/tld_serv_list
@@ -151,7 +151,7 @@
 .ie	whois.domainregistry.ie
 .il	whois.isoc.org.il
 .im	whois.nic.im
-.in	whois.inregistry.net
+.in	whois.registry.in
 .io	whois.nic.io
 #.iq			# NIC?
 .ir	whois.nic.ir

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=6360616c53d868cdbbc819f99ee404517adf12d5


commit 6360616c53d868cdbbc819f99ee404517adf12d5
Author: Ashish SHUKLA <ashish.is@lostca.se>
Date:   Sun Apr 25 08:52:51 2021 +0530

    whois: .ORG is not handled by InterNIC anymore
    
    See https://www.iana.org/domains/root/db/org.html
    
    Signed-off-by: Simon Josefsson <simon@josefsson.org>

diff --git a/whois/data.h b/whois/data.h
index d1eb10a..82e22b6 100644
--- a/whois/data.h
+++ b/whois/data.h
@@ -68,7 +68,6 @@ const char *rwhois_servers[] = {
 const char *gtlds[] = {
   ".com",
   ".net",
-  ".org",
   ".edu",
   NULL
 };
diff --git a/whois/tld_serv_list b/whois/tld_serv_list
index ad7b982..d9257f3 100644
--- a/whois/tld_serv_list
+++ b/whois/tld_serv_list
@@ -219,6 +219,7 @@
 .nu	whois.nic.nu
 .nz	whois.srs.net.nz
 #.om	NONE		# NIC? http://www.gto.net.om
+.org	whois.pir.org
 .pa	WEB http://www.nic.pa
 #.pe	whois.rcp.net.pe	# kero.yachay.pe valid 2011-03-10
 .pe	kero.yachay.pe

-----------------------------------------------------------------------

Summary of changes:
 whois/data.h        | 1 -
 whois/tld_serv_list | 3 ++-
 2 files changed, 2 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


From MAILER-DAEMON Wed Apr 28 14:15:33 2021
Received: from list by lists.gnu.org with archive (Exim 4.90_1)
	id 1lboij-0003BU-OU
	for mharc-commit-inetutils@gnu.org; Wed, 28 Apr 2021 14:15:33 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:59578)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <simon@josefsson.org>)
 id 1lboii-0003BM-Gm
 for commit-inetutils@gnu.org; Wed, 28 Apr 2021 14:15:32 -0400
Received: from vcs0.savannah.gnu.org ([209.51.188.201]:49891)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <simon@josefsson.org>) id 1lboih-0003OQ-MF
 for commit-inetutils@gnu.org; Wed, 28 Apr 2021 14:15:31 -0400
Received: by vcs0.savannah.gnu.org (Postfix, from userid 66976)
 id 396AB20D0F; Wed, 28 Apr 2021 14:15:31 -0400 (EDT)
To: commit-inetutils@gnu.org
Subject: [SCM] GNU Inetutils  branch, master, updated. v2.0-8-gf70b506
X-Git-Refname: refs/heads/master
X-Git-Reftype: branch
X-Git-Oldrev: 4587969cf6aa0da90508ff1e3fd7976420ee3e7c
X-Git-Newrev: f70b506e3746bce45d1b684d5ac5ef513af73df4
Message-Id: <20210428181531.396AB20D0F@vcs0.savannah.gnu.org>
Date: Wed, 28 Apr 2021 14:15:30 -0400 (EDT)
From: simon@josefsson.org (Simon Josefsson)
X-BeenThere: commit-inetutils@gnu.org
X-Mailman-Version: 2.1.23
Precedence: list
List-Id: CVS commit notices for the GNU Internet utilities
 <commit-inetutils.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=unsubscribe>
List-Archive: <https://lists.gnu.org/archive/html/commit-inetutils>
List-Post: <mailto:commit-inetutils@gnu.org>
List-Help: <mailto:commit-inetutils-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/commit-inetutils>,
 <mailto:commit-inetutils-request@gnu.org?subject=subscribe>
X-List-Received-Date: Wed, 28 Apr 2021 18:15:32 -0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Inetutils ".

The branch, master has been updated
       via  f70b506e3746bce45d1b684d5ac5ef513af73df4 (commit)
      from  4587969cf6aa0da90508ff1e3fd7976420ee3e7c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=f70b506e3746bce45d1b684d5ac5ef513af73df4


commit f70b506e3746bce45d1b684d5ac5ef513af73df4
Author: Simon Josefsson <simon@josefsson.org>
Date:   Wed Apr 28 20:14:09 2021 +0200

    telnet: Support --bind (-b) for NetKit compatibility.
    
    * NEWS: Add.
    * doc/inetutils.texi (telnet invocation): Add --bind (-b).
    * telnet/commands.c (tn): New variables hostaddr and srchostp.
    Parse -b parameter.  Update usage string.  If -b is set, call
    getaddrinfo on it and pass that ai_addr on to bind.
    * telnet/main.c (srcaddr): New global variable.
    (argp_options): Add --bind (-b).
    (parse_opt): Set srcaddr to -b value.
    (main): Propagate -b value to tn function.

diff --git a/ChangeLog b/ChangeLog
index 3c0f942..ad515b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2021-04-28  Simon Josefsson  <simon@josefsson.org>
+
+	telnet: Support --bind (-b) for NetKit compatibility.
+	* NEWS: Add.
+	* doc/inetutils.texi (telnet invocation): Add --bind (-b).
+	* telnet/commands.c (tn): New variables hostaddr and srchostp.
+	Parse -b parameter.  Update usage string.  If -b is set, call
+	getaddrinfo on it and pass that ai_addr on to bind.
+	* telnet/main.c (srcaddr): New global variable.
+	(argp_options): Add --bind (-b).
+	(parse_opt): Set srcaddr to -b value.
+	(main): Propagate -b value to tn function.
+
 2021-02-11  Simon Josefsson  <simon@josefsson.org>
 
 	* TODO: Add items discussed on mailing list.
diff --git a/NEWS b/NEWS
index 6d3c9af..1f13094 100644
--- a/NEWS
+++ b/NEWS
@@ -2,6 +2,12 @@ GNU inetutils NEWS -- history of user-visible changes.
 
 * Noteworthy changes in release ?.? (????-??-??) [?]
 
+* telnet
+
+** Implement --bind (-b).
+
+This is used to bind to a particular local socket, for compatibility
+with NetKit's telnet.
 
 * Noteworthy changes in release 2.0 (2021-02-05) [stable]
 
diff --git a/doc/inetutils.texi b/doc/inetutils.texi
index 5fb7675..ba7c9d2 100644
--- a/doc/inetutils.texi
+++ b/doc/inetutils.texi
@@ -2996,6 +2996,12 @@ Use an 8-bit data path.
 @opindex --login
 Attempt automatic login.
 
+@item -b @var{address}
+@itemx --bind=@var{address}
+@opindex -b
+@opindex --bind
+Bind to specific local @var{address}.
+
 @item -c
 @itemx --no-rc
 @opindex -c
diff --git a/telnet/commands.c b/telnet/commands.c
index 36a951e..5cc9b4d 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -2449,7 +2449,7 @@ int
 tn (int argc, char *argv[])
 {
 #ifdef IPV6
-  struct addrinfo *result, *aip, hints;
+  struct addrinfo *result, *aip, hints, *hostaddr;
 #else
   struct hostent *host = 0;
   struct sockaddr_in sin;
@@ -2458,7 +2458,7 @@ tn (int argc, char *argv[])
 #endif
   const int on = 1;
   int err;
-  char *cmd, *hostp = 0, *portp = 0, *user = 0;
+  char *cmd, *hostp = 0, *portp = 0, *user = 0, *srchostp = 0;
 #if defined HAVE_IDN || defined HAVE_IDN2
   char *hosttmp = 0;
 #endif
@@ -2506,6 +2506,16 @@ tn (int argc, char *argv[])
 	  --argc;
 	  continue;
 	}
+      if (strcmp (*argv, "-b") == 0)
+	{
+	  --argc;
+	  ++argv;
+	  if (argc == 0)
+	    goto usage;
+	  srchostp = *argv++;
+	  --argc;
+	  continue;
+	}
       if (strcmp (*argv, "-a") == 0)
 	{
 	  --argc;
@@ -2546,7 +2556,7 @@ tn (int argc, char *argv[])
 	  continue;
 	}
     usage:
-      printf ("usage: %s [-4] [-6] [-l user] [-a] host-name [port]\n", cmd);
+      printf ("usage: %s [-4] [-6] [-l user] [-b addr] [-a] host-name [port]\n", cmd);
       return 0;
     }
   if (hostp == 0)
@@ -2624,6 +2634,18 @@ tn (int argc, char *argv[])
   hints.ai_flags = AI_IDN;
 # endif
 
+  if (srchostp)
+    {
+      err = getaddrinfo (srchostp, "0", &hints, &hostaddr);
+      if (err < 0)
+	{
+	  printf ("Could not resolve %s: %s\n", srchostp,
+		  gai_strerror (err));
+	  return 0;
+	}
+      hints.ai_family = hostaddr->ai_family;
+    }
+
   err = getaddrinfo (hostp, portp, &hints, &result);
   if (err)
     {
@@ -2669,6 +2691,16 @@ tn (int argc, char *argv[])
 	  return 0;
 	}
 
+      if (srchostp)
+	{
+	  err = bind(net, hostaddr->ai_addr, hostaddr->ai_addrlen);
+	  if (err < 0)
+	    {
+	      perror ("telnet: bind");
+	      return 0;
+	    }
+	}
+
       if (debug)
 	{
 	  err = setsockopt (net, SOL_SOCKET, SO_DEBUG, &on, sizeof (on));
@@ -2698,6 +2730,8 @@ tn (int argc, char *argv[])
     }
   while (!connected);
 
+  if (srchostp)
+    freeaddrinfo(hostaddr);
   freeaddrinfo (result);
 #else /* !IPV6 */
   temp = inet_addr (hostp);
diff --git a/telnet/main.c b/telnet/main.c
index a80d3c3..c790d6e 100644
--- a/telnet/main.c
+++ b/telnet/main.c
@@ -105,7 +105,7 @@ tninit (void)
 }
 
 int family = 0;
-char *user;
+char *user, *srcaddr;
 #ifdef	FORWARD
 extern int forward_flags;
 #endif /* FORWARD */
@@ -132,6 +132,8 @@ static struct argp_option argp_options[] = {
   /* FIXME: Called "8bit" in r* utils */
   { "binary", '8', NULL, 0,
     "use an 8-bit data transmission", GRID+1 },
+  { "bind", 'b', "ADDRESS", 0,
+    "bind to specific local ADDRESS", GRID+1 },
   { "login", 'a', NULL, 0,
     "attempt automatic login", GRID+1 },
   { "no-rc", 'c', NULL, 0,
@@ -313,6 +315,10 @@ parse_opt (int key, char *arg, struct argp_state *state _GL_UNUSED_PARAMETER)
       break;
 #endif
 
+    case 'b':
+      srcaddr = arg;
+      break;
+
     default:
       return ARGP_ERR_UNKNOWN;
     }
@@ -374,7 +380,7 @@ main (int argc, char *argv[])
     {
       /* The command line contains at least one argument.
        */
-      char *args[8], **argp = args;
+      char *args[10], **argp = args;
 
       if (argc > 2)
 	error (EXIT_FAILURE, 0, "too many arguments");
@@ -384,6 +390,11 @@ main (int argc, char *argv[])
 	  *argp++ = "-l";
 	  *argp++ = user;
 	}
+      if (srcaddr)
+	{
+	  *argp++ = "-b";
+	  *argp++ = srcaddr;
+	}
       if (family == 4)
 	*argp++ = "-4";
       else if (family == 6)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog          | 13 +++++++++++++
 NEWS               |  6 ++++++
 doc/inetutils.texi |  6 ++++++
 telnet/commands.c  | 40 +++++++++++++++++++++++++++++++++++++---
 telnet/main.c      | 15 +++++++++++++--
 5 files changed, 75 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 


