diff options
Diffstat (limited to 'meta-oe/recipes-connectivity/samba/samba-3.6.24/libutil_drop_AI_ADDRCONFIG.patch')
-rw-r--r-- | meta-oe/recipes-connectivity/samba/samba-3.6.24/libutil_drop_AI_ADDRCONFIG.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/samba/samba-3.6.24/libutil_drop_AI_ADDRCONFIG.patch b/meta-oe/recipes-connectivity/samba/samba-3.6.24/libutil_drop_AI_ADDRCONFIG.patch new file mode 100644 index 000000000..d3473ea40 --- /dev/null +++ b/meta-oe/recipes-connectivity/samba/samba-3.6.24/libutil_drop_AI_ADDRCONFIG.patch | |||
@@ -0,0 +1,54 @@ | |||
1 | From 185cd4c79492a7de5988f9407d764cdb3a0e2e10 Mon Sep 17 00:00:00 2001 | ||
2 | From: Simo Sorce <idra@samba.org> | ||
3 | Date: Wed, 11 May 2011 17:50:07 -0400 | ||
4 | Subject: [PATCH] libutil: use AI_ADDRCONFIG only when AI_NUMERIC is not defined | ||
5 | |||
6 | This flag prevents startup w/o ip addresses assigned to any interface. | ||
7 | If AI_NUMERIC is passed it should be safe to avoid it. | ||
8 | |||
9 | Signed-off-by: Andreas Schneider <asn@samba.org> | ||
10 | --- | ||
11 | lib/util/util_net.c | 16 +++++++++++----- | ||
12 | 1 files changed, 11 insertions(+), 5 deletions(-) | ||
13 | |||
14 | Index: samba/lib/util/util_net.c | ||
15 | =================================================================== | ||
16 | --- samba.orig/lib/util/util_net.c | ||
17 | +++ samba/lib/util/util_net.c | ||
18 | @@ -64,10 +64,9 @@ | ||
19 | ppres); | ||
20 | |||
21 | if (ret) { | ||
22 | - DEBUG(3,("interpret_string_addr_internal: getaddrinfo failed " | ||
23 | - "for name %s [%s]\n", | ||
24 | - str, | ||
25 | - gai_strerror(ret) )); | ||
26 | + DEBUG(3, ("interpret_string_addr_internal: " | ||
27 | + "getaddrinfo failed for name %s (flags %d) [%s]\n", | ||
28 | + str, flags, gai_strerror(ret))); | ||
29 | return false; | ||
30 | } | ||
31 | return true; | ||
32 | @@ -88,6 +87,7 @@ | ||
33 | #if defined(HAVE_IPV6) | ||
34 | char addr[INET6_ADDRSTRLEN]; | ||
35 | unsigned int scope_id = 0; | ||
36 | + int int_flags; | ||
37 | |||
38 | if (strchr_m(str, ':')) { | ||
39 | char *p = strchr_m(str, '%'); | ||
40 | @@ -108,7 +108,13 @@ | ||
41 | |||
42 | zero_sockaddr(pss); | ||
43 | |||
44 | - if (!interpret_string_addr_internal(&res, str, flags|AI_ADDRCONFIG)) { | ||
45 | + if (flags & AI_NUMERICHOST) { | ||
46 | + int_flags = flags; | ||
47 | + } else { | ||
48 | + int_flags = flags|AI_ADDRCONFIG; | ||
49 | + } | ||
50 | + | ||
51 | + if (!interpret_string_addr_internal(&res, str, int_flags)) { | ||
52 | return false; | ||
53 | } | ||
54 | if (!res) { | ||