aboutsummaryrefslogtreecommitdiff
path: root/src/dns
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-01-25 10:00:45 +0000
committerChristian Grothoff <christian@grothoff.org>2012-01-25 10:00:45 +0000
commita46562814a881e48c200ef62d24d892c813bb95b (patch)
treefa902eb3bff46cac3edd86ce6c72fc3ac7638d80 /src/dns
parent28fcef3870ecc009f18ed625ebddb0e6c24a41a7 (diff)
downloadgnunet-a46562814a881e48c200ef62d24d892c813bb95b.tar.gz
gnunet-a46562814a881e48c200ef62d24d892c813bb95b.zip
-fix
Diffstat (limited to 'src/dns')
-rw-r--r--src/dns/dnsparser.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/dns/dnsparser.c b/src/dns/dnsparser.c
index 63207d5ce..0e658bdda 100644
--- a/src/dns/dnsparser.c
+++ b/src/dns/dnsparser.c
@@ -256,15 +256,15 @@ parse_record (const char *udp_payload,
256 off, 0); 256 off, 0);
257 if ( (NULL == r->data.soa->mname) || 257 if ( (NULL == r->data.soa->mname) ||
258 (NULL == r->data.soa->rname) || 258 (NULL == r->data.soa->rname) ||
259 (*off + sizeof (soa) > udp_payload_length) ) 259 (*off + sizeof (struct soa_data) > udp_payload_length) )
260 return GNUNET_SYSERR; 260 return GNUNET_SYSERR;
261 memcpy (&soa, &udp_payload[*off], sizeof (soa)); 261 memcpy (&soa, &udp_payload[*off], sizeof (struct soa_data));
262 r->data.soa->serial = ntohl (soa.serial); 262 r->data.soa->serial = ntohl (soa.serial);
263 r->data.soa->refresh = ntohl (soa.refresh); 263 r->data.soa->refresh = ntohl (soa.refresh);
264 r->data.soa->retry = ntohl (soa.retry); 264 r->data.soa->retry = ntohl (soa.retry);
265 r->data.soa->expire = ntohl (soa.expire); 265 r->data.soa->expire = ntohl (soa.expire);
266 r->data.soa->minimum_ttl = ntohl (soa.minimum); 266 r->data.soa->minimum_ttl = ntohl (soa.minimum);
267 (*off) += sizeof (soa); 267 (*off) += sizeof (struct soa_data);
268 if (old_off + data_len != *off) 268 if (old_off + data_len != *off)
269 return GNUNET_SYSERR; 269 return GNUNET_SYSERR;
270 return GNUNET_OK; 270 return GNUNET_OK;
@@ -602,7 +602,7 @@ add_soa (char *dst,
602 off, 602 off,
603 soa->rname)) ) ) 603 soa->rname)) ) )
604 return ret; 604 return ret;
605 if (*off + sizeof (soa) > dst_len) 605 if (*off + sizeof (struct soa_data) > dst_len)
606 return GNUNET_NO; 606 return GNUNET_NO;
607 sd.serial = htonl (soa->serial); 607 sd.serial = htonl (soa->serial);
608 sd.refresh = htonl (soa->refresh); 608 sd.refresh = htonl (soa->refresh);