File: 0003-inetd-Change-protocol-semantics-in-inetd.conf.patch

package info (click to toggle)
inetutils 2%3A2.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 18,588 kB
  • sloc: ansic: 132,363; sh: 12,498; yacc: 1,651; makefile: 725; perl: 72
file content (42 lines) | stat: -rw-r--r-- 1,394 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 1d22086aace85b344e73ce448e431479ac207b46 Mon Sep 17 00:00:00 2001
From: Guillem Jover <guillem@hadrons.org>
Date: Mon, 6 Sep 2010 10:52:27 +0200
Subject: [PATCH 3/6] inetd: Change protocol semantics in inetd.conf

Readd parts of the original patch that got botched when applied
upstream.

* src/inetd.c (getconfigent) [IPV6]: Change default family to IPv4 for "tcp"
and "udp". Change "tcp6" and "udp6" to support IPv4 mapped addresses.

Fixes: commit a12021ee959a88b48cd16e947c671f8f59e29c9d
Origin: vendor, Debian
Forwarded: https://lists.gnu.org/archive/html/bug-inetutils/2018-01/msg00001.html
---
 src/inetd.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/inetd.c b/src/inetd.c
index 794b5ca1..60659894 100644
--- a/src/inetd.c
+++ b/src/inetd.c
@@ -1102,7 +1102,7 @@ getconfigent (FILE *fconfig, const char *file, size_t *line)
       sep->se_proto = newstr (argv[INETD_PROTOCOL]);
 
 #ifdef IPV6
-      /* We default to IPv4. */
+      /* We default to IPv4.  */
       sep->se_family = AF_INET;
       sep->se_v4mapped = 1;
 
@@ -1112,7 +1112,6 @@ getconfigent (FILE *fconfig, const char *file, size_t *line)
 	  if (sep->se_proto[3] == '6')
 	    {
 	      sep->se_family = AF_INET6;
-	      sep->se_v4mapped = 0;
 	      /* Check for tcp6only and udp6only.  */
 	      if (strcmp (&sep->se_proto[3], "6only") == 0)
 		sep->se_v4mapped = 0;
-- 
2.51.0