Skip to content

Commit 1e64d7c

Browse files
shemmingerdavem330
authored andcommitted
net: don't warn in inet diag when IPV6 is disabled
If IPV6 was disabled, then ss command would cause a kernel warning because the command was attempting to dump IPV6 socket information. The fix is to just remove the warning. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=202249 Fixes: 432490f ("net: ip, diag -- Add diag interface for raw sockets") Signed-off-by: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent ff95bf2 commit 1e64d7c

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

net/ipv4/raw_diag.c

-3
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r)
2424
return &raw_v6_hashinfo;
2525
#endif
2626
} else {
27-
pr_warn_once("Unexpected inet family %d\n",
28-
r->sdiag_family);
29-
WARN_ON_ONCE(1);
3027
return ERR_PTR(-EINVAL);
3128
}
3229
}

0 commit comments

Comments
 (0)