[Devel] Re: [PATCH net-2.6.25 10/11][INET] Eliminate difference in actions of sysctl and proc handler for conf.all.forwarding

Herbert Xu herbert at gondor.apana.org.au
Thu Dec 6 09:42:56 PST 2007


On Thu, Dec 06, 2007 at 03:31:14PM +0300, Pavel Emelyanov wrote:
>
> 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.

Yes that's unintentional.

> If this is a relevant note, I can prepare the patch.

It certainly seems easy enough to fix by just swapping the order.
Please do.

Thanks,
-- 
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert at gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




More information about the Devel mailing list