Skip to content

Commit

Permalink
net: don't warn in inet diag when IPV6 is disabled
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
shemminger authored and davem330 committed Jul 3, 2019
1 parent ff95bf2 commit 1e64d7c
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions net/ipv4/raw_diag.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 1e64d7c

Please sign in to comment.