We have a case where we need to send, and receive, an ICMP packet from a Network Extension. Not *tunnel* an ICMP packet--that works fine--but send an ICMP packet from the NE that's not going through the tunnel.
The send is fine. I create a datagram socket with a protocol of IPPROTO_ICMP, and I can send the ICMP packet. I see it on the wire, I see the response on the wire.
When I call recvfrom() on the socket I get a permission error. I can see that there are 84 bytes waiting to be read, but I can't read them... Same fd I just sent from.
I tried binding the socket, but get a permission error when I try to bind(). I've tried bind() with address set to 0, INADDR_ANY, and to the local physical address, always a permission error.
Is the problem the lack of bind()? If so, does anyone have an idea about why bind() might be failing?
If the problem isn't lack of bind(), does anyone have an idea what could be happening here? Could it be a limitation on what can be done from a Network Extension?