Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Feb 2023 14:24:58 -0800
From:      Ian Zimmerman <possessor.assizer305@aceecat.org>
To:        freebsd-questions@freebsd.org
Subject:   Re: Source IP selection
Message-ID:  <20230215222458.bij5oh3wtaq6inje@beesty.loosely.org>
In-Reply-To: <20230215214519.C9CC199766DF@ary.qy>
References:  <20230215174535.jlxuis3xwhxee3bq@beesty.loosely.org> <20230215214519.C9CC199766DF@ary.qy>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 15, 2023 at 04:45:19PM -0500, John Levine wrote:
> >how is the source IP address selected for an unbound socket, if there
> >are multiple addresses (ie. aliases) configured on the outgoing
> >interface? I am interested in particular in the UDP case, ie.
> >the sendto() syscall.
> >This is almost the question at the following link but ... not about
> >THAT kernel but FreeBSD.
> >
> >https://stackoverflow.com/questions/63955841/how-does-tcp-ip-select-a-source-ip-address
> 
> Same answer, use bind() if you want to bind to a specific address.

Let me ask a little more specifically then :)

May the kernel choose an address through which there's no route to
the destination?

-- 
Ian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20230215222458.bij5oh3wtaq6inje>