On 13/09/13(Fri) 10:14, Reyk Floeter wrote:
> On Fri, Sep 13, 2013 at 09:53:03AM +0200, Martin Pieuchot wrote:
> > > -let snmpd (or sth else) make up ifindices just for that purpose
> > 
> > That looks like the best solution to me.  If a userland program want
> > to expose following numbers, then it probably needs to create its own
> > indexes anyway, even our actual in-kernel code doesn't guarantee that.
> > 
> 
> No, that's utterly stupid.  The interface index is a value that is
> supposed to be consistent across the system.  How should it be synced
> with other userland tools?  How would you handle it in if_nametoindex
> and friends?

So what do *you* suggest which is not utterly stupid?

I can't see where it is written that the interface index should be
consistent, from the RFC 1156, I read:

        ifIndex { ifEntry 1 }

        A unique value for each interface.  Its value ranges
        between 1 and the value of ifNumber.  The value for each
        interface must remain constant at least from one re-
        initialization of the entity's network management system
        to the next re-initialization.


> As I said before: it is not a big issue for snmpd and I can live with
> the fact that your changes might confuse SNMP clients a bit.  Just go
> ahead, but

Well it looks like a big issue because you keep complaining.

Would you exclaiming what "confusing SNMP clients" means?  What breaks?
Can it be solved?  What is the technical problem here?

> > In the end we need two different tables, one with an unique index per
> > interface (to avoid passing pointers in kernel) and another one with
> > the biggest index equals to the number of interfaces (to not confuse
> > snmp).  IMHO we don't need these two tables in the kernel.
> > 
> 
> please read the history: if_index _was_ created for SNMP.  Then it was
> used for routing and other stuff.  Now you want to use it as a "PID"
> for something else.  Fine.  But please stop claiming that SNMP is
> doing anything wrong with if_indexes when they were created FOR SNMP.

I'm not clamming anything that SNMP is doing wrong, I'm not rewriting
history, I'm just saying that the actual index generation code is broken
for SNMP because it doesn't returns a value between 1 and the number of
interfaces.

Reply via email to