Date: Sun, 2 Mar 2025 10:57:23 GMT From: "Andrey V. Elsukov" <ae@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 361a8395f0b0 - main - routing: do not allow PINNED routes to be overriden Message-ID: <202503021057.522AvNpL023025@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=361a8395f0b0e6f254fd138798232529679d99f6 commit 361a8395f0b0e6f254fd138798232529679d99f6 Author: Andrey V. Elsukov <ae@FreeBSD.org> AuthorDate: 2025-03-02 10:53:49 +0000 Commit: Andrey V. Elsukov <ae@FreeBSD.org> CommitDate: 2025-03-02 10:53:49 +0000 routing: do not allow PINNED routes to be overriden First configured PINNED routes should have higher priority. Fixes: 1da4954c92ea MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D48650 --- sys/net/route/route_ctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index e5ddd7782e1e..5a04e9dcf6e7 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -821,7 +821,7 @@ add_route_flags(struct rib_head *rnh, struct rtentry *rt, struct route_nhop_data /* Now either append or replace */ if (op_flags & RTM_F_REPLACE) { - if (nhop_get_prio(rnd_orig.rnd_nhop) > nhop_get_prio(rnd_add->rnd_nhop)) { + if (nhop_get_prio(rnd_orig.rnd_nhop) == NH_PRIORITY_HIGH) { /* Old path is "better" (e.g. has PINNED flag set) */ RIB_WUNLOCK(rnh); error = EEXIST;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202503021057.522AvNpL023025>