Use correct packet-size limit in make_local_answer()

This commit is contained in:
Simon Kelley committed 2021-06-21 15:59:07 +01:00
1 parent 25ff956c7d
commit 6d1edd8d32
3 files changed
+7 -6

No files matched your search

+3 -2
View File
@@ -525,7 +525,7 @@ static int forward_query(int udpfd, union mysockaddr *udpaddr,
reply:
if (udpfd != -1)
{
if (!(plen = make_local_answer(flags, gotname, plen, header, daemon->namebuff, first, last)))
if (!(plen = make_local_answer(flags, gotname, plen, header, daemon->namebuff, limit, first, last)))
return 0;
if (oph)
@@ -2080,7 +2080,8 @@ unsigned char *tcp_request(int confd, time_t now,
/* In case of local answer or no connections made. */
if (m == 0)
{
if (!(m = make_local_answer(flags, gotname, size, header, daemon->namebuff, first, last)))
if (!(m = make_local_answer(flags, gotname, size, header, daemon->namebuff,
((char *) header) + 65536, first, last)))
break;
if (have_pseudoheader)