[quagga-dev 1084] Re: point-to-point patch

Andrew J. Schorr aschorr at telemetry-investments.com
Tue Apr 27 17:34:53 BST 2004

On Tue, Apr 27, 2004 at 12:28:08PM -0400, Andrew J. Schorr wrote:
> For 2 reasons:
>   1. I think that it's more elegant to have a consistent approach throughout
>      the code: the destination pointer may or may not be present.  Why would
>      we want the zebra and lib code to have to check for NULL destination
>      pointers, but have the protocol daemons check for a non-zero value?
>      This hybrid approach certainly does not work for library functions
>      that can be called from both zebra and the protocol daemons.
>   2. I was not 100% certain that there will never be a situation where the
>      destination address is zero, so I thought it was important to
>      distinguish between the two cases.

And actually, there's a 3rd reason: I would personally prefer to have
the daemon crash from dereferencing a NULL pointer than to have it
use a bogus zero IP address in its routing decisions.  If it crashes,
we will find the bug much more quickly.


More information about the Quagga-dev mailing list