unix domain sockets are throwing "/tmp/echo.sock: write: no buffer space available" error with content filter network extension

Hi, I have installed content filter network extension which is almost same as https://developer.apple.com/documentation/networkextension/filtering_network_traffic.

I have another app. As part of this app, I am sending messages from server process to client process by using unix domain sockets which is almost same as https://github.com/devlights/go-unix-domain-socket-example.

If network traffic is little bit more then my client is failing to send messages with write: no buffer space available error. If I stop content filter network extension then there is no issue.

How can I handle this type of error with network extension?

Note: This is happening on both monterey and ventura mac os (both intel and m1).

How can I handle this type of error with network extension?

This could be a flow control issue. Are you filtering the traffic just based on the top level connection address or are you reading through all of the data in all of the outbound / inbound flows too? If you are requesting to read the data here and you are just getting encrypted bytes anyways, try backing off on this and making filtering decisions based on the top level connection.

Here I am filtering based on connection only (i.e NEFilterDataProvider). I am reading through all of the data in all of the outbound / inbound flows.

One more thing, If I use another app to send the messages by using unixgram domain sockets then immediately i am getting "no buffer space" error even without network extension. Is there any way to increase the network load in mac?

unix domain sockets are throwing "/tmp/echo.sock: write: no buffer space available" error with content filter network extension
 
 
Q