Skip to content

Commit

Permalink
af_unix: Rename UNIX-DGRAM to UNIX to maintain backwards compatability
Browse files Browse the repository at this point in the history
Then name of this protocol changed in commit 94531cf ("af_unix: Add
unix_stream_proto for sockmap") because that commit added stream support
to the af_unix protocol. Renaming the existing protocol makes a ChromeOS
protocol test[1] fail now that the name has changed in
/proc/net/protocols from "UNIX" to "UNIX-DGRAM".

Let's put the name back to how it was while keeping the stream protocol
as "UNIX-STREAM" so that the procfs interface doesn't change. This fixes
the test and maintains backwards compatibility in proc.

Cc: Jiang Wang <[email protected]>
Cc: Andrii Nakryiko <[email protected]>
Cc: Cong Wang <[email protected]>
Cc: Jakub Sitnicki <[email protected]>
Cc: John Fastabend <[email protected]>
Cc: Dmitry Osipenko <[email protected]>
Link: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform/tast-tests/src/chromiumos/tast/local/bundles/cros/network/supported_protocols.go;l=50;drc=e8b1c3f94cb40a054f4aa1ef1aff61e75dc38f18 [1]
Fixes: 94531cf ("af_unix: Add unix_stream_proto for sockmap")
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
bebarino authored and davem330 committed Oct 12, 2021
1 parent 732b74d commit 0edf082
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/unix/af_unix.c
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ static void unix_unhash(struct sock *sk)
}

struct proto unix_dgram_proto = {
.name = "UNIX-DGRAM",
.name = "UNIX",
.owner = THIS_MODULE,
.obj_size = sizeof(struct unix_sock),
.close = unix_close,
Expand Down

0 comments on commit 0edf082

Please sign in to comment.