🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #81047

Re: IPv6 changes vs. Documentation, and "nicety" of news.daily - was Re: [ANNOUNCE] INN 2.5.0 release candidate available

#81047
From: Julien ÉLIE
Date: Sun, 17 May 2009 13:16
107 lines
5072 bytes
Hi D. Stussy,

> Without any address, it appears to bind to "::" (IN6_ADDR_ANY) and will
> accept IPv6 and IPv4 connections.  With "-6 ::", it accepts IPv6 only.  My
> test was to run it on a separate port, then to telnet into it, and see if
> it connected at all.

That works fine, then.


> I would still like "-4" to be an alias for "-b" especially since other
> programs regularly recognize "-4" and "-6" to mean IPv4-only and IPv6-only
> respectively.  Let "-b" remain but as a depreciated option for backwards
> compatibility only.

OK, no problem.  Easy to do!
I have just added "-4" to both innd and nnrpd.
I have kept "-b" for nnrpd.

The amusing part is that innd has "-I" but the code never worked (even
in INN 2.0!).  So I totally removed "-I" to only have "-4" for it.

% innd -I 0.0.0.0
innd: invalid option -- I
Usage error.



Modified: innd/innd.c
===================================================================
--- innd/innd.c 2009-05-17 10:19:39 UTC (rev 8473)
+++ innd/innd.c 2009-05-17 13:12:15 UTC (rev 8474)
@@ -403,11 +403,16 @@

     /* Parse JCL. */
     CCcopyargv(av);
-    while ((i = getopt(ac, av, "6:ac:Cdfi:l:m:o:Nn:P:rst:uH:T:X:")) != EOF)
+    while ((i = getopt(ac, av, "4:6:ac:CdfH:i:l:m:n:No:P:rst:T:uX:")) != EOF)
  switch (i) {
  default:
      Usage();
      /* NOTREACHED */
+        case '4':
+            if (innconf->bindaddress)
+                free(innconf->bindaddress);
+            innconf->bindaddress = xstrdup(optarg);
+            break;
         case '6':
             if (innconf->bindaddress6)
                 free(innconf->bindaddress6);
@@ -434,10 +439,6 @@
  case 'i':
      innconf->maxconnections = atoi(optarg);
      break;
- case 'I':
-     if (innconf->bindaddress) free(innconf->bindaddress);
-     innconf->bindaddress = xstrdup(optarg);
-     break;
  case 'l':
      innconf->maxartsize = atol(optarg);
      break;

Modified: nnrpd/nnrpd.c
===================================================================
--- nnrpd/nnrpd.c 2009-05-17 10:19:39 UTC (rev 8473)
+++ nnrpd/nnrpd.c 2009-05-17 13:12:15 UTC (rev 8474)
@@ -906,20 +906,23 @@
 #endif /* HAVE_SASL */

 #ifdef HAVE_SSL
-    while ((i = getopt(argc, argv, "6:c:b:Dfi:I:nop:P:r:s:tS")) != EOF)
+    while ((i = getopt(argc, argv, "4:6:b:c:Dfi:I:nop:P:r:s:St")) != EOF)
 #else
-    while ((i = getopt(argc, argv, "6:c:b:Dfi:I:nop:P:r:s:t")) != EOF)
+    while ((i = getopt(argc, argv, "4:6:b:c:Dfi:I:nop:P:r:s:t")) != EOF)
 #endif /* HAVE_SSL */
  switch (i) {
  default:
      Usage();
      /* NOTREACHED */
+        case '4':                       /* Bind to a certain IPv4 address. */
+        case 'b':
+            if (ListenAddr != NULL)
+                die("-b and -4 may not both be given");
+            ListenAddr = xstrdup(optarg);
+            break;
         case '6':                       /* Bind to a certain IPv6 address. */
             ListenAddr6 = xstrdup(optarg);
             break;
- case 'b': /* Bind to a certain IPv4 address. */
-            ListenAddr = xstrdup(optarg);
-     break;
  case 'c':                       /* Use alternate readers.conf. */
      ConfFile = concatpath(innconf->pathetc, optarg);
      break;



Have a nice Sunday,

-- 
Julien ÉLIE

« -- Il a beaucoup de talents...
  -- Il est doué ?
  -- Non il est riche. Il a beaucoup de talents d'or. » (Astérix) 
Technical Details
Message-ID: <gup2n8$t5h$1@news.trigofacile.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail
References: <878wnex9f4.fsf@windlord.stanford.edu> <75mc7qF195jsaU1@mid.individual.net> <gu249p$t8$1@snarked.org> <gu2959$3ra$1@news.trigofacile.com> <gu2aqd$11d$1@snarked.org> <gukjtn$apu$1@news.trigofacile.com> <gukkht$eno$1@news.trigofacile.com> <gul0i1$3cm$1@news.trigofacile.com> <gunt05$qrm$1@snarked.org>

Show Full Headers
Complete Article Headers
Message-ID: <gup2n8$t5h$1@news.trigofacile.com>
Subject: Re: IPv6 changes vs. Documentation, and "nicety" of news.daily - was Re: [ANNOUNCE] INN 2.5.0 release candidate available
Date: Sun, 17 May 2009 15:16:23 +0200
From: Julien ÉLIE <iulius@nom-de-mon-site.com.invalid>
References: <878wnex9f4.fsf@windlord.stanford.edu> <75mc7qF195jsaU1@mid.individual.net> <gu249p$t8$1@snarked.org> <gu2959$3ra$1@news.trigofacile.com> <gu2aqd$11d$1@snarked.org> <gukjtn$apu$1@news.trigofacile.com> <gukkht$eno$1@news.trigofacile.com> <gul0i1$3cm$1@news.trigofacile.com> <gunt05$qrm$1@snarked.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.20141118.mbox.gz!border1.nntp.ams.giganews.com!nntp.giganews.com!de-l.enfer-du-nord.net!gegeweb.org!news.trigofacile.com!not-for-mail
Newsgroups: news.software.nntp
Organization: TrigoFACILE -- http://www.trigofacile.com/
Lines: 107
NNTP-Posting-Host: aaubervilliers-151-1-37-189.w83-112.abo.wanadoo.fr
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset="Windows-1252";
 reply-type=original
Content-Transfer-Encoding: 8bit
X-Trace: news.trigofacile.com 1242566184 29873 83.112.148.189 (17 May 2009
X-Complaints-To: abuse@trigofacile.com
NNTP-Posting-Date: Sun, 17 May 2009 13:16:24 +0000 (UTC)
In-Reply-To: <gunt05$qrm$1@snarked.org>
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Windows Mail 6.0.6001.18000
X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18049