SO_BINDTODEVICE undeclared on freebsd 12

spring_64

Member


Messages: 84

Hi all,

What can I use instead of SO_BINDTODEVICE?

I'm on FreeBSD 12.1.

The linux code is:

C:
ret = setsockopt(r->sock_rx, SOL_SOCKET, SO_BINDTODEVICE, r->vr->ifp->name, strlen(r->vr->ifp->name));
 

Zirias

Son of Beastie

Reaction score: 1,553
Messages: 2,673

A nine year old patch for 9.0 that never made it into the source tree?
Depending on the purpose, IP_RECVIF might be enough (see ip(4)). It's of course not a drop-in replacement, some code refactoring will be needed.
 
Top