Skip to content

Commit

Permalink
ksmbd: hide socket error message when ipv6 config is disable
Browse files Browse the repository at this point in the history
When ipv6 config is disable(CONFIG_IPV6 is not set), ksmbd fallback to
create ipv4 socket. User reported that this error message lead to
misunderstood some issue. Users have requested not to print this error
message that occurs even though there is no problem.

Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Acked-by: Tom Talpey <tom@talpey.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
namjaejeon authored and Steve French committed Oct 5, 2022
1 parent 78af146 commit 5876e99
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/ksmbd/transport_tcp.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,8 @@ static int create_socket(struct interface *iface)

ret = sock_create(PF_INET6, SOCK_STREAM, IPPROTO_TCP, &ksmbd_socket);
if (ret) {
pr_err("Can't create socket for ipv6, try ipv4: %d\n", ret);
if (ret != -EAFNOSUPPORT)
pr_err("Can't create socket for ipv6, fallback to ipv4: %d\n", ret);
ret = sock_create(PF_INET, SOCK_STREAM, IPPROTO_TCP,
&ksmbd_socket);
if (ret) {
Expand Down

0 comments on commit 5876e99

Please sign in to comment.