Skip to content
Advertisement

Tag: setsockopt

How to resolve “setsockopt(3, SOL_SOCKET, SO_MARK, [10], 4) = -1 EPERM” Operation denied for none root users

I got two network interfaces (ethernet and wlan). Now I found a little script on github (https://github.com/Intika-Linux-Firewall/App-Route-Jail) which seems to allow me to route specific applications through the none default gateway to loadbalance the traffic a little bit. The script is using the following call: setsockopt(sd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)); As I found out via an strace I got: ‘-1

Socket buffer size not increasing

Output is – Current socket buff len = 41600 setsock opt success After setting socket buff len = 41600. Looks like receive buffer size is not increasing, any idea why this happens? Thanks in advance! Answer If the kernel is of newer version (2.6.17 or higher), checkout whether autotuning is enabled by verifying the file /proc/sys/net/ipv4/tcp_moderate_rcvbuf . If the value

Advertisement