title: Why skb_transport_header does not calculate correctly?
body: <p>I write an application with <code>netfilter hooks</code>.</p>
  
  <p>It seems <code>skb_transport_header</code> function does not calculate correctly (sometimes but not always): </p>
  
  <pre><code>struct tcphdr* tcp_header = NULL;
  tcp_header = (struct tcphdr*)skb_transport_header(skb); // somtimes incorrect address.
  tcp_header = (struct tcphdr*)((char*)ip_header + (ip_header-&gt;ihl * 4));// always correct address.
  </code></pre>
  
  <p>Where is my wrong?</p>