[Xorp-hackers] BGP and exceptions

Ben Greear greearb at candelatech.com
Wed Apr 21 15:41:45 PDT 2010


Hello!

It seems that pretty much any invalid data (using mcast addr for
next-hop, for instance), will cause xorp_bgp to throw an exception
and crash.

Since you don't even get a useful stack-trace out of the exception
crashes, and since the attribute decode logic is typically ~20 stack frames
deep, it's very difficult to debug the cause of the exceptions and to
figure out where to add appropriate catch() logic.

Does anyone have any strong attraction to using exceptions, or can
we move to returning NULL and/or checking an 'is_valid()' flag
on the attributes instead of throwing lots of exceptions?

Thanks,
Ben

-- 
Ben Greear <greearb at candelatech.com>
Candela Technologies Inc  http://www.candelatech.com



More information about the Xorp-hackers mailing list