diff options
author | Felix Fietkau <nbd@nbd.name> | 2018-05-08 23:17:36 +0200 |
---|---|---|
committer | Felix Fietkau <nbd@nbd.name> | 2018-05-12 22:28:00 +0200 |
commit | a3096b4b33dcc5fcc07b229346ef337aa5962019 (patch) | |
tree | ee6e8b527be60629dd8f72b9b65bcd08237617a6 /target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch | |
parent | 066c85321ee0062866259c627ebc1cca71e309b3 (diff) | |
download | upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.tar.gz upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.tar.bz2 upstream-a3096b4b33dcc5fcc07b229346ef337aa5962019.zip |
kernel: fix build error in flow offload code with CONFIG_NETFILTER=n
Signed-off-by: Felix Fietkau <nbd@nbd.name>
Diffstat (limited to 'target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch')
-rw-r--r-- | target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch b/target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch index 3158714f54..409f6bec2c 100644 --- a/target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch +++ b/target/linux/generic/pending-4.14/643-net-bridge-support-hardware-flow-table-offload.patch @@ -9,19 +9,22 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c -@@ -18,6 +18,8 @@ +@@ -18,6 +18,10 @@ #include <linux/ethtool.h> #include <linux/list.h> #include <linux/netfilter_bridge.h> ++#ifdef CONFIG_NF_FLOW_TABLE +#include <linux/netfilter.h> +#include <net/netfilter/nf_flow_table.h> ++#endif #include <linux/uaccess.h> #include "br_private.h" -@@ -340,6 +342,26 @@ static const struct ethtool_ops br_ethto +@@ -340,6 +344,28 @@ static const struct ethtool_ops br_ethto .get_link = ethtool_op_get_link, }; ++#ifdef CONFIG_NF_FLOW_TABLE +static int br_flow_offload_check(struct flow_offload_hw_path *path) +{ + struct net_device *dev = path->dev; @@ -41,15 +44,18 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name> + + return 0; +} ++#endif /* CONFIG_NF_FLOW_TABLE */ + static const struct net_device_ops br_netdev_ops = { .ndo_open = br_dev_open, .ndo_stop = br_dev_stop, -@@ -367,6 +389,7 @@ static const struct net_device_ops br_ne +@@ -367,6 +393,9 @@ static const struct net_device_ops br_ne .ndo_bridge_setlink = br_setlink, .ndo_bridge_dellink = br_dellink, .ndo_features_check = passthru_features_check, ++#ifdef CONFIG_NF_FLOW_TABLE + .ndo_flow_offload_check = br_flow_offload_check, ++#endif }; static struct device_type br_type = { |