2007-02-13 13:35:56

by Hasso Tepper

[permalink] [raw]
Subject: /proc/sys/net/ipv[46]/conf/ issue unsolved

There is long standing issue in kernel which makes using /etc/sysctl.conf
useless for boottime configuration of specific interface properties and
breaks probably any software relying on unconditional existence of the
conf trees like it was in previous kernels (I alone have written several
pieces of such software). It's broken AFAIK from 2.6.15. There has been
several notes about issue in the list, but issue haven't got any (at least
efficient) attention from developers.

The current behaviour bites users in many ways and breaks several use cases.
I asked several times in the past "what I should do now?" question, but
got no clear answer.

References:
http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809

Is there any chance this will be fixed or at least clear position is
taken by developers? Breaking userspace applications is declared nonono
several times in the past ... I'm not even against breaking it if there
is _very_ good reason to do it. Ok, but I want to know how userspace is
meant to behave now. I can't continue using crappy workarounds.


regards,

--
Hasso Tepper


2007-02-13 17:02:53

by Stephen Hemminger

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

On Tue, 13 Feb 2007 15:29:04 +0200
Hasso Tepper <[email protected]> wrote:

> There is long standing issue in kernel which makes using /etc/sysctl.conf
> useless for boottime configuration of specific interface properties and
> breaks probably any software relying on unconditional existence of the
> conf trees like it was in previous kernels (I alone have written several
> pieces of such software). It's broken AFAIK from 2.6.15. There has been
> several notes about issue in the list, but issue haven't got any (at least
> efficient) attention from developers.
>
> The current behaviour bites users in many ways and breaks several use cases.
> I asked several times in the past "what I should do now?" question, but
> got no clear answer.
>
> References:
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809
>
> Is there any chance this will be fixed or at least clear position is
> taken by developers? Breaking userspace applications is declared nonono
> several times in the past ... I'm not even against breaking it if there
> is _very_ good reason to do it. Ok, but I want to know how userspace is
> meant to behave now. I can't continue using crappy workarounds.

As Herbert Xu said:

> You can disable it in /proc/sys/net/ipv6/conf/default/... and then
> reenable it on the interfaces that you actually want.

And Xen is broken because it tries to use the same bogus Mac
address on on all pseudo devices.


2007-02-13 18:38:20

by Vlad Yasevich

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

Stephen Hemminger wrote:
> On Tue, 13 Feb 2007 15:29:04 +0200
> Hasso Tepper <[email protected]> wrote:
>
>> There is long standing issue in kernel which makes using /etc/sysctl.conf
>> useless for boottime configuration of specific interface properties and
>> breaks probably any software relying on unconditional existence of the
>> conf trees like it was in previous kernels (I alone have written several
>> pieces of such software). It's broken AFAIK from 2.6.15. There has been
>> several notes about issue in the list, but issue haven't got any (at least
>> efficient) attention from developers.
>>
>> The current behaviour bites users in many ways and breaks several use cases.
>> I asked several times in the past "what I should do now?" question, but
>> got no clear answer.
>>
>> References:
>> http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
>> http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809
>>
>> Is there any chance this will be fixed or at least clear position is
>> taken by developers? Breaking userspace applications is declared nonono
>> several times in the past ... I'm not even against breaking it if there
>> is _very_ good reason to do it. Ok, but I want to know how userspace is
>> meant to behave now. I can't continue using crappy workarounds.
>
> As Herbert Xu said:
>
>> You can disable it in /proc/sys/net/ipv6/conf/default/... and then
>> reenable it on the interfaces that you actually want.
>

Sorry, but this is backwards.

Let's say you have an interface on which you want to turn DAD off.

There are ways to do it:

1. Turn DAD off on all interfaces usinc ipv6/conf/default and then
turn it on just on the interface you want.

This solution is a royal pain and introduces a potential race
on the interfaces that should have DAD enabled (i.e. you address will
be preferred when it really should be tentative).

2. Wait until the interface is up and then turn off dad.

However at this point, DAD may have completely already so turning it off
is useless to us.

There needs to be a mechanism by which protocol parameters may be
changed on the interface bases before the interface is up/running.

This has been bugging me for while too.

-vlad

2007-02-13 18:58:59

by Neil Horman

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

On Tue, Feb 13, 2007 at 03:29:04PM +0200, Hasso Tepper wrote:
> There is long standing issue in kernel which makes using /etc/sysctl.conf
> useless for boottime configuration of specific interface properties and
> breaks probably any software relying on unconditional existence of the
> conf trees like it was in previous kernels (I alone have written several
> pieces of such software). It's broken AFAIK from 2.6.15. There has been
> several notes about issue in the list, but issue haven't got any (at least
> efficient) attention from developers.
>
> The current behaviour bites users in many ways and breaks several use cases.
> I asked several times in the past "what I should do now?" question, but
> got no clear answer.
>
> References:
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
> http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809
>
> Is there any chance this will be fixed or at least clear position is
> taken by developers? Breaking userspace applications is declared nonono
> several times in the past ... I'm not even against breaking it if there
> is _very_ good reason to do it. Ok, but I want to know how userspace is
> meant to behave now. I can't continue using crappy workarounds.
>
Can't this simply be fixed by adding a custom udev rule? Correct me if I'm
wrong, but the only reason that interfaces come up automatically after their
appropriate module is inserted is because most distos udev rules issue an ifup
$DEVICE when they get a creation event for $DEVICE. Why not add a custom rule
in for net device creation events to set appropriate sysctl values before the
ifup is issued.

Regards
Neil

>
> regards,
>
> --
> Hasso Tepper
> -
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html

2007-02-13 19:43:37

by Vlad Yasevich

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

Neil Horman wrote:
> On Tue, Feb 13, 2007 at 03:29:04PM +0200, Hasso Tepper wrote:
>> There is long standing issue in kernel which makes using /etc/sysctl.conf
>> useless for boottime configuration of specific interface properties and
>> breaks probably any software relying on unconditional existence of the
>> conf trees like it was in previous kernels (I alone have written several
>> pieces of such software). It's broken AFAIK from 2.6.15. There has been
>> several notes about issue in the list, but issue haven't got any (at least
>> efficient) attention from developers.
>>
>> The current behaviour bites users in many ways and breaks several use cases.
>> I asked several times in the past "what I should do now?" question, but
>> got no clear answer.
>>
>> References:
>> http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
>> http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
>> https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809
>>
>> Is there any chance this will be fixed or at least clear position is
>> taken by developers? Breaking userspace applications is declared nonono
>> several times in the past ... I'm not even against breaking it if there
>> is _very_ good reason to do it. Ok, but I want to know how userspace is
>> meant to behave now. I can't continue using crappy workarounds.
>>
> Can't this simply be fixed by adding a custom udev rule? Correct me if I'm
> wrong, but the only reason that interfaces come up automatically after their
> appropriate module is inserted is because most distos udev rules issue an ifup
> $DEVICE when they get a creation event for $DEVICE. Why not add a custom rule
> in for net device creation events to set appropriate sysctl values before the
> ifup is issued.
>

You can't. The /proc/sys/conf/eth<x>/ structure appears when the
interface is marked UP. At this point, if protocol modules are already
loaded, your configuration parameters are already set.

I was going to ask.. How are you testing Optimistic DAD patch. The
only way I could do it was to set /proc/sys/conf/default/ipv6 entry.

-vlad

2007-02-13 20:16:11

by Neil Horman

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

On Tue, Feb 13, 2007 at 02:43:32PM -0500, Vlad Yasevich wrote:
> Neil Horman wrote:
> >On Tue, Feb 13, 2007 at 03:29:04PM +0200, Hasso Tepper wrote:
> >>There is long standing issue in kernel which makes using /etc/sysctl.conf
> >>useless for boottime configuration of specific interface properties and
> >>breaks probably any software relying on unconditional existence of the
> >>conf trees like it was in previous kernels (I alone have written several
> >>pieces of such software). It's broken AFAIK from 2.6.15. There has been
> >>several notes about issue in the list, but issue haven't got any (at least
> >>efficient) attention from developers.
> >>
> >>The current behaviour bites users in many ways and breaks several use
> >>cases.
> >>I asked several times in the past "what I should do now?" question, but
> >>got no clear answer.
> >>
> >>References:
> >>http://marc.theaimsgroup.com/?l=linux-netdev&m=115685059625467&w=2
> >>http://marc.theaimsgroup.com/?l=linux-netdev&m=115690828822486&w=2
> >>https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=169809
> >>
> >>Is there any chance this will be fixed or at least clear position is
> >>taken by developers? Breaking userspace applications is declared nonono
> >>several times in the past ... I'm not even against breaking it if there
> >>is _very_ good reason to do it. Ok, but I want to know how userspace is
> >>meant to behave now. I can't continue using crappy workarounds.
> >>
> >Can't this simply be fixed by adding a custom udev rule? Correct me if I'm
> >wrong, but the only reason that interfaces come up automatically after
> >their
> >appropriate module is inserted is because most distos udev rules issue an
> >ifup
> >$DEVICE when they get a creation event for $DEVICE. Why not add a custom
> >rule
> >in for net device creation events to set appropriate sysctl values before
> >the
> >ifup is issued.
> >
>
> You can't. The /proc/sys/conf/eth<x>/ structure appears when the
> interface is marked UP. At this point, if protocol modules are already
> loaded, your configuration parameters are already set.
>
> I was going to ask.. How are you testing Optimistic DAD patch. The
> only way I could do it was to set /proc/sys/conf/default/ipv6 entry.
>
I make a change in my patch before I post, to default it to on, rather than to
off. Although I did that for convienience, not necessity. I didn't realize
those files didn't show up until the interface was marked as up. That seems
horribly broken to me. We should definately have some registered file at
creation time, perhaps create the files when register_netdev is called and put
them in /proc/sys/ipv4/conf/offline/<interface>/*, and move them
conf/<interface> when IFF_UP is set?

Neil

> -vlad

2007-02-13 20:16:26

by Hasso Tepper

[permalink] [raw]
Subject: Re: /proc/sys/net/ipv[46]/conf/ issue unsolved

Stephen Hemminger wrote:
> > You can disable it in /proc/sys/net/ipv6/conf/default/... and then
> > reenable it on the interfaces that you actually want.

And YOSHIFUJI Hideaki answered to this:

> The point is:
>
> - Until we have live address(es), we do not create inet6_dev{} for that
> device.
> - We do NOT run DAD until the link is ready (netif_carrier_ok()).
>
> This means, we do NOT have any addresses until the link is once up,
> and thus, because the sysctl entries live in inet6_dev{}, we do not
> install net.ipv6.conf.ethX from values of net.ipv6.conf.default until
> then.

Ie. to make it very clear - I can't reenable it on the interface before
the first "carrier up" event (cable is plugged on). That's the point -
AFAICS the only way I can configure interface differently than default is
via daemon listening interface events via netlink. I can't do it in any
way before.


regards,

--
Hasso Tepper
Elion Enterprises Ltd. [AS3249]
IP & Data Networking Expert