projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6b8df1f
)
dnsproxy: Add domains to the query only when it has no dot
author
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 17 Feb 2011 00:09:52 +0000
(
01:09
+0100)
committer
Samuel Ortiz
<sameo@linux.intel.com>
Thu, 17 Feb 2011 00:14:19 +0000
(
01:14
+0100)
src/dnsproxy.c
patch
|
blob
|
history
diff --git
a/src/dnsproxy.c
b/src/dnsproxy.c
index
201c365
..
0b2ff22
100644
(file)
--- a/
src/dnsproxy.c
+++ b/
src/dnsproxy.c
@@
-317,6
+317,7
@@
static int ns_resolv(struct server_data *server, struct request_data *req,
{
GList *list;
int sk, err;
+ char *dot, *lookup = (char *) name;
sk = g_io_channel_unix_get_fd(server->channel);
@@
-324,6
+325,11
@@
static int ns_resolv(struct server_data *server, struct request_data *req,
req->numserv++;
+ /* If we have more than one dot, we don't add domains */
+ dot = strchr(lookup, '.');
+ if (dot != NULL && dot != lookup + strlen(lookup) - 1)
+ return 0;
+
for (list = server->domains; list; list = list->next) {
char *domain;
unsigned char alt[1024];