[Bug 297977] close() of PF_KEY fails with EOPNOTSUPP

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 26 Aug 2026 17:43:51 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=297977

            Bug ID: 297977
           Summary: close() of PF_KEY fails with EOPNOTSUPP
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: rycampbell@qnx.com

Created attachment 274154
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=274154&action=edit
Patch adding a disconnect function to keysock.c

Since the socket is SS_ISCONNECTED, soclose() will call sodisconnect(). Without
a pr_disconnect function implemented it returns EOPNOTSUPP and a close() call
on a PF_KEY socket fails.

I've attached the fix as pf_key.diff.

-- 
You are receiving this mail because:
You are the assignee for the bug.