netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Emelyanov <xemul@openvz.org>
To: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>,
	netdev@vger.kernel.org, devel@openvz.org
Subject: Re: [PATCH net-2.6.25 10/11][INET] Eliminate difference in actions of sysctl and proc handler for conf.all.forwarding
Date: Thu, 06 Dec 2007 15:31:14 +0300	[thread overview]
Message-ID: <4757EB92.4010400@openvz.org> (raw)
In-Reply-To: <E1J04N1-0006uU-00@gondolin.me.apana.org.au>

Herbert Xu wrote:
> David Miller <davem@davemloft.net> wrote:
>> The user is pretty much screwed in one way or the other.
>> For example:
>>
>> 1) If 'default' propagates to all devices, any specific
>>   setting for a device is lost.
>>
>> 2) If 'default' does not propagate, there is no way to
>>   have 'default' influence devices which have already
>>   been loaded.
> 
> Well the way it works on IPv4 currently (for most options) is
> that we'll propagate default settings to a device until either:
> 
> 1) the user modifies the setting for that device;
> 2) or that an IPv4 address has been added to the device.

BTW, this is not 100% true. Look, in rtm_to_ifaddr()
I see the following code flow:

        ipv4_devconf_setall(in_dev);

        ifa = inet_alloc_ifa();
        if (ifa == NULL) {
                /*
                 * A potential indev allocation can be left alive, it stays
                 * assigned to its device and is destroy with it.
                 */
                err = -ENOBUFS;
                goto errout;
        }

if we fail to allocate the ifa (hard to happen, but), we will
make this device not to accept the default propagation.

If this is a relevant note, I can prepare the patch.
 
> 2) was done to preserve backwards compatibility as the controls
> were previously only available after address addition and we did
> not propagate default settings in that case..
> 
> We could easily extend this so that the default propagation
> worked until the user modified the setting, with an ioctl to
> revert to the current behaviour for compatibility.
> 
> Cheers,


  parent reply	other threads:[~2007-12-06 12:31 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-04 10:01 [PATCH net-2.6.25 0/11] Combined set of sysctl reworks, cleanups and fixes Pavel Emelyanov
2007-12-04 10:03 ` [PATCH net-2.6.25 1/11][CORE] Remove unneeded ifdefs from sysctl_net_core.c Pavel Emelyanov
2007-12-04 10:21   ` [PATCH net-2.6.25 (resend) " Pavel Emelyanov
2007-12-05  9:36   ` [PATCH net-2.6.25 " David Miller
2007-12-04 10:04 ` [PATCH net-2.6.25 2/11][CORE] Isolate the net/core/ sysctl table Pavel Emelyanov
2007-12-05  9:37   ` David Miller
2007-12-04 10:06 ` [PATCH net-2.6.25 3/11][IPv4] Cleanup the sysctl_net_ipv4.c file Pavel Emelyanov
2007-12-05  9:38   ` David Miller
2007-12-04 10:07 ` [PATCH net-2.6.25 4/11][IPV4] Use ctl paths to register net/ipv4/ table Pavel Emelyanov
2007-12-05  9:41   ` David Miller
2007-12-04 10:09 ` [PATCH net-2.6.25 5/11][TR] Use ctl paths to register net/token-ring/ table Pavel Emelyanov
2007-12-05  9:42   ` David Miller
2007-12-04 10:10 ` [PATCH net-2.6.25 6/11][CORE] Remove the empty net_table Pavel Emelyanov
2007-12-05  9:43   ` David Miller
2007-12-04 10:11 ` [PATCH net-2.6.25 7/11][IPV6] Make the ipv6/sysctl_net_ipv6.c compilation cleaner Pavel Emelyanov
2007-12-05  9:43   ` David Miller
2007-12-04 10:13 ` [PATCH net-2.6.25 8/11][IPV6] Use sysctl paths to register ipv6 sysctl tables Pavel Emelyanov
2007-12-05  9:44   ` David Miller
2007-12-04 10:15 ` [PATCH net-2.6.25 9/11][INET] Merge sys.net.ipv4.ip_forward and sys.net.ipv4.conf.all.forwarding Pavel Emelyanov
2007-12-05  9:45   ` David Miller
2007-12-04 10:16 ` [PATCH net-2.6.25 10/11][INET] Eliminate difference in actions of sysctl and proc handler for conf.all.forwarding Pavel Emelyanov
2007-12-05  9:48   ` David Miller
2007-12-05  9:58     ` Pavel Emelyanov
2007-12-05 10:06       ` David Miller
2007-12-06  0:13         ` Herbert Xu
2007-12-06  5:39           ` David Miller
2007-12-06 11:06             ` Herbert Xu
2007-12-06 11:14               ` David Miller
2007-12-06 12:31           ` Pavel Emelyanov [this message]
2007-12-06 17:42             ` Herbert Xu
2007-12-04 10:19 ` [PATCH net-2.6.25 11/11][IPV6] " Pavel Emelyanov
2007-12-05  9:51   ` David Miller

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=4757EB92.4010400@openvz.org \
    --to=xemul@openvz.org \
    --cc=davem@davemloft.net \
    --cc=devel@openvz.org \
    --cc=herbert@gondor.apana.org.au \
    --cc=netdev@vger.kernel.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).