Bug 272124 - The socket option "SCTP_DELAYED_ACK_TIME" is not available
Summary: The socket option "SCTP_DELAYED_ACK_TIME" is not available
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Manual Pages (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Michael Tuexen
URL: https://man.freebsd.org/cgi/man.cgi?q...
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-21 05:24 UTC by Pascal Jan Huesing
Modified: 2023-06-25 19:40 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Jan Huesing 2023-06-21 05:24:52 UTC
The socket option "SCTP_DELAYED_ACK_TIME" is not available on FreeBSD-14.0-CURRENT-amd64-20230615, even though it is mentioned in the manual. Instead, you can use SCTP_DELAYED_SACK. I believe this is an error in the manual and needs to be replaced.


Here's an example of the error:

struct sctp_sack_info sackInfo;
socklen_t sackInfo_len = (socklen_t) sizeof(sackInfo);

memset(&sackInfo, 0, sackInfo_len);
sackInfo.sack_assoc_id = sackAssocId;
sackInfo.sack_delay = sackDelay;
sackInfo.sack_freq = sackFreq;

if (setsockopt(fd,
           IPPROTO_SCTP,
           SCTP_DELAYED_ACK_TIME,
           &sackInfo,
           sackInfo_len) == -1) {

    perror("SCTP_DELAYED_ACK_TIME");
    exit(EXIT_FAILURE);
}

error: use of undeclared identifier 'SCTP_DELAYED_ACK_TIME'
                                     ^

Instead, the following approach works:

if (setsockopt(fd,
           IPPROTO_SCTP,
           SCTP_DELAYED_SACK,
           &sackInfo,
           sackInfo_len) == -1) {

    perror("SCTP_DELAYED_SACK");
    exit(EXIT_FAILURE);
}
Comment 1 Michael Tuexen freebsd_committer freebsd_triage 2023-06-21 07:12:20 UTC
The SCTP_DELAYED_ACK_TIME socket option was replaced by the SCTP_DELAYED_SACK in the socket API specification in draft-ietf-tsvwg-sctpsocket-14. base r170056 changed the code, but missed updating the man page.
Comment 2 commit-hook freebsd_committer freebsd_triage 2023-06-21 07:18:51 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=133b132bc1b612abe591c8f54680c3da8491e194

commit 133b132bc1b612abe591c8f54680c3da8491e194
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-06-21 07:03:30 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-06-21 07:18:05 +0000

    sctp: fix man page for socket option controlling delayed acks

    The SCTP_DELAYED_ACK_TIME socket option was replaced by the
    SCTP_DELAYED_SACK in the socket API specification in
    draft-ietf-tsvwg-sctpsocket-14.
    The code was updated in r170056, but the man page was not.

    PR:             272124
    MFC after:      3 days

 share/man/man4/sctp.4 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Comment 3 commit-hook freebsd_committer freebsd_triage 2023-06-25 19:25:50 UTC
A commit in branch stable/13 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=a820d8fa71e8f17a0bfc399b6716f42f077dfcce

commit a820d8fa71e8f17a0bfc399b6716f42f077dfcce
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2023-06-21 07:03:30 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2023-06-25 19:24:46 +0000

    sctp: fix man page for socket option controlling delayed acks

    The SCTP_DELAYED_ACK_TIME socket option was replaced by the
    SCTP_DELAYED_SACK in the socket API specification in
    draft-ietf-tsvwg-sctpsocket-14.
    The code was updated in r170056, but the man page was not.

    PR:             272124

    (cherry picked from commit 133b132bc1b612abe591c8f54680c3da8491e194)

 share/man/man4/sctp.4 | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)
Comment 4 Michael Tuexen freebsd_committer freebsd_triage 2023-06-25 19:40:38 UTC
Thanks for reporting. Closing since the fix is in main and stable/13.