On Fri, Oct 14, 2016 at 04:41:01PM +0200, Harald Welte wrote:
Would I bind() to a given local IP address and connect() to the remote one?
yes.
In any case, this is one of the things I wouldn't bother unless somebody really indicates he needs it.
Ok, will not bother then.
Out of curiosity...
So normally when I send something, the routing table (ip r show) determines which local interface the remote side sees as sender.
If I connect() and bind() at the same time, would that bypass the routing table and the bind() address would be the sender?
And that's why we don't really need it, because it doesn't make sense to send from a different interface than indicated by the routing table?