Fork me on GitHub
Subscribe 2

Ticket #247 (open enhancement)

Change how FluxBB handles IP addresses

  • Created: 2011-01-21 21:26:56
  • Reported by: Smartys
  • Assigned to: Reines
  • Milestone: 2.0-alpha5
  • Component: code
  • Priority: normal

This is a 2.0 suggestion wink

FluxBB has limited IPv6 support: I added the code to support it a while back. It is, however, very hack-ish: we're storing the data as literal strings without any attempt at normalization.

PHP, however, has matured since I've written that code:
http://us2.php.net/manual/en/function.inet-pton.php
http://us2.php.net/manual/en/function.inet-ntop.php

We can use these functions to store IP addresses in the database using VARBINARY(16) columns (or whatever the equivalent is for a particular DBMS). This is a more efficient representation than our current implementation allows for. It also means we won't have to handle any normalization issues on our own (which is a big deal with IPv6).

History

Smartys 2011-01-21 21:31:22

It might also be worth looking into PostgreSQL's support for this stuff at a column level: http://www.postgresql.org/docs/7.4/inte … types.html

Reines 2011-01-21 22:26:17

  • Milestone set to 2.0-beta1.

Reines 2011-02-25 00:49:04

  • Milestone changed from 2.0-beta1 to 2.0-alpha5.

Reines 2011-03-21 12:07:02

  • Owner set to Reines.