Skip to content

Conversation

@Lanius-collaris
Copy link
Contributor

haha debug replyBuf: [65 0 0 84 237 199 64 0 128 1 190 171 9 9 9 9 10 0 2 100 0 0 239 131 12 60 0 0 74 174 185 145 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]
E async.go:21>icmp.go:158: icmp: v4: 9: wrote reply to tun; err? header is malformed

Firestack misused IPv4.SetHeaderLength(), replyHeaderLength >> 2 is unnecessary.

replyIPHdr.SetHeaderLength(replyHeaderLength >> 2) // IHL in 32-bit words.

https://github.com/google/gvisor/blob/738e1d995f64d20fd11ab59a88d12b524acb672e/pkg/tcpip/header/ipv4.go#L298

The upstream has merged Amaindex's pull request google/gvisor#11609 , so my small changes should work.

@ignoramous ignoramous merged commit 0dc35ce into celzero:n2 Aug 27, 2025
6 of 8 checks passed
@ignoramous
Copy link
Contributor

Thanks!

@Lanius-collaris
Copy link
Contributor Author

Oh, I forgot to call replyPkt.DecRef(), merging #142 will fix it.

@ignoramous
Copy link
Contributor

Is #142 required when google/gvisor#11609 is present in upstream?

@Lanius-collaris
Copy link
Contributor Author

Lanius-collaris commented Aug 28, 2025

Is #142 required when google/gvisor#11609 is present in upstream?

google/gvisor#11609 didn't touch ICMPv6, as current gvisor never delivers ICMPv6 Echo Request Messages to TransportProtocolHandler, I suggest using iptables hack for now.

😇 Maybe libslirp in AVD is too old, I can't test ping6 in emulator, but icmp-hack branch does work on physical devices.

@Lanius-collaris Lanius-collaris deleted the fix-icmpv4 branch August 28, 2025 02:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants