[Swan-dev] nit picking 288158a1d09c422181cdaed12a642ffb01566ddc

David McCullough ucdevel at gmail.com
Sun Mar 23 03:38:25 EET 2014

D. Hugh Redelmeier wrote the following:
> David McCullough checked in this changeset on 2010 November 5.
> It included these two lines:
> +               irs->ipp->check = 0;
> +               irs->ipp->check = ip_fast_csum((char *) irs->ipp, irs->ipp->ihl);
> The first line seems pointless.  Was it the intention that two
> different fields be assigned here?

irs->ipp is passed into ip_fast_csum,  "check" is part of the ip hdr
and needs to be zeroed before the checksum to get the correct answer.

I would expect there are other examples of this in klips,  and if not
it is a side affect of a bzero/memset or something.  It is definately not
pointless ;-)


David McCullough,  davidm at spottygum.com,   Ph: 0410 560 763

More information about the Swan-dev mailing list