[Bug 259096] net/gitup: may fail with ENOBUFS due to fixed big SO_SNDBUF/SO_RCVBUF value

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 12 Oct 2021 10:25:37 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259096

            Bug ID: 259096
           Summary: net/gitup: may fail with ENOBUFS due to fixed big
                    SO_SNDBUF/SO_RCVBUF value
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: eduardo@FreeBSD.org
          Reporter: eugen@freebsd.org
          Assignee: eduardo@FreeBSD.org
             Flags: maintainer-feedback?(eduardo@FreeBSD.org)

gitup 0.96 source code contains following:

        option = BUFFER_UNIT_LARGE;

        if (setsockopt(sd, SOL_SOCKET, SO_SNDBUF, &option, sizeof(int)))
                err(EXIT_FAILURE, "setup_ssl: setsockopt SO_SNDBUF");

        if (setsockopt(sd, SOL_SOCKET, SO_RCVBUF, &option, sizeof(int)))
                err(EXIT_FAILURE, "setup_ssl: setsockopt SO_RCVBUF");

BUFFER_UNIT_LARGE is one megabyte here.

So, it may fail with obscure error message depending on local value of sysctl
kern.ipc.maxsockbuf. Instead, it should check for ENOBUFS and continue with
execution (maybe issue some warning).

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