netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] net: don't warn in inet diag when IPV6 is disabled
@ 2019-07-02 22:20 Stephen Hemminger
  2019-07-03 18:26 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2019-07-02 22:20 UTC (permalink / raw)
  To: davem, kuznet, yoshfuji; +Cc: netdev, Stephen Hemminger

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 <stephen@networkplumber.org>
---
 net/ipv4/raw_diag.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/net/ipv4/raw_diag.c b/net/ipv4/raw_diag.c
index 899e34ceb560..e35736b99300 100644
--- a/net/ipv4/raw_diag.c
+++ b/net/ipv4/raw_diag.c
@@ -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);
 	}
 }
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] net: don't warn in inet diag when IPV6 is disabled
  2019-07-02 22:20 [PATCH v2] net: don't warn in inet diag when IPV6 is disabled Stephen Hemminger
@ 2019-07-03 18:26 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2019-07-03 18:26 UTC (permalink / raw)
  To: stephen; +Cc: kuznet, yoshfuji, netdev

From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue,  2 Jul 2019 15:20:21 -0700

> 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 <stephen@networkplumber.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-07-03 18:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-07-02 22:20 [PATCH v2] net: don't warn in inet diag when IPV6 is disabled Stephen Hemminger
2019-07-03 18:26 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).