fix fakedns is nil

This commit is contained in:
Shelikhoo 2022-01-23 20:38:18 +00:00
parent f965d25af2
commit 1df432218e
No known key found for this signature in database
GPG Key ID: C4D5E79D22B25316
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ import (
func newFakeDNSSniffer(ctx context.Context) (protocolSnifferWithMetadata, error) {
var fakeDNSEngine dns.FakeDNSEngine
{
fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature(fakeDNSEngine)
fakeDNSEngineFeat := core.MustFromContext(ctx).GetFeature((*dns.FakeDNSEngine)(nil))
if fakeDNSEngineFeat != nil {
fakeDNSEngine = fakeDNSEngineFeat.(dns.FakeDNSEngine)
}