Commit 0edf0824 authored by Stephen Boyd's avatar Stephen Boyd Committed by David S. Miller

af_unix: Rename UNIX-DGRAM to UNIX to maintain backwards compatability

Then name of this protocol changed in commit 94531cfc ("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 <jiang.wang@bytedance.com>
Cc: Andrii Nakryiko <andrii@kernel.org>
Cc: Cong Wang <cong.wang@bytedance.com>
Cc: Jakub Sitnicki <jakub@cloudflare.com>
Cc: John Fastabend <john.fastabend@gmail.com>
Cc: Dmitry Osipenko <digetx@gmail.com>
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: 94531cfc ("af_unix: Add unix_stream_proto for sockmap")
Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 732b74d6
...@@ -828,7 +828,7 @@ static void unix_unhash(struct sock *sk) ...@@ -828,7 +828,7 @@ static void unix_unhash(struct sock *sk)
} }
struct proto unix_dgram_proto = { struct proto unix_dgram_proto = {
.name = "UNIX-DGRAM", .name = "UNIX",
.owner = THIS_MODULE, .owner = THIS_MODULE,
.obj_size = sizeof(struct unix_sock), .obj_size = sizeof(struct unix_sock),
.close = unix_close, .close = unix_close,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment