aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCy Schubert <cy@FreeBSD.org>2014-10-05 03:52:09 +0000
committerCy Schubert <cy@FreeBSD.org>2014-10-05 03:52:09 +0000
commit3a77b75120868c80a0b0f7636973a652003dbd84 (patch)
tree3fdebe7c8b36252cd42dfe5e52ac34a71c95cbea
parent685545cdc727c97c955b92463c27b8ea08ebed27 (diff)
downloadsrc-3a77b75120868c80a0b0f7636973a652003dbd84.tar.gz
src-3a77b75120868c80a0b0f7636973a652003dbd84.zip
ipfilter bug #534 destination list hashing not endian neutral
Obtained from: ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8)
Notes
Notes: svn path=/head/; revision=272554
-rw-r--r--sys/contrib/ipfilter/netinet/ip_dstlist.c6
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 d516556c39cc..dc7dacb99fb8 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;