Date: Sun, 5 Oct 2014 03:52:10 +0000 (UTC) From: Cy Schubert <cy@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272554 - head/sys/contrib/ipfilter/netinet Message-ID: <201410050352.s953qAsV019974@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cy Date: Sun Oct 5 03:52:09 2014 New Revision: 272554 URL: https://svnweb.freebsd.org/changeset/base/272554 Log: ipfilter bug #534 destination list hashing not endian neutral Obtained from: ipfilter CVS repo (r1.26), NetBSD CVS repo (r1.8) Modified: head/sys/contrib/ipfilter/netinet/ip_dstlist.c Modified: head/sys/contrib/ipfilter/netinet/ip_dstlist.c ============================================================================== --- head/sys/contrib/ipfilter/netinet/ip_dstlist.c Sun Oct 5 03:48:09 2014 (r272553) +++ head/sys/contrib/ipfilter/netinet/ip_dstlist.c Sun Oct 5 03:52:09 2014 (r272554) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201410050352.s953qAsV019974>