* [PATCH 1/2] backports: skbuff.h: Add nf_reset_ct()
@ 2019-10-09 21:12 Hauke Mehrtens
2019-10-09 21:12 ` [PATCH 2/2] backports: xfrm: Add skb_ext_reset() Hauke Mehrtens
0 siblings, 1 reply; 2+ messages in thread
From: Hauke Mehrtens @ 2019-10-09 21:12 UTC (permalink / raw)
To: backports; +Cc: johannes, Hauke Mehrtens
nf_reset_ct() was added in upstream Linux commit 895b5c9f206e
("netfilter: drop bridge nf reset from nf_reset") and is now used by
mac80211_hwsim.
The upstream commit renamed nf_reset() to nf_reset_ct() and did some
modifications to this inline function, just call the old version on
older kernel versions.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
backport/backport-include/linux/skbuff.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 41e5724b..42b048ad 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -398,6 +398,12 @@ static inline unsigned int skb_frag_off(const skb_frag_t *frag)
{
return frag->page_offset;
}
+
+#define nf_reset_ct LINUX_BACKPORT(nf_reset_ct)
+static inline void nf_reset_ct(struct sk_buff *skb)
+{
+ nf_reset(skb);
+}
#endif
#endif /* __BACKPORT_SKBUFF_H */
--
2.20.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [PATCH 2/2] backports: xfrm: Add skb_ext_reset()
2019-10-09 21:12 [PATCH 1/2] backports: skbuff.h: Add nf_reset_ct() Hauke Mehrtens
@ 2019-10-09 21:12 ` Hauke Mehrtens
0 siblings, 0 replies; 2+ messages in thread
From: Hauke Mehrtens @ 2019-10-09 21:12 UTC (permalink / raw)
To: backports; +Cc: johannes, Hauke Mehrtens
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
mac80211_hwsim.
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
versions.
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 --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 @@
+#ifndef __BACKPORT_NET_XFRM_H
+#define __BACKPORT_NET_XFRM_H
+#include_next <net/xfrm.h>
+#include <linux/version.h>
+
+#if LINUX_VERSION_IS_LESS(5,4,0)
+#define skb_ext_reset LINUX_BACKPORT(skb_ext_reset)
+static inline void skb_ext_reset(struct sk_buff *skb)
+{
+ secpath_reset(skb);
+}
+#endif
+
+#endif /* __BACKPORT_NET_XFRM_H */
--
2.20.1
--
To unsubscribe from this list: send the line "unsubscribe backports" in
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-10-09 21:21 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-09 21:12 [PATCH 1/2] backports: skbuff.h: Add nf_reset_ct() Hauke Mehrtens
2019-10-09 21:12 ` [PATCH 2/2] backports: xfrm: Add skb_ext_reset() Hauke Mehrtens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).