All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bjørn Mork" <bjorn@mork.no>
To: Cong Wang <amwang@redhat.com>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, yoshfuji@linux-ipv6.org
Subject: Re: [Patch net-next] ipv6: separate out procfs code from mcast.c
Date: Tue, 23 Apr 2013 14:33:57 +0200	[thread overview]
Message-ID: <87d2tlv32i.fsf@nemi.mork.no> (raw)
In-Reply-To: <1366702893.21136.28.camel@cr0> (Cong Wang's message of "Tue, 23 Apr 2013 15:41:33 +0800")

Cong Wang <amwang@redhat.com> writes:

> On Tue, 2013-04-23 at 03:36 -0400, David Miller wrote:
>> From: Cong Wang <amwang@redhat.com>
>> Date: Tue, 23 Apr 2013 15:30:20 +0800
>> 
>> > This is hard to do, as in the email I replied to Stephen. So I
>> > prefer to just add a Kconfig dependency, at least for now.
>> 
>> A Kconfig hack is exactly what I've told you is an unacceptable
>> solution.
>
> Please enlighten me for a third solution. :)

This is an completely untested idea....

I note that vxlan_init_net requires a successful sock_create_kern().
That implies a request_module("net-pf-...") followed by try_module_get.

So if the sock_create_kern(PF_INET6, ..) succeeds then you *know* you
have IPv6. If it fails with -EAFNOSUPPORT, then you could fall back to
sock_create_kern(PF_INET, ..) and set a flag indicating that runtime
IPv6 support is disabled.  Then use this flag to allow/deny configuring
any IPv6 destinations.

You may also have to protect the IPv6 modular symbols you use with
symbol_request() or similar to prevent vxlan from depending on IPv6.  I
dunno...

If nothing else, I believe this is a crazy enough hack that David may
want to reconsider one of your other two solutions :)



Bjørn

  reply	other threads:[~2013-04-23 12:34 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-23  7:07 [Patch net-next] ipv6: separate out procfs code from mcast.c Cong Wang
2013-04-23  7:11 ` David Miller
2013-04-23  7:15   ` Cong Wang
2013-04-23  7:18     ` David Miller
2013-04-23  7:30       ` Cong Wang
2013-04-23  7:36         ` David Miller
2013-04-23  7:41           ` Cong Wang
2013-04-23 12:33             ` Bjørn Mork [this message]
2013-04-23 16:13               ` Ben Hutchings
2013-04-24  3:33                 ` Cong Wang
2013-04-23 17:26               ` David Stevens
2013-04-24  5:26                 ` Cong Wang
2013-04-24  3:29               ` Cong Wang

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=87d2tlv32i.fsf@nemi.mork.no \
    --to=bjorn@mork.no \
    --cc=amwang@redhat.com \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.