From nobody Wed Feb 15 17:49:55 2023 X-Original-To: freebsd-questions@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PH5FR5kzlz3r6yJ for ; Wed, 15 Feb 2023 17:50:03 +0000 (UTC) (envelope-from possessor.assizer305@aceecat.org) Received: from beesty.loosely.org (beesty.loosely.org [IPv6:2600:3c01:e000:4c0::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4PH5FR152rz41Zx for ; Wed, 15 Feb 2023 17:50:03 +0000 (UTC) (envelope-from possessor.assizer305@aceecat.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=aceecat.org header.s=rsa header.b="XNo96Ke/"; spf=pass (mx1.freebsd.org: domain of possessor.assizer305@aceecat.org designates 2600:3c01:e000:4c0::2 as permitted sender) smtp.mailfrom=possessor.assizer305@aceecat.org; dmarc=none DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=aceecat.org ; s=rsa; h=Sender:Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=YgyBK6aZ36jcr/gOWCPZcQXQBqgpCNFvP7XIzYyYAOY=; b=XNo96Ke/RLF78mDBjzUW6teiRs EVXdGJrIGJVtsKzqGSt/ikRG5r+9+cUvs4Ji+eoHGObGTDboTQS0bPffuie8N9HFfpSoD+9vMq9CD z+eDXrwhWLGlq5Coq/Ol/bGGzwm//7iasYfd3ycTOkIvoGmCHQhL7hI/SHtxA4wkds8A2WECDm12I PLuJ9uUaOz0uCYJF3kBOrBTE1WBU7g6UPMUenRzT9UzADuhSjuURNwjnhfNnd1K1hgv5sCQvI8kLk arr65STb7onlCo5EjH/4paviMrLDs4F727nXgqE1juhGc6DkJuJR3IhbQ5wArm528MZXRrRbtbqes NQbwgtfQ==; Received: from [::1] (helo=beesty) by beesty.loosely.org with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.96-20-303f59ccb) (envelope-from ) id 1pSLul-0005ku-0I for freebsd-questions@freebsd.org; Wed, 15 Feb 2023 09:49:55 -0800 Date: Wed, 15 Feb 2023 09:49:55 -0800 From: Ian Zimmerman To: freebsd-questions@freebsd.org Subject: Source IP selection Message-ID: <20230215174535.jlxuis3xwhxee3bq@beesty.loosely.org> Mail-Followup-To: freebsd-questions@freebsd.org List-Id: User questions List-Archive: https://lists.freebsd.org/archives/freebsd-questions List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: itz@aceecat.org X-Spamd-Result: default: False [-3.50 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; R_DKIM_ALLOW(-0.20)[aceecat.org:s=rsa]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-questions@freebsd.org]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; DKIM_TRACE(0.00)[aceecat.org:+]; ASN(0.00)[asn:63949, ipnet:2600:3c01::/32, country:SG]; RCVD_VIA_SMTP_AUTH(0.00)[]; DMARC_NA(0.00)[aceecat.org]; RCVD_COUNT_TWO(0.00)[2]; ARC_NA(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4PH5FR152rz41Zx X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N Hello, 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 -- Ian