Jump to content

Migrating a TCP socket and copying the contents of sk_buff for queues


Recommended Posts

Guest ha-as
Posted

Hello,

 

I am trying to migrate a TCP socket in listening mode from one server to another, to achieve this prupose I am copying multiple parameters related to the tcp_sock, and later I copy the contents of the sk_buff for out-of-order queue, write queue and read queue.

 

My question is it enough just to copy the following fields of the sk_buff, or not:

 

Code:

skb->data

skb->cb

skb->len

skb->data_len

skb->mac_len

skb->hdr_len

skb->csum

skb->priority

skb->ip_summed

skb->pkt_type

skb->rxhash

skb->truesize

Or do I need to to copy more extra fields?

 

For the current implmenetation, copying only these fields work perfectly. But when I try close the socket, the whole machine hangs, so I suppose. there might be something wrong in the data structure I created in the importing side, and I still need more fields to fill.

 

The current Linux Kernel Version I am developing on is 3.8.29

 

Continue reading...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...