diff mbox series

[37/74] headers: add skb_tcp_all_headers

Message ID 20240524190907.2429e3545959.Ia864c56f1dd70716e29a2f97f07f57932923ebb6@changeid (mailing list archive)
State New, archived
Headers show
Series backport updates from Intel | expand

Commit Message

Johannes Berg May 24, 2024, 5:07 p.m. UTC
From: Felix Fietkau <nbd@nbd.name>

Signed-off-by: Felix Fietkau <nbd@nbd.name>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 backport/backport-include/linux/tcp.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/linux/tcp.h
diff mbox series

Patch

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