From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Fri, 30 Mar 2012 23:02:37 +0300 From: Dan Carpenter Message-ID: <20120330200236.GH3289@mwanda> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [B.A.T.M.A.N.] question about frag_can_reassemble() Reply-To: The list for a Better Approach To Mobile Ad-hoc Networking List-Id: The list for a Better Approach To Mobile Ad-hoc Networking List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Sven Eckelmann Cc: netdev@vger.kernel.org, b.a.t.m.a.n@lists.open-mesh.org Hi Sven, I had a question about the code in frag_can_reassemble(). net/batman-adv/unicast.h 51 52 merged_size = (skb->len - sizeof(*unicast_packet)) * 2; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 53 merged_size += sizeof(struct unicast_packet) + uneven_correction; 54 55 return merged_size <= mtu; 56 } Can the skb->len be less than sizeof(*unicast_packet) (ie 20 bytes)? If "len" is less than 10 then we would return false but if it's over 10 then we would return true. Roughly. regards, dan carpenter