ipfilter bug #534 destination list hashing not endian neutral

Obtained from:	ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)
This commit is contained in:
Cy Schubert 2014-10-05 03:52:09 +00:00
parent 685545cdc7
commit 3a77b75120

View File

@ -1193,7 +1193,7 @@ ipf_dstlist_select(fin, d)
MD5Update(&ctx, (u_char *)&fin->fin_dst6,
sizeof(fin->fin_dst6));
MD5Final((u_char *)hash, &ctx);
x = hash[0] % d->ipld_nodes;
x = ntohl(hash[0]) % d->ipld_nodes;
sel = d->ipld_dests[x];
break;
@ -1203,7 +1203,7 @@ ipf_dstlist_select(fin, d)
MD5Update(&ctx, (u_char *)&fin->fin_src6,
sizeof(fin->fin_src6));
MD5Final((u_char *)hash, &ctx);
x = hash[0] % d->ipld_nodes;
x = ntohl(hash[0]) % d->ipld_nodes;
sel = d->ipld_dests[x];
break;
@ -1213,7 +1213,7 @@ ipf_dstlist_select(fin, d)
MD5Update(&ctx, (u_char *)&fin->fin_dst6,
sizeof(fin->fin_dst6));
MD5Final((u_char *)hash, &ctx);
x = hash[0] % d->ipld_nodes;
x = ntohl(hash[0]) % d->ipld_nodes;
sel = d->ipld_dests[x];
break;