aboutsummaryrefslogtreecommitdiff
path: root/networking/dnsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'networking/dnsd.c')
-rw-r--r--networking/dnsd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/networking/dnsd.c b/networking/dnsd.c
index c3bd1610b..71f50423d 100644
--- a/networking/dnsd.c
+++ b/networking/dnsd.c
@@ -184,23 +184,24 @@ static int table_lookup(uint16_t type, uint8_t * as, uint8_t * qs)
184 struct dns_entry *d=dnsentry; 184 struct dns_entry *d=dnsentry;
185 185
186 do { 186 do {
187#ifdef DEBUG 187#if DEBUG
188 char *p,*q; 188 char *p,*q;
189 q = (char *)&(qs[1]); 189 q = (char *)&(qs[1]);
190 p = &(d->name[1]); 190 p = &(d->name[1]);
191 fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d", 191 fprintf(stderr, "\n%s: %d/%d p:%s q:%s %d",
192 __FUNCTION__, strlen(p), (int)(d->name[0]), p, q, strlen(q)); 192 __FUNCTION__, (int)strlen(p), (int)(d->name[0]),
193 p, q, (int)strlen(q));
193#endif 194#endif
194 if (type == REQ_A) { /* search by host name */ 195 if (type == REQ_A) { /* search by host name */
195 for (i = 1; i <= (int)(d->name[0]); i++) 196 for (i = 1; i <= (int)(d->name[0]); i++)
196 if (tolower(qs[i]) != d->name[i]) 197 if (tolower(qs[i]) != d->name[i])
197 break; 198 break;
198 if (i > (int)(d->name[0])) { 199 if (i > (int)(d->name[0])) {
199#ifdef DEBUG 200#if DEBUG
200 fprintf(stderr, " OK"); 201 fprintf(stderr, " OK");
201#endif 202#endif
202 strcpy((char *)as, d->ip); 203 strcpy((char *)as, d->ip);
203#ifdef DEBUG 204#if DEBUG
204 fprintf(stderr, " as:%s\n", as); 205 fprintf(stderr, " as:%s\n", as);
205#endif 206#endif
206 return 0; 207 return 0;