Yes, you need root for SO_BINDTODEVICE, that's it nature. Should I just skip the test if current context is not root? posix_getuid() != 0