Is there any way that I can handle ICMP packets programmatically, bypassing gvisor's automatic processing (e.g. replying to ICMP echo requests)? What I have is this:
mystack.SetTransportProtocolHandler(icmp.ProtocolNumber4, func(id stack.TransportEndpointID, pb *stack.PacketBuffer) bool {
return true
})
I was expecting that this would eliminate gvisor's automatic ICMP replies, but it so far as I can tell, gvisor still responds to echo requests with echo replies. What I'd like is to parse the packet buffer myself and formulate echo replies conditional on some business logic (specifically, I plan to proxy the ICMP messages over to a separate connection).