netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: David Miller <davem@davemloft.net>
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, netdev@vger.kernel.org
Subject: Re: [PATCH net] net: don't warn in inet diag when IPV6 is disabled
Date: Tue, 2 Jul 2019 15:14:22 -0700	[thread overview]
Message-ID: <20190702151422.6b2685f4@hermes.lan> (raw)
In-Reply-To: <20190702.142347.1440800997923616328.davem@davemloft.net>

On Tue, 02 Jul 2019 14:23:47 -0700 (PDT)
David Miller <davem@davemloft.net> wrote:

> From: Stephen Hemminger <stephen@networkplumber.org>
> Date: Mon,  1 Jul 2019 08:23:03 -0700
> 
> > @@ -19,9 +19,11 @@ raw_get_hashinfo(const struct inet_diag_req_v2 *r)
> >  {
> >  	if (r->sdiag_family == AF_INET) {
> >  		return &raw_v4_hashinfo;
> > -#if IS_ENABLED(CONFIG_IPV6)
> >  	} else if (r->sdiag_family == AF_INET6) {
> > +#if IS_ENABLED(CONFIG_IPV6)
> >  		return &raw_v6_hashinfo;
> > +#else
> > +		return ERR_PTR(-EOPNOTSUPP);
> >  #endif
> >  	} else {
> >  		pr_warn_once("Unexpected inet family %d\n",  
> 
> Let's make some consistency in this area please.
> 
> The inet_diag code returns -EINVAL, and that's been that way forever.
> It also doesn't print a weird warning for unexpected sdiag_family
> values outside of AF_INET and AF_INET6.
> 
> That's been that way for so long that's probably the behavior to
> revolve everything around.
> 
> Therefore, please just get rid of the warning message instead of
> all of these other changes.
> 
> Thank you.

Sure, that makes sense.

      reply	other threads:[~2019-07-03  0:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-01 15:23 [PATCH net] net: don't warn in inet diag when IPV6 is disabled Stephen Hemminger
2019-07-02 21:23 ` David Miller
2019-07-02 22:14   ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190702151422.6b2685f4@hermes.lan \
    --to=stephen@networkplumber.org \
    --cc=davem@davemloft.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).