diff options
author | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-01-15 09:19:23 +0000 |
---|---|---|
committer | Federico G. Schwindt <fgsch@cvs.openbsd.org> | 2000-01-15 09:19:23 +0000 |
commit | e783e06a2600cc8b240bdef8282d37f031faceba (patch) | |
tree | 29f1901875e9bf12ee3ea23ff67d56590f3c7135 /sys | |
parent | ab02e9f60eea7893d91927a9fe0515bbc031be07 (diff) |
Don't recompute the checksum if tc is modified; from FreeBSD.
I'm not sure why we'd want to reset it. Leave the comment as is by now.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/netipx/ipx_input.c | 25 |
1 files changed, 9 insertions, 16 deletions
diff --git a/sys/netipx/ipx_input.c b/sys/netipx/ipx_input.c index e1923f60256..22c7fd4dfe7 100644 --- a/sys/netipx/ipx_input.c +++ b/sys/netipx/ipx_input.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipx_input.c,v 1.13 2000/01/15 07:07:17 fgsch Exp $ */ +/* $OpenBSD: ipx_input.c,v 1.14 2000/01/15 09:19:22 fgsch Exp $ */ /*- * @@ -373,22 +373,15 @@ struct mbuf *m; goto cleanup; } } - /* need to adjust checksum */ - if (ipxcksum && ipx->ipx_sum != 0xffff) { - union bytes { - u_char c[4]; - u_short s[2]; - long l; - } x; - register int shift; - x.l = 0; x.c[0] = agedelta; - shift = (((((int)ntohs(ipx->ipx_len))+1)>>1)-2) & 0xf; - x.l = ipx->ipx_sum + (x.s[0] << shift); - x.l = x.s[0] + x.s[1]; - x.l = x.s[0] + x.s[1]; - if (x.l == 0xffff) ipx->ipx_sum = 0; else ipx->ipx_sum = x.l; - } else + /* + * We don't need to recompute checksum because ipx_tc field + * is ignored by checksum calculation routine, however + * it may be desirable to reset checksum if ipxcksum == 0 + */ +#if 0 + if (!ipxcksum) ipx->ipx_sum = 0xffff; +#endif error = ipx_outputfl(m, &ipx_droute, flags); if (error == 0) { |