Page MenuHomeFreeBSD

unix/dgram: cleanup uipc_send of PF_UNIX/SOCK_DGRAM, step 2
ClosedPublic

Authored by glebius on May 23 2022, 9:01 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Apr 5, 10:45 AM
Unknown Object (File)
Fri, Apr 5, 10:45 AM
Unknown Object (File)
Fri, Apr 5, 10:42 AM
Unknown Object (File)
Fri, Apr 5, 10:18 AM
Unknown Object (File)
Jan 28 2024, 10:54 PM
Unknown Object (File)
Jan 28 2024, 10:54 PM
Unknown Object (File)
Jan 28 2024, 10:54 PM
Unknown Object (File)
Jan 28 2024, 9:54 PM
Subscribers

Details

Summary

Just remove one level of indentation as the case clause always match.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Note: this patch is a step towards D35303.

markj added inline comments.
sys/kern/uipc_usrreq.c
1103

Seems weird that we honour PRUS_EOF even in the error case. I'm not sure if it's a bug or not.

This revision is now accepted and ready to land.May 24 2022, 2:26 PM
glebius added a subscriber: tuexen.
glebius added inline comments.
sys/kern/uipc_usrreq.c
1103

Oh, I noticed that, too. :)

There is no real use of MSG_EOF. See https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=261699 Notice that all failed programs aren't real applications, but tools that want to exercise all possible socket APIs. In the base system there inetd(8), that would use MSG_EOF on TCP sockets for its builtins. Nobody in the world uses inetd builtins. There are no test cases for MSG_EOF.

MSG_EOF exist only in FreeBSD and Mac OS X.

My first intent was to remove it. But @tuexen thinks it is a cool feature and promised to cover it with tests :)

Anyway, fixing MSG_EOF for PF_UNIX/SOCK_STREAM|SEQPACKET is out of scope of my work.

sys/kern/uipc_usrreq.c
1103

Fair enough!

This revision was landed with ongoing or failed builds.Jun 24 2022, 4:10 PM
This revision was automatically updated to reflect the committed changes.
glebius marked an inline comment as done.