flow_dissector: Add the IPsec protocols to offset calculation
This avoids a pskb_expand_head for each IPsec packet.
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c
index 1f5caaf..7da6789 100644
--- a/net/core/flow_dissector.c
+++ b/net/core/flow_dissector.c
@@ -1244,6 +1244,15 @@ u32 __skb_get_poff(const struct sk_buff *skb, void *data,
case IPPROTO_SCTP:
poff += sizeof(struct sctphdr);
break;
+ case IPPROTO_ESP:
+ poff += sizeof(struct ip_esp_hdr);
+ break;
+ case IPPROTO_AH:
+ poff += sizeof(struct ip_auth_hdr);
+ break;
+ case IPPROTO_COMP:
+ poff += sizeof(struct ip_comp_hdr);
+ break;
}
return poff;