Bug 259096 - net/gitup: may fail with ENOBUFS due to fixed big SO_SNDBUF/SO_RCVBUF value
Summary: net/gitup: may fail with ENOBUFS due to fixed big SO_SNDBUF/SO_RCVBUF value
Status: Closed Not Accepted
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Nuno Teixeira
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-12 10:25 UTC by Eugene Grosbein
Modified: 2021-10-13 10:06 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (eduardo)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Grosbein freebsd_committer freebsd_triage 2021-10-12 10:25:37 UTC
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).
Comment 1 Nuno Teixeira freebsd_committer freebsd_triage 2021-10-13 07:21:13 UTC
Hello Eugene,

I've checked gitup issues and didn't find a problem related to this.

Isn't better to open a gitup issue and see what author says about it?

Cheers
Comment 2 Eugene Grosbein freebsd_committer freebsd_triage 2021-10-13 10:06:59 UTC
Sorry, I failed to understand who is gitup author at first and misdirected the PR. Closing it for now.