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 184.108.40.206/24 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/220.127.116.11/tcp/1234/bla.bla” 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,