Bug 224061 - IpV6 SCTP - sctp_sendv() from client does not work
Summary: IpV6 SCTP - sctp_sendv() from client does not work
Status: Closed Not A Bug
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: Michael Tuexen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-03 21:32 UTC by Shreesh Holla
Modified: 2017-12-06 14:01 UTC (History)
2 users (show)

See Also:


Attachments
Example of a client using sctp_sendv() (1.18 KB, text/x-csrc)
2017-12-05 12:30 UTC, Michael Tuexen
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shreesh Holla 2017-12-03 21:32:48 UTC
Using sctp_sendv()[The current approved way from RFC6458] in an IpV6 environment from a client does not work and returns "Invalid Argument". Same sequence using the deprecated sctp_sendmsg() works fine. This is for the socket created in SOCK_STREAM. But sctp_recv() works fine from the client. And both sctp_sendv() and sctp_recv() works fine from the server. Same scenario with sctp_sendv() works fine in an IpV4 client.
Comment 1 Michael Tuexen freebsd_committer freebsd_triage 2017-12-04 12:40:48 UTC
Can you provide a small test program which can be used to reproduce the issue?

Best regards
Michael
Comment 2 Michael Tuexen freebsd_committer freebsd_triage 2017-12-05 12:30:08 UTC
Created attachment 188543 [details]
Example of a client using sctp_sendv()
Comment 3 Michael Tuexen freebsd_committer freebsd_triage 2017-12-05 12:31:10 UTC
I just attached a simple client using sctp_sendv() for performing an implicit association setup to an IPv6 server. It works on my test system.
Comment 4 Shreesh Holla 2017-12-06 01:59:16 UTC
Yes I see this working too. After digging into my code and this it looks like the only real difference was that I have the length set to 0 i.e. addr.sin6_len in your code was not set to size of sockaddr_in6. And this caused the problem. Of course my IpV4 code was setting the length in the corresponding struct and so was ok.

So, I guess this can is not a bug!
Comment 5 Michael Tuexen freebsd_committer freebsd_triage 2017-12-06 14:01:05 UTC
I agree, will close the issue.