<div dir="ltr">hi all:<div>      The job of pskb_may_pull is to make sure that the area pointed to by skb-&gt;data contains a block of</div><div>data at least as big as the IP header, since each IP packet (fragments included) must include a complete IP</div><div>header.When we receive a packet , the kernel will call the pkb_may_pull(), it looks like the following in line 395:</div><div><br></div><div><div>373 /*</div><div>374  *  Main IP Receive routine.</div><div>375  */</div><div>376 int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)</div><div>377 {</div><div>378     const struct iphdr *iph;</div><div>379     u32 len;</div><div>380 </div><div>381     /* When the interface is in promisc. mode, drop all the crap</div><div>382      * that it receives, do not try to analyse it.</div><div>383      */</div><div>384     if (skb-&gt;pkt_type == PACKET_OTHERHOST)</div><div>385         goto drop;</div><div>386 </div><div>387 </div><div>388     IP_UPD_PO_STATS_BH(dev_net(dev), IPSTATS_MIB_IN, skb-&gt;len);</div><div>389 </div><div>390     if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) {</div><div>391         IP_INC_STATS_BH(dev_net(dev), IPSTATS_MIB_INDISCARDS);</div><div>392         goto out;</div><div>393     }</div><div>394 </div><div>395     if (!pskb_may_pull(skb, sizeof(struct iphdr)))</div><div>396         goto inhdr_error;</div><div>397 </div><div>398     iph = ip_hdr(skb);</div><div>399 </div></div><div><br></div><div>And the definition of pkb_may_pull() looks like the following:</div><div><br></div><div><div>1708 static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)</div><div>1709 {  </div><div>1710     if (likely(len &lt;= skb_headlen(skb)))</div><div>1711         return 1;</div><div>1712     if (unlikely(len &gt; skb-&gt;len))</div><div>1713         return 0;</div><div>1714     return __pskb_pull_tail(skb, len - skb_headlen(skb)) != NULL;</div><div>1715 }</div></div><div><br></div><div>I just want to know which situation make the skb-&gt;data contains a block of data less than the IP header?</div><div>I think this packet can&#39;t send by kernel at all.</div><div>Thank you.</div></div>