You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Device problem occurs on - ramips mediatek soc targets (e.g ramips_mt76x8)
Software versions of OpenWrt/LEDE release, packages, etc. - master and 18.06 (probably earlier, couldn't confirm); kernel package
Steps to reproduce - try to build without netfilter support (e.g. for creating a dumb ap in hardware with very low flash space)
Building Openwrt fails (confirmed on master and 18.06) for some mediatek targets if netfilter is disabled, due to a unnecessary include in OpenWRT kernel source that isn't even present in vanilla/upstream kernel:
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:34:0:
./include/net/netfilter/nf_flow_table.h:19:2: error: unknown type name 'nf_hookfn'
nf_hookfn *hook;
^~~~~~~~~
./include/net/netfilter/nf_flow_table.h:149:23: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
const struct nf_hook_state *state);
^~~~~~~~~~~~~
./include/net/netfilter/nf_flow_table.h:151:25: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
const struct nf_hook_state *state);
^~~~~~~~~~~~~
The problem resides in the file linux-4.14.*/drivers/net/ethernet/mediatek/mtk_eth_soc.c at line 34 that has:
#include <net/netfilter/nf_flow_table.h>
By simply removing/commenting the aforementioned line, it is possible to build the image with success. As such, this line seems unnecessary and just causes issues?
This line isn't present in vanilla/upstream kernel as you can see in:
The change comes from openwrt file target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c and as such the attached patch fixes this issue for now, but is more a workaround. Maybe who put the include should review and add some ifdefs where appropriate?
For now, my tests indicate that applying this patch does not cause major issues if you build with netfilter (firewall, iptables, etc.) support, but something is probably missing. Can you please check?
Also, please note that the same (unnecessary?) include is present in target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h and probably affects building with some other configurations as well.
Thanks and best regards.
The text was updated successfully, but these errors were encountered:
araujorm:
Building Openwrt fails (confirmed on master and 18.06) for some mediatek targets if netfilter is disabled, due to a unnecessary include in OpenWRT kernel source that isn't even present in vanilla/upstream kernel:
In file included from drivers/net/ethernet/mediatek/mtk_eth_soc.c:34:0:
./include/net/netfilter/nf_flow_table.h:19:2: error: unknown type name 'nf_hookfn'
nf_hookfn *hook;
^~~~~~~~~
./include/net/netfilter/nf_flow_table.h:149:23: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
const struct nf_hook_state *state);
^~~~~~~~~~~~~
./include/net/netfilter/nf_flow_table.h:151:25: warning: 'struct nf_hook_state' declared inside parameter list will not be visible outside of this definition or declaration
const struct nf_hook_state *state);
^~~~~~~~~~~~~
The problem resides in the file linux-4.14.*/drivers/net/ethernet/mediatek/mtk_eth_soc.c at line 34 that has:
#include <net/netfilter/nf_flow_table.h>
By simply removing/commenting the aforementioned line, it is possible to build the image with success. As such, this line seems unnecessary and just causes issues?
This line isn't present in vanilla/upstream kernel as you can see in:
https://github.com/torvalds/linux/blob/master/drivers/net/ethernet/mediatek/mtk_eth_soc.c
The change comes from openwrt file target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c and as such the attached patch fixes this issue for now, but is more a workaround. Maybe who put the include should review and add some ifdefs where appropriate?
For now, my tests indicate that applying this patch does not cause major issues if you build with netfilter (firewall, iptables, etc.) support, but something is probably missing. Can you please check?
Also, please note that the same (unnecessary?) include is present in target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.h and probably affects building with some other configurations as well.
Thanks and best regards.
The text was updated successfully, but these errors were encountered: