ipv6 connection hash function wanted ...



Hello,

this one is something for people who know their math.

Input: 2x128bit of address (lower ~80bit selectable by user) and 2x16bit
of ports (more or less selectable by user). Note that the "flow_id" is
not useable as several broken stack implementations do not set it
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
to produce collisions. For legal connections, the lower 64bit are the
one with the highest entropy - in fact the upper 64bit might be the same
for many connections coming from/going to the same subnet. This function
will be used for every packet that is passed to a dynamic IPFW rule, so
efficiency is a concern.

Any ideas? Any papers that deal with this problem?

ref: sys/netinet/ip_fw2.c::hash_packet6

--
/"\ Best regards, | mlaier@xxxxxxxxxxx
\ / Max Laier | ICQ #67774661
X http://pf4freebsd.love2party.net/ | mlaier@EFnet
/ \ ASCII Ribbon Campaign | Against HTML Mail and News

Attachment: pgpVDhICq4phZ.pgp
Description: PGP signature



Relevant Pages

  • ipv6 connection hash function wanted ...
    ... this one is something for people who know their math. ... of ports. ... to produce collisions. ... For legal connections, ...
    (freebsd-hackers)
  • Re: ipv6 connection hash function wanted ...
    ... Max Laier wrote: ... this one is something for people who know their math. ... 2x128bit of address and 2x16bit of ports. ... For legal connections, the lower 64bit are the one with the highest entropy - in fact the upper 64bit might be the same for many connections coming from/going to the same subnet. ...
    (freebsd-net)
  • Re: ipv6 connection hash function wanted ...
    ... of ports. ... not useable as several broken stack implementations do not set it ... For legal connections, ... If you are worried about users controlling which values their packets hash ...
    (freebsd-net)
  • Re: ipv6 connection hash function wanted ...
    ... of ports. ... not useable as several broken stack implementations do not set it ... For legal connections, ... If you are worried about users controlling which values their packets hash ...
    (freebsd-hackers)
  • Re: command-line calculator?
    ... > just do some simple math on the command line? ... It's in ports and easier than anything else I've seen suggested. ...
    (freebsd-questions)