Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Jun 2021 22:11:17 +0000
From:      bugzilla-noreply@freebsd.org
To:        net@FreeBSD.org
Subject:   [Bug 255678] security/strongswan cant add routes via RTM_ADD via PF_ROUTE socket
Message-ID:  <bug-255678-7501-tIbSpJkLcD@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-255678-7501@https.bugs.freebsd.org/bugzilla/>
References:  <bug-255678-7501@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D255678

--- Comment #18 from Alexander V. Chernikov <melifaro@FreeBSD.org> ---
(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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-255678-7501-tIbSpJkLcD>