Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2015, 05:00 PM
apleschu apleschu is offline
 
Join Date: Aug 2005
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default vBulletin and IPv6

Out of the box, believe it or not, the developers of vBulletin do not seem to have any idea about IPv6 or the fact that we are using it already all over the world or that some folks need to or prefer to use IPv6. I am on of the latter category, my day to day job is in and about networks, so I need to know what is going on, and therefore my forums also have IPv6 enabled. Come to find out quite a number of folks already have, and are using IPv6. Unfortunately though the moment vBulletin encounters an IPv6 address it treats it just the same as if it were an IPv4. Needless to say that this does not make any sense at all.

Now I know there have been discussion in the past about IP addresses being treated as strings and that a few folks do not agree with that, I for one just wanted to be able to see the full address a client comes from, or have the full address available in the logs. With that said I set out to change what is needed in order to have vBulletin IPv6 aware. More than likely I forgot something, but at least it is working for now.

Now if you are a mod developer, don't thumb your nose at vBulletin, unless your mods are IPv6 aware as well. After all IPv6 is now around for long enough that we should all start to be aware and know how to use it.

But enough of the talk here are the changes I did in order to have my forum being able to deal with IPv6 addresses.

**IF YOU FOLLOW WHAT I DID AND YOU MESS UP YOUR FORUM YOU ARE ON YOUR OWN. THE FOLLOWING INSTRUCTIONS ARE DANGEROUS, SO IF YOU DO NOT FEEL 100% COMFORTABLE TO POKE AROUND IN THE DATABASE, *D*O* *N*O*T* *D*O* *I*T*!!**

Everywhere I saw so far IP addresses are just stored as strings, which makes a lot of things easy to deal with. First: Tables and fields that have to changed.

adminlog.ipaddress
apiclient.initialipaddress
apilog.ipaddress
blog_rate.ipaddress
blog_search.ipaddress
blog_text.ipaddress
blog_trackbacklog.ipaddress
cms_rate.ipaddress
dbtech_classifieds_listing.ipaddress
dbtech_classifieds_transaction.ipaddress
groupmessage.ipaddress
guest.ipaddress
guest.altip
guestviews.ipaddress
guestviews.altip
ipdata.ip
ipdata.altip
moderatorlog.ipaddress
picturecomment.ipaddress
post.ipaddress
searchcore.ipaddress
searchlog.ipaddress
session.host
strikes.strikeip
threadrate.ipaddress
user.ipaddress
userchangelog.ipaddress
visitormessage.ipaddress

for each one of them you basically have to change the field type in the database to a varchar(40) (I know 39 is technically enough, I just love to have one char extra as a buffer)

once that is done you will need to change one line in include/class_core.php:

Code:
define('SESSION_HOST',   substr(IPADDRESS, 0, 15));
to

Code:
define('SESSION_HOST',   substr(IPADDRESS, 0, 39));
After these changes at least the IPv6 addresses show up correctly in the online page and seem to be correct everywhere else as well. If you do this let me know what your experiences are.
Reply With Quote
Благодарность от:
Brandon Sheley
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 01:17 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05437 seconds
  • Memory Usage 2,203KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)post_thanks_box
  • (1)post_thanks_box_bit
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)showthread_list
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_threadedmode.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids_threaded
  • showthread_threaded_construct_link
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete