From nobody Thu Jun 03 22:11:17 2021 X-Original-To: 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 D2E911376461 for ; Thu, 3 Jun 2021 22:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Fx0Tx5GxNz4s97 for ; Thu, 3 Jun 2021 22:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9ED7D11779 for ; Thu, 3 Jun 2021 22:11:17 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 153MBHlO015541 for ; Thu, 3 Jun 2021 22:11:17 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 153MBHlJ015540 for net@FreeBSD.org; Thu, 3 Jun 2021 22:11:17 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 255678] security/strongswan cant add routes via RTM_ADD via PF_ROUTE socket Date: Thu, 03 Jun 2021 22:11:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 13.0-RELEASE X-Bugzilla-Keywords: regression X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: melifaro@FreeBSD.org X-Bugzilla-Status: In Progress X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: melifaro@FreeBSD.org X-Bugzilla-Flags: maintainer-feedback? X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated 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 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255678 --- Comment #18 from Alexander V. Chernikov --- (In reply to Tobias Brunner from comment #17) > Not exactly. The end goal is to install a route that causes the kernel to= select the "internal" IP address (192.168.5.10 on igb0) as source when rea= ching the remote VPN subnet (10.11.12.0/24). Got it. > For comparison, on Linux, we install a route for the remote subnet via ex= ternal interface but we set the RTA_PREFSRC attribute to the internal IP ad= dress, which causes it to get selected when traffic to the remote subnet is= generated (we also install that route in a separate routing table that tak= es precedence over the main table and allows us to even override the defaul= t route without conflicts). AFAIK, there is nothing similar on FreeBSD. *BSD has RTAX_IFA rtsock option allowing to choose the preferred source address. FreeBSD has support for multiple routing tables (net.fibs), though there ma= y be some rough edges. I'll be able to look and hopefully fix the issue on the weekend. Re optimal way of specifying the source address - IMO having an explicit RTAX_IFA + RTAX_IFP (specified by an ifindex) should be more bulletproof, b= ut let me fix the bug first & verify the proper RTAX_IFA operations. --=20 You are receiving this mail because: You are on the CC list for the bug.=