LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-20-2016, 09:56 PM   #1
jiufei
LQ Newbie
 
Registered: Sep 2016
Posts: 4

Rep: Reputation: Disabled
why ip_frag_reasm() should check the head's frag_list ?


for kernel V2.6.23

static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
{
...
if (skb_shinfo(head)->frag_list) {
...
}
...
}

the above red font statement implies that there are maybe some fragments associated with the head skb in its frag_list, but I have no idea that why the head has something in its frag_list.

As we know, after ip_push_pending_frames, the first skb's frag_list is used to link all following fragments, but after ip_fragment() is called, all fragments are sent out one by one, so when the receiver recives a fragment coming from the network, how can we expect that fragment's frag_list still has fragments with it? in other words, under what condition in ip_frag_reasm(), the head fragment'frag_list does have following fragments?

for higher versions above 2.6.23, there are still equivalent codes to the above example.

can any one help me with this question?

Last edited by jiufei; 10-20-2016 at 10:01 PM.
 
Old 10-28-2016, 12:19 PM   #2
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
I think it might be a requirement of the use case, in the following method they are writing the skb to a paging file so they are attempting to resolve/exclude the possibility of additional bytes in the fragment list. Seems like it's roughly equivalent to a python 'assert' sanity check (i.e. assuming this thing isn't hosed and half of it is in the fragment list)
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Lavabit goes head to head with feds in contempt-of-court case LXer Syndicated Linux News 0 01-29-2014 01:21 PM
LXer: Head to Head Desktop Comparison: Ubuntu 12.10 vs OS X Mountain Lion LXer Syndicated Linux News 0 01-24-2013 03:40 AM
LXer: Samsung Galaxy Tab vs Apple iPad - specifications and features go head-to-head LXer Syndicated Linux News 0 10-06-2010 08:41 PM
Multi-monitor Issues on RH9, Geforce 4 Ti Dual Head + TNT2 Single Head the letter b Linux - Newbie 3 12-04-2004 11:23 PM
x86 Solaris 9 XSun and Matrox G550 dual-head... one head down, one to go. finegan Solaris / OpenSolaris 4 03-11-2003 12:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:00 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration