diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-09 10:04:04 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-06-09 10:04:04 +0200 |
commit | 94333d83ab5df8bd51b148a69a33aa6b335c6fc6 (patch) | |
tree | 0903426babb1f1f43bd590c95d18839e1ec825a4 /sys/src/libdraw | |
parent | 90b4fe9cf65bb24b55472ce2e32a7dbc3c5e7f97 (diff) |
ip: fix wrong radix for iphash() (thanks yoann padioleau)
yoann padioleaus report on 9fans:
> I think I’ve found a bug in the network stack.
> in 9/ip/ip.h there is
> struct Ipht
> {
> Lock;
> Iphash *tab[Nipht];
> };
>
> where Night is 521,
>
> but then in 9/ip/ipaux.c there is
>
> ulong
> iphash(uchar *sa, ushort sp, uchar *da, ushort dp)
> {
> return ((sa[IPaddrlen-1]<<24) ^ (sp << 16) ^ (da[IPaddrlen-1]<<8) ^ dp ) % Nhash;
> }
>
> where Nhash is just 64,
Diffstat (limited to 'sys/src/libdraw')
0 files changed, 0 insertions, 0 deletions