From owner-freebsd-net@FreeBSD.ORG Tue Nov 14 16:20:24 2006 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4EA7716A494; Tue, 14 Nov 2006 16:20:24 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by mx1.FreeBSD.org (Postfix) with ESMTP id 853E943F70; Tue, 14 Nov 2006 16:09:19 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.186.21] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu5) with ESMTP (Nemesis), id 0ML25U-1Gk0qT1noA-0003As; Tue, 14 Nov 2006 17:09:09 +0100 From: Max Laier Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Tue, 14 Nov 2006 17:09:20 +0100 User-Agent: KMail/1.9.4 X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<%}*_BD U_or=\mOZf764&nYj=JYbR1PW0ud>|!~, , CPC.1-D$FG@0h3#'5"k{V]a~. X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: freebsd-net@freebsd.org Subject: ipv6 connection hash function wanted ... X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Nov 2006 16:20:24 -0000 --nextPart1529959.aSOhg96bU6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, this one is something for people who know their math. Input: 2x128bit of address (lower ~80bit selectable by user) and 2x16bit=20 of ports (more or less selectable by user). Note that the "flow_id" is=20 not useable as several broken stack implementations do not set it=20 consistently - and it is user settable as well. Output: "int" hash value - by default we use the lower 8bit of it. Problems: Most of the input can be selected by a user meaning it is easy=20 to produce collisions. For legal connections, the lower 64bit are the=20 one with the highest entropy - in fact the upper 64bit might be the same=20 for many connections coming from/going to the same subnet. This function=20 will be used for every packet that is passed to a dynamic IPFW rule, so=20 efficiency is a concern. Any ideas? Any papers that deal with this problem? ref: sys/netinet/ip_fw2.c::hash_packet6 =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart1529959.aSOhg96bU6 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (FreeBSD) iD8DBQBFWeo2XyyEoT62BG0RAv5YAJ99W3lFucWxtqwM2DffEMRd9B3DIgCdG5Nh 0cHxQBrsibVS6R+saGqA0mY= =l4Hy -----END PGP SIGNATURE----- --nextPart1529959.aSOhg96bU6--