summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:14:24 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-08-27 15:29:45 +0100
commit29d6678fd546377459ef75cf54abeef5b969b5cf (patch)
tree8edd65790e37a00d01c3f203f773fe4b5012db18 /meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
parentda49de6885ee1bc424e70bc02f21f6ab920efb55 (diff)
downloadpoky-29d6678fd546377459ef75cf54abeef5b969b5cf.tar.gz
Major layout change to the packages directory
Having one monolithic packages directory makes it hard to find things and is generally overwhelming. This commit splits it into several logical sections roughly based on function, recipes.txt gives more information about the classifications used. The opportunity is also used to switch from "packages" to "recipes" as used in OpenEmbedded as the term "packages" can be confusing to people and has many different meanings. Not all recipes have been classified yet, this is just a first pass at separating things out. Some packages are moved to meta-extras as they're no longer actively used or maintained. Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch')
-rw-r--r--meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch110
1 files changed, 110 insertions, 0 deletions
diff --git a/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
new file mode 100644
index 0000000000..2b76fe3d41
--- /dev/null
+++ b/meta/recipes-extended/xinetd/xinetd/xinetd-should-be-able-to-listen-on-IPv6-even-in-ine.patch
@@ -0,0 +1,110 @@
1From f44b218ccc779ab3f4aed072390ccf129d94b58d Mon Sep 17 00:00:00 2001
2From: David Madore <david@pleiades.stars>
3Date: Mon, 24 Mar 2008 12:45:36 +0100
4Subject: [PATCH] xinetd should be able to listen on IPv6 even in -inetd_compat mode
5
6xinetd does not bind to IPv6 addresses (and does not seem to have an
7option to do so) when used in -inetd_compat mode. As current inetd's
8are IPv6-aware, this is a problem: this means xinetd cannot be used as
9a drop-in inetd replacement.
10
11The attached patch is a suggestion: it adds a -inetd_ipv6 global
12option that, if used, causes inetd-compatibility lines to have an
13implicit "IPv6" option. Perhaps this is not the best solution, but
14there should definitely be a way to get inetd.conf to be read in
15IPv6-aware mode.
16---
17 xinetd/confparse.c | 1 +
18 xinetd/inet.c | 17 +++++++++++++++++
19 xinetd/options.c | 3 +++
20 xinetd/xinetd.man | 6 ++++++
21 4 files changed, 27 insertions(+), 0 deletions(-)
22
23diff --git a/xinetd/confparse.c b/xinetd/confparse.c
24index db9f431..d7b0bcc 100644
25--- a/xinetd/confparse.c
26+++ b/xinetd/confparse.c
27@@ -40,6 +40,7 @@
28 #include "inet.h"
29 #include "main.h"
30
31+extern int inetd_ipv6;
32 extern int inetd_compat;
33
34 /*
35diff --git a/xinetd/inet.c b/xinetd/inet.c
36index 8caab45..2e617ae 100644
37--- a/xinetd/inet.c
38+++ b/xinetd/inet.c
39@@ -25,6 +25,8 @@
40
41 static psi_h iter ;
42
43+extern int inetd_ipv6;
44+
45 static int get_next_inet_entry( int fd, pset_h sconfs,
46 struct service_config *defaults);
47
48@@ -360,6 +362,21 @@ static int get_next_inet_entry( int fd, pset_h sconfs,
49 }
50 SC_SERVER_ARGV(scp)[u] = p;
51 }
52+
53+ /* Set the IPv6 flag if we were passed the -inetd_ipv6 option */
54+ if ( inetd_ipv6 )
55+ {
56+ nvp = nv_find_value( service_flags, "IPv6" );
57+ if ( nvp == NULL )
58+ {
59+ parsemsg( LOG_WARNING, func, "inetd.conf - Bad foo %s", name ) ;
60+ pset_destroy(args);
61+ sc_free(scp);
62+ return -1;
63+ }
64+ M_SET(SC_XFLAGS(scp), nvp->value);
65+ }
66+
67 /* Set the reuse flag, as this is the default for inetd */
68 nvp = nv_find_value( service_flags, "REUSE" );
69 if ( nvp == NULL )
70diff --git a/xinetd/options.c b/xinetd/options.c
71index b058b6a..dc2f3a0 100644
72--- a/xinetd/options.c
73+++ b/xinetd/options.c
74@@ -30,6 +30,7 @@ int logprocs_option ;
75 unsigned logprocs_option_arg ;
76 int stayalive_option=0;
77 char *program_name ;
78+int inetd_ipv6 = 0 ;
79 int inetd_compat = 0 ;
80 int dont_fork = 0;
81
82@@ -128,6 +129,8 @@ int opt_recognize( int argc, char *argv[] )
83 fprintf(stderr, "\n");
84 exit(0);
85 }
86+ else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_ipv6" ) == 0 )
87+ inetd_ipv6 = 1;
88 else if ( strcmp ( &argv[ arg ][ 1 ], "inetd_compat" ) == 0 )
89 inetd_compat = 1;
90 }
91diff --git a/xinetd/xinetd.man b/xinetd/xinetd.man
92index c76c3c6..c9dd803 100644
93--- a/xinetd/xinetd.man
94+++ b/xinetd/xinetd.man
95@@ -106,6 +106,12 @@ This option causes xinetd to read /etc/inetd.conf in addition to the
96 standard xinetd config files. /etc/inetd.conf is read after the
97 standard xinetd config files.
98 .TP
99+.BI \-inetd_ipv6
100+This option causes xinetd to bind to IPv6 (AF_INET6) addresses for
101+inetd compatibility lines (see previous option). This only affects
102+how /etc/inetd.conf is interpreted and thus only has any effect if
103+the \-inetd_compat option is also used.
104+.TP
105 .BI \-cc " interval"
106 This option instructs
107 .B xinetd
108--
1091.5.5.rc0.127.gb4337
110