[2/2] backports: xfrm: Add skb_ext_reset()
diff mbox series

Message ID 20191009211207.29212-2-hauke@hauke-m.de
State New
Headers show
  • [1/2] backports: skbuff.h: Add nf_reset_ct()
Related show

Commit Message

Hauke Mehrtens Oct. 9, 2019, 9:12 p.m. UTC
skb_ext_reset() was added in upstream commit 174e23810cd3 ("sk_buff:
drop all skb extensions on free and skb scrubbing") and is now used by

skb_ext_reset() replaced the old call to secpath_reset() in
mac80211_hwsim and other places and it also does similar things than
this function. Juts call the old secpath_reset() on older kernel

This was added to net/xfrm.h and not linux/skbuff.h because
secpath_reset() is only available in net/xfrm.h in the upstream kernel
and this is not included in linux/skbuff.h.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
 backport/backport-include/net/xfrm.h | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 backport/backport-include/net/xfrm.h

diff mbox series

diff --git a/backport/backport-include/net/xfrm.h b/backport/backport-include/net/xfrm.h
new file mode 100644
index 00000000..7e55984b
--- /dev/null
+++ b/backport/backport-include/net/xfrm.h
@@ -0,0 +1,14 @@ 
+#include_next <net/xfrm.h>
+#include <linux/version.h>
+#define skb_ext_reset LINUX_BACKPORT(skb_ext_reset)
+static inline void skb_ext_reset(struct sk_buff *skb)
+	secpath_reset(skb);
+#endif /* __BACKPORT_NET_XFRM_H */