A nine year old patch for 9.0 that never made it into the source tree?https://lists.freebsd.org/pipermail/freebsd-net/2012-April/032064.html? That took roughly 10-20 seconds to find by googling "SO_BINDTODEVICE alternatives". It's the second result from the top.