bug-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-inetutils] Trivial in-code comments for src/inetd.c.


From: Mats Erik Andersson
Subject: [bug-inetutils] Trivial in-code comments for src/inetd.c.
Date: Fri, 3 Sep 2010 18:00:51 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

Hello all,

when working in a Debian package bug for "inetutils-inetd" a few
days ago, I came across some plain inaccuracies in the comments
regarding code behaviour for IPv6 versus IPv4. My suggestions
are collected in a straightforward difference text.

The Debian internal bug is due to the recent setting of
"net.ipv6.bindv6only=1", so it is nothing that is of concern
to this team of developers.

In passing, I can tell that my self-signed copyright declaration
was mailed to FSF the past Thursday, a week ago, so my explicit
participation is closing in on you all; granted you still would
accept my application for membership.


Best regards,

Mats E A

===================================================================
diff --git a/src/inetd.c b/src/inetd.c
index 6fe9adf..9a43271 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -547,7 +547,7 @@ setup (struct servtab *sep)
       if (errno == EAFNOSUPPORT && sep->se_family == AF_INET6
          && sep->se_v4mapped)
        {
-         /* Fall back to IPv6 silently.  */
+         /* Fall back to IPv4 silently.  */
          sep->se_family = AF_INET;
          goto tryagain;
        }
@@ -563,9 +563,8 @@ setup (struct servtab *sep)
   if (sep->se_family == AF_INET6)
     {
       /* Reverse the value of SEP->se_v4mapped, since otherwise if
-        using `tcp' as a protocol type all connections will be mapped
-        to IPv6, and with `tcp6' they get mapped IPv4 mapped to
-        IPv6.  */
+        using `tcp' as a protocol type, all connections will be mapped
+        to IPv6, and with `tcp6', IPv4 get mapped to IPv6.  */
       int val = sep->se_v4mapped ? 0 : 1;
       if (setsockopt (sep->se_fd, IPPROTO_IPV6, IPV6_V6ONLY,
                      (char *) &val, sizeof (val)) < 0)
@@ -592,7 +591,7 @@ setup (struct servtab *sep)
       if ((errno == EADDRNOTAVAIL || errno == EAFNOSUPPORT)
          && sep->se_family == AF_INET6 && sep->se_v4mapped)
        {
-         /* Fall back to IPv6 silently.  */
+         /* Fall back to IPv4 silently.  */
          sep->se_family = AF_INET;
          close (sep->se_fd);
          goto tryagain;
@@ -779,7 +778,7 @@ expand_enter (struct servtab *sep)
   if (err == EAI_ADDRFAMILY
       && sep->se_family == AF_INET6 && sep->se_v4mapped)
     {
-      /* Fall back to IPv6 silently.  */
+      /* Fall back to IPv4 silently.  */
       sep->se_family = AF_INET;
       err = inetd_getaddrinfo (sep, proto->p_proto, &result);
     }
@@ -1002,7 +1001,7 @@ getconfigent (FILE *fconfig, const char *file, size_t 
*line)
       sep->se_proto = newstr (argv[INETD_PROTOCOL]);
 
 #ifdef IPV6
-      /* We default to IPv6, in setup() we'll fall back to IPv4 if
+      /* We default to IPv6.  In setup() we'll fall back to IPv4 if
          it doesn't work.  */
       sep->se_family = AF_INET6;
       sep->se_v4mapped = 1;
@@ -1674,7 +1673,7 @@ tcpmux (int s, struct servtab *sep)
 
 /* Set TCP environment variables, modelled after djb's ucspi-tcp tools:
    http://cr.yp.to/ucspi-tcp/environment.html
-   FIXME: This needs support for IPv6
+   FIXME: This needs support for IPv6.
 */
 void
 prepenv (int ctrl, struct sockaddr_in sa_client)

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]