[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [msmtp-users] PATCH: bind to source IP
On Mon, Mar 9, 2015 at 5:28 AM, Martin Lambers <marlam@...23...> wrote:
> routing. I once read that one should use SO_BINDTODEVICE if the packets
> should go out a specific network interface; is this what you want to
> do? If not, could you explain how binding to an IP address is useful;
Did not look close at all the comments but I recall specifying an "interface"
is not necessarily sufficient due to possible alias addresses existing on
that interface and the "primary" one often being chosen by the kernel as
the source IP if so specified, which may not be intended. Whereas binding
an IP is quite specific. And may need to consider dhcp, etc. In most
cases it seem user applications are choosing the bind specific IP method.
Or there maybe a misguess in terms that interface:IP is always 1:1.
As far as useful, it may be just flexibility when multiple interface or
VPN or VM situations, and to at least present a certain src ip instead
of "*" one? May be easier to packet filter too? It seems pretty common.