Use correct reply size in DNS packets
This commit is contained in:
parent
b735e5f1ff
commit
a8d711b832
1 changed files with 2 additions and 0 deletions
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)
|
||||
{
|
||||
msg.msg_iov[0].iov_base = outbuf;
|
||||
msg.msg_iov[0].iov_len = ret;
|
||||
sendmsg(listenSocket, &msg, 0);
|
||||
msg.msg_iov[0].iov_base = inbuf;
|
||||
msg.msg_iov[0].iov_len = sizeof(inbuf);
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue