dht/dht.go | 5 +++++ diff --git a/dht/dht.go b/dht/dht.go index 0b99d4ce76fb7f9bc0870f4cb0ac08365deb40f5..ed45395ca0d57648f7753e3fa999d11a8c4641eb 100644 --- a/dht/dht.go +++ b/dht/dht.go @@ -904,6 +904,11 @@ "y": "q", "q": q, "a": a, } + // BEP 43. Outgoing queries from uncontactiable nodes should contain + // "ro":1 in the top level dictionary. + if s.config.Passive { + d["ro"] = 1 + } b, err := bencode.Marshal(d) if err != nil { return