meta/recipes-kernel/linux/linux-yocto_3.8.bb invokes KERNEL_EXTRA_FEATURE netfilter.scc: compared to kernel < 3.8 iptables with nat is not working. I assume that CONFIG_NF_NAT_IP4 , CONFIG_NF_TARGET_MASQUERADE/NETMAP and REDIRECT should be set as Module in netfilter.cfg
Sebastian, can you provide an example of how it is failing? Do you have a testcase? I suspect you are correct and the meta-data needs to be reviewed. Would you care to test your suggestion below and submit a patch to the linux-yocto meta branch?
Hi, as a testcase you can u can build core-image-minimal for qemux86 with linux-yocto 3.8 and feature 'netfilter'. In the running system 'modprobe ip_tables' is ok. Using iptable with nat for e.g. forwarding fails with following return message: >iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE 'iptables: Table does not exist (do you need to insmod?)' This doesn't happen with Kernel 3.4 or 3.2. I'll provide a patch here later, as soon as i tested it.
Created attachment 1288 [details] netfilter kernel configuration fix for nat table attached is a patch for meta feature that solves the problem. not sure if a patch for ip configuration is also needed.
I could reproduce the issue locally. Will try the suggested fix now.
The issue gets fixed with this extra addition to local.conf KERNEL_FEATURES_sugarbay += "features/netfilter/netfilter" Also the /proc/config.gz shows as expected. So this is not a kernel config issue, but a feature enabling matter. By default the netfilter kernel feature is not enabled for sugarbay. So the right fix would be to enable the netfilter kernel feature. Is it required to enable the netfilter feature in general for the sugarbay BSP, and other BSPs too? It is enabled for qemu BSPs. Nitin
The question we have to ask is why did this work for 3.4 and stop working for 3.8? Did we intentionally drop netfilter support from the standard ktype? This strikes me as a regression if it is indeed true that netfilter was enabled by default previously. If so, the netfilter feature should probably be added to standard.scc. Can you confirm that support was indeed dropped from 3.4 to 3.8?
The problem is KERNEL_FEATURES additions in the meta-intel layer are overriding the previous value from oecore layer. # $KERNEL_FEATURES [10 operations] # _append /home/nitin/build-test-bsps/poky.git/meta/recipes-kernel/linux/linux-yocto_3.8.bb:28 # " ${KERNEL_EXTRA_FEATURES}" # _append[qemux86] /home/nitin/build-test-bsps/poky.git/meta/recipes-kernel/linux/linux-yocto_3.8.bb:29 # " cfg/sound.scc cfg/paravirt_kvm.scc" # _append[qemux86-64] /home/nitin/build-test-bsps/poky.git/meta/recipes-kernel/linux/linux-yocto_3.8.bb:30 # " cfg/sound.scc" # _append /home/nitin/build-test-bsps/poky.git/meta/recipes-kernel/linux/linux-yocto_3.8.bb:31 # " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" # set data_smart.py:414 [finalize] # " ${KERNEL_EXTRA_FEATURES}" # set data_smart.py:414 [finalize] # " ${KERNEL_EXTRA_FEATURES} ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" # finalize ast.py:333 [finalize] # "was: ${KERNEL_EXTRA_FEATURES} ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" # override[sugarbay]:_append /home/nitin/build-test-bsps/poky.git/../meta-intel.git/meta-sugarbay/recipes-kernel/linux/linux-yocto_3.8.bbappend:7 # " features/usb/usb-uvcvideo features/media/v4l2" # override[sugarbay]:set data_smart.py:414 [finalize] # " features/usb/usb-uvcvideo features/media/v4l2" # finalize override[sugarbay]: # " features/usb/usb-uvcvideo features/media/v4l2" # computed: # " features/usb/usb-uvcvideo features/media/v4l2" KERNEL_FEATURES="features/usb/usb-uvcvideo features/media/v4l2"
It was an unintentional disabling of kernel features for bunch of BSPs. I have fixes for all these affected BSPs now. I will send the change for review shortly.
a fix for this is sent to meta-intel mailing list.
Fixed in meta-intel: commit 6d074cae27420c9148aab66fda535f89cb6b7ca0 Author: Nitin A Kamble <nitin.a.kamble@intel.com> Date: Fri Jul 26 18:31:33 2013 -0700 fri2: correct the KERNEL_FEATURE variable name The var KERNEL_FEATURES_sugarbay_append overrides the previous value defined in the oecore layer, and the var KERNEL_FEATURES_append_sugarbay preserves the old value and extends it. This change avoids unintentional disabling of some KERNEL_FEATURES such as netfilter. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> commit 84fdca145a19d4715e2d743dd7b45c20e8ed9691 Author: Nitin A Kamble <nitin.a.kamble@intel.com> Date: Fri Jul 26 18:30:51 2013 -0700 emenlow: correct the KERNEL_FEATURE variable name The var KERNEL_FEATURES_sugarbay_append overrides the previous value defined in the oecore layer, and the var KERNEL_FEATURES_append_sugarbay preserves the old value and extends it. This change avoids unintentional disabling of some KERNEL_FEATURES such as netfilter. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> commit 75ac6a2a98fe76653dfb55da5c5afd592ec18acb Author: Nitin A Kamble <nitin.a.kamble@intel.com> Date: Fri Jul 26 18:30:04 2013 -0700 crownbay: correct the KERNEL_FEATURE variable name The var KERNEL_FEATURES_sugarbay_append overrides the previous value defined in the oecore layer, and the var KERNEL_FEATURES_append_sugarbay preserves the old value and extends it. This change avoids unintentional disabling of some KERNEL_FEATURES such as netfilter. Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com> commit 2173e8f778a381012028ee79d5dc3351606a9bdb Author: Nitin A Kamble <nitin.a.kamble@intel.com> Date: Thu Jun 27 13:33:51 2013 -0700 sugarbay: correct the KERNEL_FEATURE variable name The var KERNEL_FEATURES_sugarbay_append overrides the previous value defined in the oecore layer, and the var KERNEL_FEATURES_append_sugarbay preserves the old value and extends it. This change avoids unintentional disabling of some KERNEL_FEATURES such as netfilter. Fixes bug: [YOCTO #4741] Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com> Signed-off-by: Tom Zanussi <tom.zanussi@linux.intel.com>