envoyproxy/envoy

dns: use handles to prevent use-after-free problems between dns queries and callback targets

Open

#10,079 建立於 2020年2月17日

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C++ (5,373 fork)batch import
area/dnsenhancementhelp wanted

倉庫指標

Star
 (27,997 star)
PR 合併指標
 (平均合併 8天) (30 天內合併 378 個 PR)

描述

Description: ActiveDnsQueries have independent lifetimes from their callback targets (strict/logical dns cluster, dns cache). Right now there is an implicit contract where the callback target sets their query pointer to null once the query is resolved, and the query only fires callbacks if it has not been cancelled. However, this implicit contract can create problems when it's not adhered to (e.g #10006).

An enhancement would be to use handles with RAII constraints similar to how the init manager does with watchers and targets.

貢獻者指南