Files
v2rayA/core/dns
Zakk b2f2aff8d6 fix(dns): refuse a query that has looped back through an upstream
A rule that sends a name to a local resolver which forwards back to v2rayA
makes the two exchange the same query until one of them runs out of memory;
v2rayA/v2rayA discussion #1950 reproduces it with dnsmasq on OpenWrt. The
firewall-level self-redirect is already handled by the 0x80 mark, but nothing
saw the loop at the resolver level.

Every query this process sends upstream carries a random per-process token in
an EDNS0 local option. A query that arrives carrying that token has come back
around such a loop and is answered with SERVFAIL, with one log line per ten
seconds naming the question and how many were refused.
2026-09-18 06:30:12 +10:00
..