diff options
author | cy <cy@FreeBSD.org> | 2014-10-05 03:52:09 +0000 |
---|---|---|
committer | cy <cy@FreeBSD.org> | 2014-10-05 03:52:09 +0000 |
commit | f489a2c58994e425f7cade0d13d1e6dfed227e05 (patch) | |
tree | 3fdebe7c8b36252cd42dfe5e52ac34a71c95cbea /sys/contrib/ipfilter | |
parent | dd7b7ab08e03f54bd72e83c76a8d626572b0273c (diff) | |
download | FreeBSD-src-f489a2c58994e425f7cade0d13d1e6dfed227e05.zip FreeBSD-src-f489a2c58994e425f7cade0d13d1e6dfed227e05.tar.gz |
ipfilter bug #534 destination list hashing not endian neutral
Obtained from: ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)
Diffstat (limited to 'sys/contrib/ipfilter')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_dstlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_dstlist.c b/sys/contrib/ipfilter/netinet/ip_dstlist.c index d516556..dc7dacb 100644 --- a/sys/contrib/ipfilter/netinet/ip_dstlist.c +++ b/sys/contrib/ipfilter/netinet/ip_dstlist.c @@ -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; |