From nobody Mon Dec 23 19:45:48 2024 X-Original-To: freebsd-net@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 4YH7mc524rz5hJvV for ; Mon, 23 Dec 2024 19:45:52 +0000 (UTC) (envelope-from paul@redbarn.org) Received: from util.redbarn.org (util.redbarn.org [24.104.150.222]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.redbarn.org", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YH7mb2xF7z43GC for ; Mon, 23 Dec 2024 19:45:51 +0000 (UTC) (envelope-from paul@redbarn.org) Authentication-Results: mx1.freebsd.org; dkim=fail ("headers rsa verify failed") header.d=redbarn.org header.s=util header.b=gUc4+qE+; spf=pass (mx1.freebsd.org: domain of paul@redbarn.org designates 24.104.150.222 as permitted sender) smtp.mailfrom=paul@redbarn.org; dmarc=pass (policy=reject) header.from=redbarn.org Received: from family.redbarn.org (family.redbarn.org [IPv6:2001:559:8000:cd::5]) (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-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.redbarn.org", Issuer "RapidSSL TLS RSA CA G1" (not verified)) by util.redbarn.org (Postfix) with ESMTPS id 7E1DD160C24 for ; Mon, 23 Dec 2024 19:45:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=redbarn.org; s=util; t=1734983148; bh=DPNzBsVs1oJlOaPlhJAlqZw4sV7GizL1GFF6h92N+cc=; h=From:To:Subject:Date:In-Reply-To:References; b=gUc4+qE+lV1pylHGbJHf8zpAyqGkeoUCh9VrOmetABWICb/jeUDn8ct9I0Uvr0e7t gLWFOKUYKEQ5dJiPtK0sMJqyQ49UxzrxrGQDVqCxiqZ5krqn0CVf53YBnSbe63KVKh xrJadiQy+ZP3LtQ1xfwjbu4oGIS2zi7/XWg6yVJw= Received: from dhcp-151.access.rits.tisf.net (dhcp-151.access.rits.tisf.net [24.104.150.151]) (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 family.redbarn.org (Postfix) with ESMTPSA id 4600DC3F22; Mon, 23 Dec 2024 19:45:48 +0000 (UTC) From: Paul Vixie To: freebsd-net@freebsd.org Subject: Re: per-FIB socket binding Date: Mon, 23 Dec 2024 19:45:48 +0000 Message-ID: <7772475.EvYhyI6sBW@dhcp-151.access.rits.tisf.net> Organization: FW In-Reply-To: References: <4p5o59s4-5p70-0775-1479-990o1s5po7r2@yvfgf.mnoonqbm.arg> List-Id: Networking and TCP/IP with FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-net List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-net@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="nextPart3873984.kQq0lBPeGt" Content-Transfer-Encoding: 7Bit X-Spamd-Result: default: False [-3.70 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; CTE_CASE(0.50)[]; DMARC_POLICY_ALLOW_WITH_FAILURES(-0.50)[]; RCVD_IN_DNSWL_MED(-0.40)[24.104.150.222:from,2001:559:8000:cd::5:received]; R_SPF_ALLOW(-0.20)[+ip4:24.104.150.0/24]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; RCVD_TLS_ALL(0.00)[]; DKIM_TRACE(0.00)[redbarn.org:-]; DMARC_POLICY_ALLOW(0.00)[redbarn.org,reject]; R_DKIM_REJECT(0.00)[redbarn.org:s=util]; ARC_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCPT_COUNT_ONE(0.00)[1]; FROM_HAS_DN(0.00)[]; FREEFALL_USER(0.00)[paul]; HAS_ORG_HEADER(0.00)[]; TO_DN_NONE(0.00)[]; RCVD_COUNT_TWO(0.00)[2]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-net@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[freebsd-net@freebsd.org]; ASN(0.00)[asn:33651, ipnet:24.104.150.0/24, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~] X-Rspamd-Queue-Id: 4YH7mb2xF7z43GC X-Spamd-Bar: --- This is a multi-part message in MIME format. --nextPart3873984.kQq0lBPeGt Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" On Monday, December 23, 2024 7:23:35 PM UTC Bjoern A. Zeeb wrote: > On Sat, 21 Dec 2024, Bjoern A. Zeeb wrote: > >> Any thoughts/comments? > > > > That all said with your opt-in approach if the code itself doesn't bring > > too many new complications I'd be happy with it (assuming FIBs still > > have a use case). > > Seems there's plenty people using multi-FIB in various scenarios still, > which is good to know. > > Go for it. i've been thinking along these lines for a few years now, since my vm server is multi-fib. each interface has a fib, mostly zero. for incoming TCP SYNs, i'd like to carry that fib# into the resulting PCB so that that fib's routing table and especially its default route will be used for that connection. yes, i can do that with ipfw, and am in fact doing so now. however, that's crocky. i think defaulting to the interface FIB for connections created and maintained by the kernel should always happen -- not opt-in, not opt-out, just always. is it worth me sending a patch that does this or would it be considered controversial? (making this happen for UDP is also interesting but is a separate matter since those servers already have to maintain socket-per-interface in order to get their source addresses to match the client's destination address.) -- Paul Vixie --nextPart3873984.kQq0lBPeGt Content-Transfer-Encoding: 7Bit Content-Type: text/html; charset="us-ascii"

On Monday, December 23, 2024 7:23:35 PM UTC Bjoern A. Zeeb wrote:

> On Sat, 21 Dec 2024, Bjoern A. Zeeb wrote:

> >> Any thoughts/comments?

> >

> > That all said with your opt-in approach if the code itself doesn't bring

> > too many new complications I'd be happy with it (assuming FIBs still

> > have a use case).

>

> Seems there's plenty people using multi-FIB in various scenarios still,

> which is good to know.

>

> Go for it.


i've been thinking along these lines for a few years now, since my vm server is multi-fib. each interface has a fib, mostly zero. for incoming TCP SYNs, i'd like to carry that fib# into the resulting PCB so that that fib's routing table and especially its default route will be used for that connection. yes, i can do that with ipfw, and am in fact doing so now. however, that's crocky. i think defaulting to the interface FIB for connections created and maintained by the kernel should always happen -- not opt-in, not opt-out, just always. is it worth me sending a patch that does this or would it be considered controversial?


(making this happen for UDP is also interesting but is a separate matter since those servers already have to maintain socket-per-interface in order to get their source addresses to match the client's destination address.)


--

Paul Vixie

--nextPart3873984.kQq0lBPeGt--