Selaa lähdekoodia

Fix: sniffer call IP() on a DomainAddress

JimhHan 4 vuotta sitten
vanhempi
sitoutus
de54d4b08f
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      app/dispatcher/default.go

+ 1 - 1
app/dispatcher/default.go

@@ -196,7 +196,7 @@ func shouldOverride(ctx context.Context, result SniffResult, request session.Sni
 			return true
 		}
 		if fakeDNSEngine != nil && protocolString != "bittorrent" && p == "fakedns" &&
-			fakeDNSEngine.GetFakeIPRange().Contains(destination.Address.IP()) {
+			destination.Address.Family().IsIP() && fakeDNSEngine.GetFakeIPRange().Contains(destination.Address.IP()) {
 			newError("Using sniffer ", protocolString, " since the fake DNS missed").WriteToLog(session.ExportIDToError(ctx))
 			return true
 		}