diff options
author | Jeroen Roovers <jer@gentoo.org> | 2018-02-10 12:21:57 +0100 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2018-02-10 12:22:08 +0100 |
commit | e67466e42c6fc3c2775258cad58e1803b352e3bf (patch) | |
tree | 4b6ce02fe9ccadf1476b38e92310984f57aa03c5 /net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch | |
parent | dev-java/oracle-jdk-bin: Add elfutils as Linux-only dep to 9 (diff) | |
download | gentoo-e67466e42c6fc3c2775258cad58e1803b352e3bf.tar.gz gentoo-e67466e42c6fc3c2775258cad58e1803b352e3bf.tar.bz2 gentoo-e67466e42c6fc3c2775258cad58e1803b352e3bf.zip |
net-firewall/ipt_netflow: Fix kernel 4.15 compatibility (bug #646798).
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'net-firewall/ipt_netflow/files/ipt_netflow-2.2-linux-4.15.patch')
-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; |