aboutsummaryrefslogtreecommitdiff
path: root/src/dns/dnsparser.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/dns/dnsparser.c')
-rw-r--r--src/dns/dnsparser.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index c6a60cd44..8b8cd22fd 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -397,9 +397,9 @@ parse_record (const char *udp_payload,
397 return GNUNET_SYSERR; 397 return GNUNET_SYSERR;
398 return GNUNET_OK; 398 return GNUNET_OK;
399 case GNUNET_DNSPARSER_TYPE_SRV: 399 case GNUNET_DNSPARSER_TYPE_SRV:
400 if ('_' != *r->data.hostname) 400 if ('_' != *r->name)
401 return GNUNET_SYSERR; /* all valid srv names must start with "_" */ 401 return GNUNET_SYSERR; /* all valid srv names must start with "_" */
402 if (NULL == strstr (r->data.hostname, "._")) 402 if (NULL == strstr (r->name, "._"))
403 return GNUNET_SYSERR; /* necessary string from "._$PROTO" not present */ 403 return GNUNET_SYSERR; /* necessary string from "._$PROTO" not present */
404 old_off = *off; 404 old_off = *off;
405 if (*off + sizeof (struct srv_data) > udp_payload_length) 405 if (*off + sizeof (struct srv_data) > udp_payload_length)
@@ -412,7 +412,7 @@ parse_record (const char *udp_payload,
412 r->data.srv->port = ntohs (srv.port); 412 r->data.srv->port = ntohs (srv.port);
413 /* parse 'data.hostname' into components, which are 413 /* parse 'data.hostname' into components, which are
414 "_$SERVICE._$PROTO.$DOMAIN_NAME" */ 414 "_$SERVICE._$PROTO.$DOMAIN_NAME" */
415 ndup = GNUNET_strdup (r->data.hostname); 415 ndup = GNUNET_strdup (r->name);
416 tok = strtok (ndup, "."); 416 tok = strtok (ndup, ".");
417 GNUNET_assert ('_' == *tok); 417 GNUNET_assert ('_' == *tok);
418 r->data.srv->service = GNUNET_strdup (&tok[1]); 418 r->data.srv->service = GNUNET_strdup (&tok[1]);