[Swan-dev] nit picking 288158a1d09c422181cdaed12a642ffb01566ddc

D. Hugh Redelmeier hugh at mimosa.com
Sun Mar 23 03:56:43 EET 2014


| From: David McCullough <ucdevel at gmail.com>

| D. Hugh Redelmeier wrote the following:

| > +               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.

Oops.  Thanks.


More information about the Swan-dev mailing list