[Bug 275146] odd error handling from net.inet.tcp.functions_default sysctl

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 17 Nov 2023 00:27:06 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275146

            Bug ID: 275146
           Summary: odd error handling from net.inet.tcp.functions_default
                    sysctl
           Product: Base System
           Version: 14.0-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: kern
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

Setting functions_default to a nonexistent entry (because it is not loaded, or
for any other reason) has odd user-facing error behaviour:

# sysctl net.inet.tcp.functions_default=rack
net.inet.tcp.functions_default: freebsd
sysctl: net.inet.tcp.functions_default=rack: No such file or directory

Some other sysctls use EINVAL which at least gives the user an understandable
error:

# sysctl kern.timecounter.hardware=testing
kern.timecounter.hardware: TSC
sysctl: kern.timecounter.hardware=testing: Invalid argument

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