Commit 2b49e4cb authored by Natanael Copa's avatar Natanael Copa
Browse files

testing/ipt-netflow-grsec: upgrade to 2.2 and 4.9.9 kernel

parent 24733a94
......@@ -2,11 +2,11 @@
_flavor=grsec
_kpkg=linux-$_flavor
_kver=4.4.47
_kver=4.9.9
_kpkgrel=0
# when chaning _ver we *must* bump _mypkgrel
_ver=2.1
_ver=2.2
_mypkgrel=0
......@@ -30,7 +30,7 @@ url="http://ipt-netflow.sourceforge.net/"
arch="all !aarch64"
license=GPL3+
source="ipt-netflow-$_ver.tar.gz::https://github.com/aabc/ipt-netflow/archive/v$_ver.tar.gz
git.patch
kernel-4.6.patch
"
depends="$_kpkg-dev=$_kpkgver"
makedepends="linux-${_flavor}-dev=$_kpkgver iptables-dev bash"
......@@ -65,9 +65,5 @@ dev() {
default_dev
}
md5sums="bd8fc7d609c12832f5052f342640a839 ipt-netflow-2.1.tar.gz
98c5286c6471e47d3bb25026ac406b30 git.patch"
sha256sums="a3eafe7a09f09e15d330539fab983b88c887db56e5614bc820619e8462bc7749 ipt-netflow-2.1.tar.gz
4d45daecb82ca29a513ebaed7c9bab91f0d16fa7834b52a7ff06dc0d1cd4cd3a git.patch"
sha512sums="4ec48cb4612bd99d06ed2832d165fcddaf265f0c9555c7c49e012375c38c72cd57d5ee194a6b11e32eecfd2750e710a2bd167f3f2b2597b2e880a3f9b13ba27e ipt-netflow-2.1.tar.gz
3714c78ae8e8ca432a3216c2067ec00f64f1e25985b39996907f4638835509ab587605937c81d823a9dc95cf3b963a0119eade75a3f2286d425aa0d333a44bc9 git.patch"
sha512sums="e5d9039c079abfb2ef3656d96228616514ac57d87a9c71181f132ecac51e51407bcdc62aa6e1eb43d16f98be5b22d3801c58578317ea21aaa5433ed143daabe2 ipt-netflow-2.2.tar.gz
96a250b87f8fb7d6240850dd0721aa0e1dcc7647b689abb15b07fb8758aea4338e5d169b3d0dca19e45279b38166d791cd0d412a9f4b44caf028cee2e782b72b kernel-4.6.patch"
This diff is collapsed.
From c16ffc6cb679b3377a0d4a30a6bbcf5e2f3d0214 Mon Sep 17 00:00:00 2001
From: ABC <abc@telekom.ru>
Date: Sun, 22 May 2016 22:07:14 +0300
Subject: [PATCH] Support ETHTOOL_xLINKSETTINGS API (new in linux 4.6).
Thus, making support for 4.6 kernels.
Reference to linux commit:
https://github.com/torvalds/linux/commit/3f1ac7a700d
Fixes #56, thanks karel-un.
---
ipt_NETFLOW.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/ipt_NETFLOW.c b/ipt_NETFLOW.c
index 067fd50..d27eea2 100644
--- a/ipt_NETFLOW.c
+++ b/ipt_NETFLOW.c
@@ -3904,7 +3904,13 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
{
struct ethtool_drvinfo info = { 0 };
const struct ethtool_ops *ops = dev->ethtool_ops;
+#ifndef ETHTOOL_GLINKSETTINGS
struct ethtool_cmd ecmd;
+#define _KSETTINGS(x, y) (x)
+#else
+ struct ethtool_link_ksettings ekmd;
+#define _KSETTINGS(x, y) (y)
+#endif
int len = size;
int n;
@@ -3933,11 +3939,11 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
/* only get_settings for running devices to not trigger link negotiation */
if (dev->flags & IFF_UP &&
dev->flags & IFF_RUNNING &&
- !__ethtool_get_settings(dev, &ecmd)) {
+ !_KSETTINGS(__ethtool_get_settings(dev, &ecmd), __ethtool_get_link_ksettings(dev, &ekmd))) {
char *s, *p;
/* append basic parameters: speed and port */
- switch (ethtool_cmd_speed(&ecmd)) {
+ switch (_KSETTINGS(ethtool_cmd_speed(&ecmd), ekmd.base.speed)) {
case SPEED_10000: s = "10Gb"; break;
case SPEED_2500: s = "2.5Gb"; break;
case SPEED_1000: s = "1Gb"; break;
@@ -3945,7 +3951,7 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
case SPEED_10: s = "10Mb"; break;
default: s = "";
}
- switch (ecmd.port) {
+ switch (_KSETTINGS(ecmd.port, ekmd.base.port)) {
case PORT_TP: p = "tp"; break;
case PORT_AUI: p = "aui"; break;
case PORT_MII: p = "mii"; break;
@@ -3964,6 +3970,7 @@ static int ethtool_drvinfo(unsigned char *ptr, size_t size, struct net_device *d
ops->complete(dev);
return size - len;
}
+#undef _KSETTINGS
static const unsigned short netdev_type[] =
{ARPHRD_NETROM, ARPHRD_ETHER, ARPHRD_AX25,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment