net, wgengine/capture: encode NAT addresses in pcap stream

Signed-off-by: Tom DNetto <tom@tailscale.com>
This commit is contained in:
Tom DNetto
2023-03-30 12:39:39 -07:00
committed by Tom
parent 92459a9248
commit 6a627e5a33
7 changed files with 94 additions and 28 deletions
+2 -2
View File
@@ -545,7 +545,7 @@ func TestPeerAPIBypass(t *testing.T) {
tt.w.SetFilter(tt.filter)
tt.w.disableTSMPRejected = true
tt.w.logf = t.Logf
if got := tt.w.filterPacketInboundFromWireGuard(p); got != tt.want {
if got := tt.w.filterPacketInboundFromWireGuard(p, nil); got != tt.want {
t.Errorf("got = %v; want %v", got, tt.want)
}
})
@@ -575,7 +575,7 @@ func TestFilterDiscoLoop(t *testing.T) {
p := new(packet.Parsed)
p.Decode(pkt)
got := tw.filterPacketInboundFromWireGuard(p)
got := tw.filterPacketInboundFromWireGuard(p, nil)
if got != filter.DropSilently {
t.Errorf("got %v; want DropSilently", got)
}