>>>>> "TA" == Thomas Anders <[EMAIL PROTECTED]> writes:
TA> devbox# grep -r NETSNMP_KLOOKUP . | grep '<'
TA> ./agent/mibgroup/mibII/ipv6.c: if (NETSNMP_KLOOKUP(p, (char *)
&in6pcb,
TA> I'm sorry to say that this has always been broken code since
TA> klookup will never return anything else than 0 or 1, so the above
TA> condition will *never* be met.
That's definitely not good either.
TA> My patch has no impact on this.
Nope, you're right.
TA> Also, keep in mind that mibII/ipv6 won't even compile on any of
TA> the systems that would potentially make use of
TA> --without-kmem-usage.
True.
TA> Does this meet your objections?
I don't think it does though. The issue was that currently there is a
lot of code that doesn't even check on the results and thus returning
0 will do nothing. There are probably cases where the lookup will
never fail (ideally) and thus we may not have even seen a bug report
about it.
But, forcing a return 0 (effectively) means code will now compile
which actually will crash the agent. Looking randomly for an example,
lets assume that klookup is (0) and the following code gets executed:
NETSNMP_KLOOKUP(entry, (char *) nnew, sizeof(struct inpcb));
entry = nnew->inp_queue.cqe_next; /* Next kernel entry */
nnew is filled with 0 which means the second line will cause the agent
to crash. In existing systems that lookup may have always succeeded
and thus there was never an error (I'm not arguing that error checking
shouldn't be done, I'm just arguing that your change may have only
broken new systems).
--
Wes Hardaker
Sparta, Inc.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders