On Thu, Sep 12, 2013 at 06:59:13PM +0200, Mike Belopuhov wrote:
> > Ok, let's stop this. I don't think you read what I replied before. I
> > didn't say that we're static with if_indexes, just that we shouldn't
> > make it worse.
> >
>
> or implement persistent indices in the snmpd itself maybe?
>
Maybe. But this would create another layer of abstraction. And
if_index is not just used by SNMP.
> > I give up, but please read my next comment below.
> >
> >> >> > Isn't there any other way to do what you want without stopping to
> >> >> > reuse the index? SNMP simply expects that if_indexes are fairly
> >> >> > static, linear, and without holes. Why should we change that in
> >> >> > OpenBSD? Is there any security reason to "randomize" the indexes -
> >> >> > No.
> >> >>
> >> >> or snmp can simply stop assuming things. if_index wasn't created
> >> >> for snmp in the first place.
> >
> > Actually, I think this assumption is wrong. I researched a little bit
> > in BSD history:
> >
> > - RFC 1066 from August 1988 is one of the early SNMP RFC that mention
> > IfIndex
> >
> > - 4.3BSD-Tahoe from June 1988 doesn't have if_index, I also didn't find
> > in other early BSDs.
> >
> > - 4.3BSD-Reno from June 1990 does have it. You can even find a
> > new comment "/* XXX fast fix for SNMP, going away soon */" on top of
> > if.h.
> >
> > So it seems that if_index was added _for_ SNMP.
> >
>
> i believe this comment refers to the inclusion of sys/time.h.
>
Yes, I know. But see:
1. 1988-06: 4.3BSD-Tahoe without if_index
2. 1988-08: SNMP
3. 1990-06: 4.3BSD-Reno with if_index, mentioning SNMP in if.h.
I don't have the commit history, but this might indicate that there
was some work to support SNMP and many new fields in struct ifnet have
been added for SNMP.
http://minnie.tuhs.org/cgi-bin/utree.pl?file1=4.3BSD-Reno/src/sys/net/if.h&file2=4.3BSD-Tahoe/usr/src/sys/net/if.h&print=1
reyk