Browse Source

Use correct reply size in DNS packets

pull/1/head
Pieter Wuille 12 years ago
parent
commit
a8d711b832
  1. 2
      dns.c

2
dns.c

@ -430,8 +430,10 @@ int dnsserver(dns_opt_t *opt) {
if (hdr->cmsg_level == IPPROTO_IP && hdr->cmsg_type == DSTADDR_SOCKOPT) if (hdr->cmsg_level == IPPROTO_IP && hdr->cmsg_type == DSTADDR_SOCKOPT)
{ {
msg.msg_iov[0].iov_base = outbuf; msg.msg_iov[0].iov_base = outbuf;
msg.msg_iov[0].iov_len = ret;
sendmsg(listenSocket, &msg, 0); sendmsg(listenSocket, &msg, 0);
msg.msg_iov[0].iov_base = inbuf; msg.msg_iov[0].iov_base = inbuf;
msg.msg_iov[0].iov_len = sizeof(inbuf);
handled = true; handled = true;
} }
} }

Loading…
Cancel
Save