Add IPv6 support for DNSBL #48

Merged
nonmakina merged 5 commits from ipv6-dnsbl into config 3 years ago
Collaborator

Allows DNSBL to block IPv6 addresses. Briefly tested.

(Should have used the library but didn't want to experiement and possibly break the includes)

Allows DNSBL to block IPv6 addresses. Briefly tested. (Should have used the library but didn't want to experiement and possibly break the includes)
discomrade added 1 commit 3 years ago
44dd1ef6f6 Add IPv6 support for DNSBL
discomrade added 1 commit 3 years ago
nonmakina reviewed 3 years ago
return;
$ipaddr = ReverseIPOctets($_SERVER['REMOTE_ADDR']);
if (isIPv6()) {
Poster
Collaborator

re: supporting IPv6: very nice.

re: supporting IPv6: very nice.
discomrade marked this conversation as resolved
nonmakina reviewed 3 years ago
return strrev(implode(".", str_split(str_replace(':', '', inet_expand($ip)))));
}
// copypastad from lib/IP/Lifo/IP.php, TODO replace this with a proper include
Poster
Collaborator

why not just include the file?
a require_once should work?

why not just include the file? a require_once should work?
Poster
Collaborator

Threw a 500 internal error when I tried. Didn't investigate as I believe this functionality is needed immediately.
Edit: there was a typo in the filepath.

Threw a 500 internal error when I tried. Didn't investigate as I believe this functionality is needed immediately. Edit: there was a typo in the filepath.
discomrade marked this conversation as resolved
discomrade added 2 commits 3 years ago
discomrade added 1 commit 3 years ago
Collaborator

Great job, as always!

Great job, as always!
nonmakina merged commit 0070318b0d into config 3 years ago
discomrade deleted branch ipv6-dnsbl 2 years ago
The pull request has been merged as 0070318b0d.
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

This pull request currently doesn't have any dependencies.

Loading…
There is no content yet.