[PATCH 37/74] headers: add skb_tcp_all_headers
Johannes Berg <[email protected]> Fri, 24 May 2024 19:07:49 +0200
| Newsgroups | org.kernel.vger.backports |
|---|---|
| Message-ID | <20240524190907.2429e3545959.Ia864c56f1dd70716e29a2f97f07f57932923ebb6@changeid> |
From: Felix Fietkau <[email protected]> Signed-off-by: Felix Fietkau <[email protected]> Signed-off-by: Johannes Berg <[email protected]> --- backport/backport-include/linux/tcp.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 backport/backport-include/linux/tcp.h diff --git a/backport/backport-include/linux/tcp.h b/backport/backport-include/linux/tcp.h new file mode 100644 index 000000000000..2483cbebf66c --- /dev/null +++ b/backport/backport-include/linux/tcp.h @@ -0,0 +1,14 @@ +#ifndef __BACKPORT_LINUX_TCP_H +#define __BACKPORT_LINUX_TCP_H + +#include_next <linux/tcp.h> +#include <linux/version.h> + +#if LINUX_VERSION_IS_LESS(6,0,0) +static inline int skb_tcp_all_headers(const struct sk_buff *skb) +{ + return skb_transport_offset(skb) + tcp_hdrlen(skb); +} +#endif + +#endif -- 2.45.1