Is bind to device type calls possible with go-libp2p?


My application uses interfaces in VRFs on Linux. For that reason, I’d like for the bind call carried out by libp2p.New to bind to a particular device (/interface).

I.e. suppose I ran:

ip link add vrf-a type vrf table 101
ip link set dev vrf-a up
ip route add table 101 unreachable default metric 4278198272
ip link add link ens1f0 name ens1f0.101 type vlan id 101
ip link set dev ens1f0.101 master vrf-a
ip address add dev ens1f0.101

(…my application actually uses netlink to do the above on the fly, but that is besides the point…)

Then I’d like to be able to pass “/ip4/” which is not currently possible as I get a “bind: cannot assign requested address” error (understandable in the circumstances).

Any ways currently around this?

All the best,