Skip to content

Commit 1b3444a

Browse files
committed
Fix incorrect three-way merge happened when importing the stale-cache patch
Signed-off-by: DL6ER <[email protected]>
1 parent 0d8c705 commit 1b3444a

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/dnsmasq/forward.c

+7-7
Original file line numberDiff line numberDiff line change
@@ -1827,13 +1827,6 @@ void receive_query(struct listener *listen, time_t now)
18271827

18281828
if (m >= 1)
18291829
{
1830-
if (stale && have_pseudoheader)
1831-
{
1832-
u16 swap = htons(EDE_STALE);
1833-
1834-
m = add_pseudoheader(header, m, ((unsigned char *) header) + udp_size, daemon->edns_pktsz,
1835-
EDNS0_OPTION_EDE, (unsigned char *)&swap, 2, do_bit, 0);
1836-
}
18371830
#ifdef HAVE_DUMPFILE
18381831
dump_packet_udp(DUMP_REPLY, daemon->packet, m, NULL, &source_addr, listen->fd);
18391832
#endif
@@ -1910,6 +1903,13 @@ void receive_query(struct listener *listen, time_t now)
19101903

19111904
if (m >= 1)
19121905
{
1906+
if (stale && have_pseudoheader)
1907+
{
1908+
u16 swap = htons(EDE_STALE);
1909+
1910+
m = add_pseudoheader(header, m, ((unsigned char *) header) + udp_size, daemon->edns_pktsz,
1911+
EDNS0_OPTION_EDE, (unsigned char *)&swap, 2, do_bit, 0);
1912+
}
19131913
#ifdef HAVE_DUMPFILE
19141914
dump_packet_udp(DUMP_REPLY, daemon->packet, m, NULL, &source_addr, listen->fd);
19151915
#endif

0 commit comments

Comments
 (0)