#include <linux/stddef.h>
#include <linux/debugobjects.h>
#include <linux/stringify.h>
+#include <linux/version.h>
struct tvec_base;
#define from_timer(var, callback_timer, timer_fieldname) \
container_of(callback_timer, typeof(*var), timer_fieldname)
-
/**
* timer_pending - is a timer pending?
* @timer: the timer in question
void (*constructor)(struct inet_frag_queue *q,
const void *arg);
void (*destructor)(struct inet_frag_queue *);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+ void (*frag_expire)(unsigned long t);
+#else
void (*frag_expire)(struct timer_list *t);
+#endif
struct kmem_cache *frags_cachep;
const char *frags_cache_name;
struct rhashtable_params rhash_params;
f->constructor(q, arg);
add_frag_mem_limit(nf, f->qsize);
- timer_setup(&q->timer, f->frag_expire, 0);
+ timer_setup(&q->timer, (void (*)(struct timer_list *))f->frag_expire, 0);
spin_lock_init(&q->lock);
refcount_set(&q->refcnt, 3);
/*
* Oops, a fragment queue timed out. Kill it and send an ICMP reply.
*/
+ #if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+static void ip_expire(unsigned long t)
+#else
static void ip_expire(struct timer_list *t)
+#endif
{
- struct inet_frag_queue *frag = from_timer(frag, t, timer);
+ struct inet_frag_queue *frag = from_timer(frag, (struct timer_list *)t, timer);
const struct iphdr *iph;
struct sk_buff *head = NULL;
struct net *net;
return 1 << (ipv6_get_dsfield(ipv6h) & INET_ECN_MASK);
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+static void nf_ct_frag6_expire(unsigned long t)
+#else
static void nf_ct_frag6_expire(struct timer_list *t)
+#endif
{
- struct inet_frag_queue *frag = from_timer(frag, t, timer);
+ struct inet_frag_queue *frag = from_timer(frag, (struct timer_list *)t, timer);
struct frag_queue *fq;
struct net *net;
}
EXPORT_SYMBOL(ip6_expire_frag_queue);
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+static void ip6_frag_expire(unsigned long t)
+#else
static void ip6_frag_expire(struct timer_list *t)
+#endif
{
- struct inet_frag_queue *frag = from_timer(frag, t, timer);
+ struct inet_frag_queue *frag = from_timer(frag, (struct timer_list *)t, timer);
struct frag_queue *fq;
struct net *net;