Fix compatibility back to Linux 2.6.15 and 2.4.32.
[sliver-openvswitch.git] / datapath / linux-2.6 / compat-2.6 / include / linux / ip.h
index 7915873..9c8d574 100644 (file)
@@ -13,6 +13,11 @@ static inline struct iphdr *ip_hdr(const struct sk_buff *skb)
 {
        return (struct iphdr *)skb_network_header(skb);
 }
+
+static inline unsigned int ip_hdrlen(const struct sk_buff *skb)
+{
+       return ip_hdr(skb)->ihl * 4;
+}
 #endif /* __KERNEL__ */
 
 #endif /* linux kernel < 2.6.22 */