diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-02-11 16:09:52 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-02-11 16:09:52 +0000 |
commit | f78108598211053d41752a83e0345441bb9014ae (patch) | |
tree | dd2fc7ae0a1aea7bda4942ab0c453d1e55284b37 /net-firewall/ipt_netflow/files | |
parent | dc45b83b28fb83e9659492066e347b8dc60bc9e3 (diff) |
gentoo resync : 11.02.2018
Diffstat (limited to 'net-firewall/ipt_netflow/files')
-rw-r--r-- | net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch new file mode 100644 index 000000000000..aa5feef3279f --- /dev/null +++ b/net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch @@ -0,0 +1,26 @@ +--- a/ipt_NETFLOW.c ++++ b/ipt_NETFLOW.c +@@ -4357,7 +4357,11 @@ + #define CALC_RATE(ewma, cur, minutes) ewma += _A(cur - ewma, minutes) + + // calculate EWMA throughput rate for whole module ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) ++static void rate_timer_calc(struct timer_list *t) ++#else + static void rate_timer_calc(unsigned long dummy) ++#endif + { + static u64 old_pkt_total = 0; + static u64 old_traf_total = 0; +@@ -5525,7 +5525,11 @@ + + netflow_switch_version(protocol); + _schedule_scan_worker(0); ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,15,0) ++ timer_setup(&rate_timer, rate_timer_calc, 0); ++#else + setup_timer(&rate_timer, rate_timer_calc, 0); ++#endif + mod_timer(&rate_timer, jiffies + (HZ * SAMPLERATE)); + + peakflows_at = jiffies; |