diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-13 13:12:43 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-05-13 16:58:53 +0200 |
commit | b2c20c032ab89e24c8210b1159348e48d917aea2 (patch) | |
tree | 08c05d84cff6621710382ac586f21ae76c85d0bf /src/compat | |
parent | 9a2036bbe12e8556f5df99c151b3e1233e6494b5 (diff) |
socket: use skb_put_data
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat')
-rw-r--r-- | src/compat/compat.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index d65a538..650b06b 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -577,6 +577,15 @@ struct _____dummy_container { char dev; }; #define genl_dump_check_consistent(a, b) genl_dump_check_consistent(a, b, &genl_family) #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 13, 0) && !defined(ISRHEL7) +static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned int len) +{ + void *tmp = skb_put(skb, len); + memcpy(tmp, data, len); + return tmp; +} +#endif + /* https://lkml.org/lkml/2017/6/23/790 */ #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/ip.h> |