git: e3e36e1b34db - main - krpc: assert that we don't support kernel RPC over unix(4)
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 01 Feb 2025 09:02:20 UTC
The branch main has been updated by glebius:
URL: https://cgit.FreeBSD.org/src/commit/?id=e3e36e1b34db795ecf912b4e1fa5b5e268903733
commit e3e36e1b34db795ecf912b4e1fa5b5e268903733
Author: Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-02-01 01:02:47 +0000
Commit: Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-02-01 09:00:27 +0000
krpc: assert that we don't support kernel RPC over unix(4)
Reviewed by: rmacklem
Differential Revision: https://reviews.freebsd.org/D48563
---
sys/rpc/clnt_vc.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/sys/rpc/clnt_vc.c b/sys/rpc/clnt_vc.c
index 2e890f3b482b..671e4d9ab0d9 100644
--- a/sys/rpc/clnt_vc.c
+++ b/sys/rpc/clnt_vc.c
@@ -140,6 +140,9 @@ clnt_vc_create(
int error, interrupted, one = 1, sleep_flag;
struct sockopt sopt;
+ KASSERT(raddr->sa_family != AF_LOCAL,
+ ("%s: kernel RPC over unix(4) not supported", __func__));
+
if (disrupt == 0)
disrupt = (uint32_t)(long)raddr;