Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rs maybe fetch wrong clientip #8

Open
baochun opened this issue Dec 15, 2017 · 3 comments
Open

rs maybe fetch wrong clientip #8

baochun opened this issue Dec 15, 2017 · 3 comments

Comments

@baochun
Copy link

baochun commented Dec 15, 2017

this maybe happend in this condition:

connection1: rsip + 80  <---> localip1+port1, clientip1 ; this connection not expire in ip_vs_ca, but free in lvs. 
connection2: rsip + 3306 <---> localip1 + port1 , clientip2 ; and this is new connection.

if this happend, connection2 will get clientip1.

@yubo
Copy link
Owner

yubo commented Dec 19, 2017

Indeed there is such a possibility,
Do you have a good idea?
I think we can do a coverage strategy to solve this problem

@CentUser
Copy link

I think the root cause of this problem is that this code saves connection info in module allocated memory, and when a connection is up abnormally, one could not know when the connection info should be removed from the hash table if the connection is closed due to the previous reason.
Original toa module use the sk_user_data to store the client info, but the 8 bit variable is not sufficient for ipv6.

@CentUser
Copy link

Trade memory for speed, if we could maintain an slab cache for connections and hack into the tcp_prot->destroy function, at there release the connection info.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants