tstest/natlab: be more paranoid about IP versions from gvisor

I didn't actually see this, but added this while debugging something
and figured it'd be good to keep.

Updates #13038

Change-Id: I67934c8a329e0233f79c3b08516fd6bad6bfe22a
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2024-08-24 18:04:58 -07:00 committed by Brad Fitzpatrick
parent e0bdd5d058
commit 3a8cfbc381

View File

@ -234,7 +234,7 @@ func (n *network) handleIPPacketFromGvisor(ipRaw []byte) {
ipRaw,
layers.LayerTypeIPv6, gopacket.Lazy)
default:
return
panic(fmt.Sprintf("unexpected IP packet version %v", ipVer))
}
flow, ok := flow(goPkt)
if !ok {