Raised This Month: $32 Target: $400
 8% 

Multiple ISP, hook networking


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grif_ssa
BANNED
Join Date: Apr 2008
Old 10-16-2010 , 19:21   Multiple ISP, hook networking
Reply With Quote #1

Hi, can you help to hook network part of engine, i have 3 ISP setup on my server and only one can be used at the same time because all pakets go throught default gw, its about UDP implementation in engine - i found a solution how fix it, but i didnt know what functions to hook. The idea is to use IP_PKTINFO, recvmsg, sendmsg so i can send packets to that interface wich packet came from

thanks.

PS: sorry for bad english

Last edited by grif_ssa; 10-16-2010 at 19:23.
grif_ssa is offline
Send a message via ICQ to grif_ssa
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 10-20-2010 , 05:19   Re: Multiple ISP, hook networking
Reply With Quote #2

Can't you just use the -ip parameter to startup the srcds with the correct network interface IP ? Or add a route.. ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 10-20-2010 , 10:40   Re: Multiple ISP, hook networking
Reply With Quote #3

He wants to use Three IP addresses with his server, which would be cool provided they were all different ranges.
KyleS is offline
berni
SourceMod Plugin Approver
Join Date: May 2007
Location: Austria
Old 10-20-2010 , 11:06   Re: Multiple ISP, hook networking
Reply With Quote #4

What about setting the socket to 0.0.0.0 ?
__________________
Why reinvent the wheel ? Download smlib with over 350 useful functions.

When people ask me "Plz" just because it's shorter than "Please" I feel perfectly justified to answer "No" because it's shorter than "Yes"
powered by Core i7 3770k | 32GB DDR3 1886Mhz | 2x Vertex4 SSD Raid0
berni is offline
PM
hello, i am pm
Join Date: Jan 2004
Location: Canalization
Old 10-20-2010 , 13:39   Re: Multiple ISP, hook networking
Reply With Quote #5

In the worst case you can hook the system networking libraries used by HL2, which would be very platform specific.
__________________
hello, i am pm
PM is offline
grif_ssa
BANNED
Join Date: Apr 2008
Old 10-20-2010 , 18:33   Re: Multiple ISP, hook networking
Reply With Quote #6

i want to use 3 ip at same time, if i use 0.0.0.0 all UPD packets are send to default gateway, but not to that gateway from wich packet came

i already hooked creating socket so i can turn on IP_PKTINFO, but its hard to find correct loop where packets recv and send to clients
Code:
_Z14NET_OpenSocketPKcRib in engine
the only way for me now is to buy additional router or another pc - to take role of router
by router i can mark packects so it will know wich packet came from
but on local pc i cant do that even if i mark incoming packet - outgoing packet are new ones in nf_conntrack and not the same, on tcp connections all ok, but its only rcon

sorry my bad english couldnt explain as it is

Last edited by grif_ssa; 10-20-2010 at 18:36.
grif_ssa is offline
Send a message via ICQ to grif_ssa
KyleS
SourceMod Plugin Approver
Join Date: Jul 2009
Location: Segmentation Fault.
Old 10-20-2010 , 19:07   Re: Multiple ISP, hook networking
Reply With Quote #7

You could always cheat with iptables, forwarding traffic from one NIC to the other, and vice versa. This worked for me in the past, but became quite troublesome because half the player base was attached to one range, and the other on the other range.

That, and the server was no longer listed on the master server after I swapped my main range over. Just another way of going about this, the iptables way does have its drawbacks.
KyleS is offline
Reply


Thread Tools
Display Modes

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 -4. The time now is 21:51.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode