使用CalcOutboundFlag
This commit is contained in:
parent
81c6ebd583
commit
1d177f6aba
@ -149,16 +149,9 @@ namespace FastGithub.PacketIntercept.Dns
|
||||
result.UdpHeader->Length = (ushort)(sizeof(UdpHeader) + responsePayload.Length);
|
||||
|
||||
addr.Flags |= WinDivertAddressFlag.Impostor;
|
||||
if (addr.Flags.HasFlag(WinDivertAddressFlag.Loopback))
|
||||
{
|
||||
addr.Flags |= WinDivertAddressFlag.Outbound;
|
||||
}
|
||||
else
|
||||
{
|
||||
addr.Flags &= ~WinDivertAddressFlag.Outbound;
|
||||
}
|
||||
|
||||
packet.CalcOutboundFlag(addr);
|
||||
packet.CalcChecksums(addr);
|
||||
|
||||
this.logger.LogInformation($"{domain}->{loopback}");
|
||||
}
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
<PackageReference Include="DNS" Version="7.0.0" />
|
||||
<PackageReference Include="WindivertDotnet" Version="1.0.4" />
|
||||
<PackageReference Include="WindivertDotnet" Version="1.0.5" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user