-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
IPv6 idents are now the first ten characters of the base32 encoded SHA-1 hash of the user's IP. Unlike IPv4 addresses, there is a possibility that there will be collisions (i.e., two IPs that get the same ident). This is unfourtunate, but it is unavoidable given that IRCds typically only allow about ten characters for the username. Fourtunately, the probability of collision is quite small (assuming SHA-1 produces well distributed output, the probability of even an 8-character ident collising is one in 32^8 or about one in a trillion). This also fixes addresses starting with a colon (e.g., IPv4-mapped IPv6 addresses), unmaps IPv4-mapped IPv6 addresses, and fixes a place where it was assumed that an address with a dot was IPv6.
- Loading branch information
1 parent
55b0bb2
commit d1002fc
Showing
3 changed files
with
74 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters