net: don't warn in inet diag when IPV6 is disabled
Subsystems (2)
PATCH v2 1/1 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 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets")
Signed-off-by Stephen Hemminger <[email protected]>
--- net/ipv4/raw_diag.c | 3 --- 1 file changed, 3 deletions(-)
net/ipv4/raw_diag.c +0 -3
@@ -24,9 +24,6 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r)return &raw_v6_hashinfo;#endif }else { -pr_warn_once ("Unexpected inet family %d\n" , - r->sdiag_family); -WARN_ON_ONCE (1 );return ERR_PTR (-EINVAL ); } }
Signature · 1 line
2.20.1
From: Stephen Hemminger <[email protected]>
Date: Tue, 2 Jul 2019 15:20:21 -0700
Quoted 7 lines
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 432490f9d455 ("net: ip, diag -- Add diag interface for raw sockets")Signed-off-by Stephen Hemminger <[email protected]>
Applied, thanks.