[quagga-dev 5272] Re: mes_lookup / LOOKUP robustness
Paul.Jakma at Sun.COM
Wed Feb 27 00:17:38 GMT 2008
On Tue, 26 Feb 2008, James Carlson wrote:
> I'm somewhat unconvinced, though, that mes_lookup ought to return
> anything as grotty as "(nil)".
> Either the set of messages is large and dependent on something not in
> the design of the code itself (e.g., LOOKUP(attr_str, type) in
> bgp_attr.c), so some sort of legible-to-humans "not found in list"
> entry needs to be possible,
> or the set is constrained by the design
> (most of the ospfd usages) and anything outside the range should
> intentionally drop core, because it's a bug.
Ah.. Such a deliberate 'assert_in_range()' could be useful, yes. Hmm.
Also, there's the list assumption bug you found, where linklist.h
clearly assumes nodes must have data (listgetdata macro), but routines
in linklist.c don't per se enforce the same condition. I've been meaning
to review linklist usage to see what the risks would be in making
linklist.c stricter (I guess the only risk is to undetected bad code
Solaris Networking Sun Microsystems, Scotland
http://opensolaris.org/os/project/quagga tel: EMEA x73150 / +44 15066 73150
More information about the Quagga-dev