Code Block c socket(AF_INET, SOCK_RAW, IPPROTO_RAW)
This results in an error:
Code Block text Operation not permitted
I understand that raw sockets require root privileges. I'm calling this code from my network extension already. Is there anything else I have to do to get a raw socket working?
Is there a better way I should resend a packet that I've intercepted in my packet filter?
You are most likely running into a Sandbox issue when trying to use raw sockets from the Network System Extension and that is why you are seeing the "Operation not permitted" error. Also, keep in mind here that using a Sandbox is a requirement in a Network System Extension whether you are deploying to the App Stor or deploying with Developer ID.I understand that raw sockets require root privileges. I'm calling this code from my network extension already. Is there anything else I have to do to get a raw socket working?
The packetHandler is provided as a mechanism to analyze packets to provide a NEFilterPacketProviderVerdict. This handler is not meant to tag or alter packets, but simply to be used as a packetFiltering mechanism to make decisions upon.Is there a better way I should resend a packet that I've intercepted in my packet filter?
Matt Eaton
DTS Engineering, CoreOS
meaton3@apple.com