Hi i have installed sysupgrade image from repository => https://github.com/melsem/openwrt-19.07.2-spi/ to Orangepi r1's SPI Flash successfully
but i want to install kmod-br-netfilter to filter traffic between bridged interfaces
when i installed that kmod package without enabling bridge interface from /etc/config/network there is no problem
but when I activated "option type 'bridge' from network config below
it goes to kernel panic.
Any help would be appreciated.
root@orangepi-r1:/# cat /proc/version
Linux version 4.14.171 (sem@RV508) (gcc version 7.5.0 (OpenWrt GCC 7.5.0 r10947-65030d81f3)) #0 SMP PREEMPT Thu Feb 27 21:05:12 2020
root@orangepi-r1:/# uname -a
Linux orangepi-r1 4.14.171 #0 SMP PREEMPT Thu Feb 27 21:05:12 2020 armv7l GNU/Linux
/etc/config/network >>
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd95:4824:4633::/48'
config interface 'lan'
option type 'bridge'
option ifname 'eth0'
option proto 'dhcp'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
config interface 'wan'
option ifname 'eth1'
option proto 'dhcp'
config interface 'wan6'
option ifname 'eth1'
option proto 'dhcpv6'
root@orangepi-r1:/# opkg install kmod-br-netfilter
Installing kmod-br-netfilter (4.14.171-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.2/targets/sunxi/cortexa7/packages/kmod-br-netfilter_4.14.171-1_arm_cortex-a7_neon-vfpv4.ipk
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for kmod-br-netfilter:
* kernel (= 4.14.171-1-9801ec2dfc48e8fb2cc10a339283e7b0)
* opkg_install_cmd: Cannot install package kmod-br-netfilter.
root@orangepi-r1:/#
## I builded and installed the package myself due to kernel incompliance
root@orangepi-r1:~# opkg install kmod-br-netfilter_4.14.171-1_arm_cortex-a7_neon-vfpv4.ipk
Installing kmod-br-netfilter (4.14.171-1) to root...
Configuring kmod-br-netfilter.
6.805073] dwmac-sun8i 1c30000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
[ 6.813666] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[ 7.850091] mount_root: loading kmods from internal overlay
[ 7.886383] kmodloader: loading kernel modules from //etc/modules-boot.d/*
[ 7.895851] kmodloader: done loading kernel modules from //etc/modules-boot.d/*
[ 8.407365] jffs2: notice: (805) jffs2_build_xattr_subsystem: complete building xattr subsystem, 14 of xdatum (2 unchecked, 12 orphan) and 29 of xref (12 dead, 0 orphan) found.
[ 8.424072] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 8.445308] block: extroot: not configured
[ 8.537731] jffs2: notice: (803) jffs2_build_xattr_subsystem: complete building xattr subsystem, 14 of xdatum (2 unchecked, 12 orphan) and 29 of xref (12 dead, 0 orphan) found.
[ 8.558277] mount_root: loading kmods from internal overlay
[ 8.600326] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[ 8.613107] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[ 8.953676] block: attempting to load /tmp/jffs_cfg/upper/etc/config/fstab
[ 8.969367] block: extroot: not configured
[ 9.055750] mount_root: switching to jffs2 overlay
[ 9.093107] overlayfs: upper fs does not support tmpfile.
[ 9.109928] urandom-seed: Seeding with /etc/urandom.seed
[ 9.182332] procd: - early -
[ 9.185420] procd: - watchdog -
Failed to connect to ubus
Failed to connect to ubus
[ 9.851748] procd: - watchdog -
[ 9.855220] procd: - ubus -
[ 10.001074] procd: - init -
Please press Enter to activate this console.
[ 10.450156] kmodloader: loading kernel modules from /etc/modules.d/*
[ 10.458378] urngd: v1.0.2 started.
[ 10.462391] ntfs: driver 2.1.32 [Flags: R/O MODULE].
[ 10.475940] tun: Universal TUN/TAP device driver, 1.6
[ 10.488038] ip6_tables: (C) 2000-2006 Netfilter Core Team
[ 10.498193] Netfilter messages via NETLINK v0.30.
[ 10.504330] ip_set: protocol 6
[ 10.525348] Loading modules backported from Linux version v4.19.98-0-gd183c8e2647a
[ 10.532962] Backport generated by backports.git v4.19.98-1-0-g8204eb99
[ 10.748537] i2c /dev entries driver
[ 10.760310] Linux video capture interface: v2.00
[ 10.769948] hidraw: raw HID events driver (C) Jiri Kosina
[ 10.784372] Mirror/redirect action on
[ 10.795517] u32 classifier
[ 10.798253] input device check on
[ 10.801932] Actions configured
[ 10.813289] GACT probability on
[ 10.820049] Simple TC action Loaded
[ 10.842021] nf_conntrack version 0.5.0 (4096 buckets, 16384 max)
[ 10.853257] fuse init (API version 7.26)
[ 10.861764] IR NEC protocol handler initialized
[ 10.885201] Bridge firewalling registered
[ 10.890547] usbcore: registered new interface driver cdc_acm
[ 10.896285] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[ 10.905905] usbcore: registered new interface driver cdc_wdm
[ 10.916561] hso: drivers/net/usb/hso.c: Option Wireless
[ 10.922070] usbcore: registered new interface driver hso
[ 10.931194] ip_tables: (C) 2000-2006 Netfilter Core Team
[ 10.956965] usbcore: registered new interface driver mt7601u
[ 11.007940] usbcore: registered new interface driver r8152
[ 11.022738] usbcore: registered new interface driver rt73usb
[ 11.032491] usbcore: registered new interface driver rtl8xxxu
[ 11.052086] usbcore: registered new interface driver ums-alauda
[ 11.058919] usbcore: registered new interface driver ums-cypress
[ 11.065993] usbcore: registered new interface driver ums-datafab
[ 11.072978] usbcore: registered new interface driver ums-freecom
[ 11.080127] usbcore: registered new interface driver ums-isd200
[ 11.087122] usbcore: registered new interface driver ums-jumpshot
[ 11.094040] usbcore: registered new interface driver ums-karma
[ 11.100949] usbcore: registered new interface driver ums-sddr09
[ 11.108073] usbcore: registered new interface driver ums-sddr55
[ 11.115208] usbcore: registered new interface driver ums-usbat
[ 11.123227] usbcore: registered new interface driver usbhid
[ 11.128979] usbhid: USB HID core driver
[ 11.139036] usbcore: registered new interface driver usbserial
[ 11.145170] usbcore: registered new interface driver usbserial_generic
[ 11.151845] usbserial: USB Serial support registered for generic
[ 11.163447] Driver for 1-wire Dallas network protocol.
[ 11.201629] xt_time: kernel timezone is -0000ice number 2 using ehci-platform
[ 11.214511] usbcore: registered new interface driver ath9k_htc
[ 11.222289] usbcore: registered new interface driver cdc_ether
[ 11.231318] usbcore: registered new interface driver cdc_ncm
[ 11.242278] usbcore: registered new interface driver dm9601
[ 11.249449] usbcore: registered new interface driver huawei_cdc_ncm
[ 11.264594] usbcore: registered new interface driver pl2303
[ 11.270424] usbserial: USB Serial support registered for pl2303
[ 11.280026] PPP generic driver version 2.4.2
[ 11.286351] NET: Registered protocol family 24
[ 11.292399] usbcore: registered new interface driver qmi_wwan
[ 11.300246] usbcore: registered new interface driver rndis_host
[ 11.315810] usbcore: registered new interface driver rt2800usb
[ 11.330416] usbcore: registered new interface driver rtl8192cu
[ 11.337648] usbcore: registered new interface driver sierra
[ 11.343374] usbserial: USB Serial support registered for Sierra USB modem
[ 11.352076] usbcore: rgistered new interface driver sierra_net
[ 11.361486] usbcore: registered new interface driver snd-usb-audio
[ 11.369431] usbcore: registered new interface driver sr9700
[ 11.377355] thermal thermal_zone0: filed to read out thermal zone (-110)
[ 11.392032] usbcore: registered new interface driver uvcvideo
[ 11.397898] USB Video Class driver (1.1.1)
[ 11.405699] usbcore: registered new interface driver cdc_mbim
[ 11.412655] usbcore: registered new interface driver ipw
[ 11.418313] usbserial: USB Serial support registered for IPWireless converter
[ 11.426953] usbcore: registered new interface driver option
[ 11.432725] usbserial: USB Serial support registered for GSM modem (1-port)
[ 11.443870] usbcore: registered new interface driver qcserial
[ 11.449914] usbserial: USB Serial support registered for Qualcomm USB modem
[ 11.457270] kmodloader: done loading kernel modles from /etc/modules.d/*
[ 11.466640] r8152 3-1:1.0 eth1: v1.09.9
[ 15.920061] Unable to handle kernel paging request at virtual address ffff914c
[ 15.927705] pgd = cefbd040
[ 15.930438] [ffff914c] *pgd=80000040007003, *pmd=4fffd003, *pte=00000000
[ 15.937488] Internal error: Oops: 207 [#1] PREEMPT SMP ARM
[ 15.942998] Modules linked in: qcserial pppoe ppp_async option ipw cdc_mbim w1_therm w1_gpio uvcvideo usb_wwan sun8i_ths sun4i_gpadc_iio sr9700 snd_usb_audio sierra_net sierra rtl8192cu rtl8192c_common rtl_usb rt2800usb rt2800lib rndis_host qmi_wwan pppox ppp_generic pl2303 nf_conntrack_ipv6 mmc_spi iptable_nat ipt_REJECT ipt_MASQUERADE huawei_cdc_ncm dm9601 cpufreq_dt cdc_ncm cdc_ether ath9k_htc ath9k_common xt_time xt_tcpudp xt_tcpmss xt_statistic xt_state xt_recent xt_nat xt_multiport xt_mark xt_mac xt_limit xt_length xt_hl xt_helper xt_ecn xt_dscp xt_conntrack xt_connmark xt_connlimit xt_connbytes xt_comment xt_TCPMSS xt_REDIRECT xt_LOG xt_HL xt_FLOWOFFLOAD xt_DSCP xt_CT xt_CLASSIFY wire videobuf2_v4l2 usbserial usbnet usbhid ums_usbat ums_sddr55 ums_sddr09 ums_karma ums_jumpshot ums_isd200 ums_freecom
[ 16.014595] ums_datafab ums_cypress ums_alauda thermal_sys snd_usbmidi_lib slhc rtlwifi rtl8xxxu rtc_ds1307 rt73usb rt2x00usb rt2x00lib rotary_encoder regmap_i2c r8152 pwm_sun4i of_mmc_spi nf_reject_ipv4 nf_nat_redirect nf_nat_masquerade_ipv4 nf_conntrack_ipv4 nf_nat_ipv4 nf_nat nf_log_ipv4 nf_flow_table_hw nf_flow_table nf_defrag_ipv6 nf_defrag_ipv4 nf_conntrack_rtcache mt7601u mac80211 iptable_raw iptable_mangle iptable_filter ipt_ECN ip_tables i2c_mv64xxx hso hid_generic crc7 crc_itu_t crc_ccitt cdc_wdm cdc_acm br_netfilter ath9k_hw ath sunxi_cir ir_nec_decoder rc_core fuse sch_cake nf_conntrack sch_teql sch_sfq sch_red sch_prio sch_pie sch_multiq sch_gred sch_fq sch_dsmark sch_codel em_text em_nbyte em_meta em_cmp act_simple act_police act_pedit act_ipt act_gact act_csum libcrc32c sch_tbf sch_ingress
[ 16.086171] sch_htb sch_hfsc em_u32 cls_u32 cls_tcindex cls_route cls_matchall cls_fw cls_flow cls_basic act_skbedit act_mirred sun8i_codec_analog videobuf2_vmalloc videobuf2_memops videobuf2_core sun4i_codec hid v4l2_common videodev evdev i2c_gpio i2c_algo_bit i2c_dev i2c_core 8189es cfg80211 compat rtc_sunxi xt_set ip_set_list_set ip_set_hash_netportnet ip_set_hash_netport ip_set_hash_netnet ip_set_hash_netiface ip_set_hash_net ip_set_hash_mac ip_set_hash_ipportnet ip_set_hash_ipportip ip_set_hash_ipport ip_set_hash_ipmark ip_set_hash_ip ip_set_bitmap_port ip_set_bitmap_ipmac ip_set_bitmap_ip ip_set nfnetlink nf_log_ipv6 nf_log_common ip6table_mangle ip6table_filter ip6_tables ip6t_REJECT x_tables nf_reject_ipv6 ifb tun snd_rawmidi snd_seq_device snd_pcm_oss snd_mixer_oss snd_hwdep ntfs nls_utf8
[ 16.157146] dma_shared_buffer gpio_keys
[ 16.161095] CPU: 3 PID: 2447 Comm: netifd Not tainted 4.14.171 #0
[ 16.167189] Hardware name: Allwinner sun8i Family
[ 16.171897] task: cf32de80 task.stack: cdce4000
[ 16.176493] PC is at brnf_device_event+0x60/0x20c [br_netfilter]
[ 16.182515] LR is at brnf_device_event+0x5c/0x20c [br_netfilter]
[ 16.188522] pc : [<bf59b340>] lr : [<bf59b33c>] psr: 20000013
[ 16.194790] sp : cdce5e50 ip : cf32de80 fp : 00000000
[ 16.200016] r10: 00000000 r9 : 00000000 r8 : 00000005
[ 16.205242] r7 : cdce5e90 r6 : 00000000 r5 : 0000000e r4 : c0c50c80
[ 16.211770] r3 : ffff9114 r2 : cf32de80 r1 : 00000005 r0 : 00000001
[ 16.218300] Flags: nzCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment none
[ 16.225437] Control: 30c5387d Table: 4efbd040 DAC: b8d65a60
[ 16.231185] Process netifd (pid: 2447, stack limit = 0xcdce4210)
[ 16.237192] Stack: (0xcdce5e50 to 0xcdce6000)
[ 16.241554] 5e40: bf66b000 ffffffea 00000000 c02568e8
[ 16.249737] 5e60: ce83b000 c0c50c80 00000000 ce83b010 10000001 c0256a20 00000000 c0c50c80
[ 16.257919] 5e80: 00000000 c06474a0 ce83b000 c030c3e4 ce83b000 00000000 00000001 ce83b000
[ 16.266102] 5ea0: 000089a0 c0c50c80 b6ef6a48 b6ef6a48 cdce4000 00000036 0003dcf8 c0647594
[ 16.274285] 5ec0: ce83b000 c071610c 00000001 00000001 00000010 c0c03c54 000089a0 c0717bf0
[ 16.282467] 5ee0: 00000000 c036b24c 00000001 6c2d7262 00006e61 00000000 00000000 00040eab
[ 16.290649] 5f00: 00000008 000089a0 b6ef6a48 c0c966d0 000089a0 b6ef6a48 cdce4000 c0627ab4
[ 16.298832] 5f20: b6ef6a48 cf60ac20 ceccad80 c0325db0 cdca9000 be849af4 00000000 cf60ad80
[ 16.307014] 5f40: 00000129 c0222864 cdce4000 00000129 be849b40 c0628ce0 00000000 00000000
[ 16.315196] 5f60: 00000000 00000024 cdce5eac 0000000c ceccad80 ceccad80 0000008 000089a0
[ 16.323379] 5f80: b6ef6a48 cdce4000 00000036 c0325e54 b6ef6b58 b6ef6a48 b6ef6a10 00000036
[ 16.331562] 5fa0: c0222864 c0222660 b6ef6b58 b6ef6a48 00000008 000089a0 b6ef6a48 be849ae8
[ 16.339744] 5fc0: b6ef6b58 b6ef6a48 b6ef6a10 00000036 be849c08 b6f724a0 b6f72614 0003dcf8
[ 16.347926] 5fe0: 0003cd54 be849ad0 00023e74 b6f24f0c 60000010 00000008 00000000 00000000
[ 16.356212] [<bf59b340>] (brnf_device_event [br_netfilter]) from [<c02568e8>] (notifier_call_chain+0x2c/0x6c)
[ 16.366140] [<c02568e8>] (notifier_call_chain) from [<c0256a20>] (raw_notifier_call_chain+0x18/0x20)
[ 16.375282] [<c0256a20>] (raw_notifier_call_chain) from [<c06474a0>] (register_netdevice+0x52c/0x60c)
[ 16.384509] [<c06474a0>] (register_netdevice) from [<c0647594>] (register_netdev+0x14/0x24)
[ 16.392869] [<c0647594>] (register_netdev) from [<c071610c>] (br_add_bridge+0x40/0x64)
[ 16.400795] [<c071610c>] (br_add_bridge) from [<c0717bf0>] (br_ioctl_deviceless_stub+0x260/0x2fc)
[ 16.409679] [<c0717bf0>] (br_ioctl_deviceless_stub) from [<c0627ab4>] (sock_ioctl+0x160/0x2c8)
[ 16.418301] [<c0627ab4>] (sock_ioctl) from [<c0325db0>] (do_vfs_ioctl+0x750/0x7c0)
[ 16.425879] [<c0325db0>] (do_vfs_ioctl) from [<c0325e54>] (SyS_ioctl+0x34/0x58)
[ 16.433197] [<c0325e54>] (SyS_ioctl) from [<c0222660>] (ret_fast_syscall+0x0/0x4c)
[ 16.440775] Code: e34c40c5 e5935004 eb339fb4 e5943adc (e7935105)
[ 16.450331] ---[ end trace 1391b07b372e00d3 ]---
[ 16.455031] Kernel panic - not syncing: Fatal exception
[ 16.460303] CPU2: stopping
[ 16.463030] CPU: 2 PID: 2654 Comm: sh Tainted: G D 4.14.171 #0
[ 16.469992] Hardware name: Allwinner sun8i Family
[ 16.474725] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 16.482482] [<c0225790>] (show_stack) from [<c07303a0>] (dump_stack+0x94/0xa8)
[ 16.489717] [<c07303a0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 16.497036] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 16.504614] [<c0201530>] (gic_handle_irq) from [<c0226338>] (__irq_svc+0x58/0x8c)
[ 16.512098] Exception stack(0xcdff5e30 to 0xcdff5e78)
[ 16.517153] 5e20: c0c07d1c 00000003 cdff6000 c02029c4
[ 16.525335] 5e40: cdff6000 fffffffe 00000000 cdff6000 00000003 00000011 00000000 00000000
[ 16.533516] 5e60: 00000000 cdff5e80 c02568e8 c0202b28 60000013 ffffffff
[ 16.540138] [<c0226338>] (__irq_svc) from [<c0202b28>] (vfp_notifier+0x164/0x198)
[ 16.547631] [<c0202b28>] (vfp_notifier) from [<c02568e8>] (notifier_call_chain+0x2c/0x6c)
[ 16.555817] [<c02568e8>] (notifier_call_chain) from [<c0256b1c>] (atomic_notifier_call_chain+0x34/0x48)
[ 16.565218] [<c0256b1c>] (atomic_notifier_call_chain) from [<c0223394>] (copy_thread+0xbc/0xc8)
[ 16.573925] [<c0223394>] (copy_thread) from [<c02389f0>] (copy_process.part.2+0xd3c/0x14c4)
[ 16.582285] [<c02389f0>] (copy_process.part.2) from [<c02392d4>] (_do_fork+0xbc/0x348)
[ 16.590208] [<c02392d4>] (_do_fork) from [<c02395d8>] (sys_fork+0x24/0x2c)
[ 16.597088] [<c02395d8>] (sys_fork) from [<c0222660>] (ret_fast_syscall+0x0/0x4c)
[ 16.604575] CPU0: stopping
[ 16.607293] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.14.171 #0
[ 16.614604] Hardware name: Allwinner sun8i Family
[ 16.619319] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 16.627071] [<c0225790>] (show_stack) from [<c07303a0>] (dump_stack+0x94/0xa8)
[ 16.634303] [<c07303a0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 16.641621] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 16.649199] [<c0201530>] (gic_handle_irq) from [<c0226338>] (__irq_svc+0x58/0x8c)
[ 16.656683] Exception stack(0xc0c01f48 to 0xc0c01f90)
[ 16.661738] 1f40: 00000000 000f7798 0f335000 c022f000 ffffe000 c0c03cc4
[ 16.669921] 1f60: c0c03c78 ffffffff c0c5d240 00000001 cffe7c40 c0a32a28 c0c01f90 c0c01f98
[ 16.678102] 1f80: c0223028 c022302c 60000013 ffffffff
[ 16.683160] [<c0226338>] (__irq_svc) from [<c022302c>] (arch_cpu_idle+0x34/0x38)
[ 16.690566] [<c022302c>] (arch_cpu_idle) from [<c026eff4>] (do_idle+0xb0/0x124)
[ 16.697883] [<c026eff4>] (do_idle) from [<c026f2e4>] (cpu_startup_entry+0x18/0x1c)
[ 16.705462] [<c026f2e4>] (cpu_startup_entry) from [<c0a00ca8>] (start_kernel+0x3ac/0x3b8)
[ 16.713645] CPU1: stopping
[ 16.716362] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.14.171 #0
[ 16.723672] Hardware name: Allwinner sun8i Family
[ 16.728385] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 16.736138] [<c0225790>] (show_stack) from [<c07303a0>] (dump_stack+0x94/0xa8)
[ 16.743370] [<c07303a0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 16.750687] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 16.758264] [<c0201530>] (gic_handle_irq) from [<c0226338>] (__irq_svc+0x58/0x8c)
[ 16.765749] Exception stack(0xcf86bf88 to 0xcf86bfd0)
[ 16.770805] bf80: 00000000 0000c0b4 0f344000 c022f000 ffffe000 c0c03cc4
[ 16.778988] bfa0: c0c03c78 c0c5d688 40007000 410fc075 00000000 00000000 cf86bfd0 cf86bfd8
[ 16.787168] bfc0: c0223028 c022302c 60000013 ffffffff
[ 16.792226] [<c0226338>] (__irq_svc) from [<c022302c>] (arch_cpu_idle+0x34/0x38)
[ 16.799630] [<c022302c>] (arch_cpu_idle) from [<c026eff4>] (do_idle+0xb0/0x124)
[ 16.806948] [<c026eff4>] (do_idle) from [<c026f2e4>] (cpu_startup_entry+0x18/0x1c)
[ 16.814525] [<c026f2e4>] (cpu_startup_entry) from [<4020180c>] (0x4020180c)
[ 16.821496] Rebooting in 3 seconds..
Likely caused by incompatible builds of kernel and modules: The sysupgrade was custom built and the br-netfilter modules from official build. Try use your own build of br-netfilter instead of the one from downloads.openwrt.org
Thank you for your advice, but i also compiled that package myself and i used my own compiled package this SPI flash boot supported custom build's kernel version is 4.14.171-535eed4f80504ac42a471e66815b485e so that i cannot installed via openwrt's repository shown above.
Is it possible that the br_netfilter was enabled, built, installed only later after the sysupgrade image was made? In other words, are they product of the same build
Something is wrong in brnf_device_event of br_netfilter module. Likely the issue could be triggered on first creation of bridge device, e.g. ip link add br0 type bridge
No problem,
Yes they are product of same build
I used make menuconfig
and make -j 8
you are right , issue triggered on creation of bridged interfaces device
config interface 'lan'
option type 'bridge'
option ifname 'eth0 eth1'
option proto 'dhcp'
Change to the linux build directory, mine with x86/64 is at build_dir/target-x86_64_musl/linux-x86_64/linux-5.4.85
Edit brnf_device_event function in net/bridge/br_netfilter_hooks.c. Below is an example
--- net/bridge/br_netfilter_hooks.c.orig 2020-12-23 18:54:11.271933952 +0800
+++ net/bridge/br_netfilter_hooks.c 2020-12-23 18:55:15.283885707 +0800
@@ -965,17 +965,22 @@ static int brnf_device_event(struct noti
struct net *net;
int ret;
+ printk(KERN_NOTICE "## 1\n");
if (event != NETDEV_REGISTER || !(dev->priv_flags & IFF_EBRIDGE))
return NOTIFY_DONE;
ASSERT_RTNL();
+ printk(KERN_NOTICE "## 2\n");
net = dev_net(dev);
brnet = net_generic(net, brnf_net_id);
+ printk(KERN_NOTICE "## 3\n");
if (brnet->enabled)
return NOTIFY_OK;
+ printk(KERN_NOTICE "## 4\n");
ret = nf_register_net_hooks(net, br_nf_ops, ARRAY_SIZE(br_nf_ops));
+ printk(KERN_NOTICE "## 5\n");
if (ret)
return NOTIFY_BAD;
Recompile with make target/linux/compile V=s. You should see the file got recompiled. At the linux build dir, you should find newly built net/bridge/br_netfilter.ko
Transfer that file to your box. rmmod existing module and insmod the newly built one
Thank you @yousong
Here is what i did. When i tried to rmmod br_netfilter but no luck it goes to kernel panic again .
Then i removed kmod-br-netfilter after that
I tried to install compiled packgage modprobe br_netfilter.ko
unfortunately it returned this: failed to find a module named br_netfilter
here is the dump..
## I stopped firewall to obtain SSH access
root@orangepi-r1:~# /etc/init.d/firewall stop
Warning: Unable to locate ipset utility, disabling ipset support
Warning: Section @zone[0] (lan) cannot resolve device of network 'lan'
Warning: Section @zone[1] (wan) cannot resolve device of network 'wan6'
Warning: Section @zone[0] (lan) has no device, network, subnet or extra options
* Flushing IPv4 filter table
* Flushing IPv4 nat table
* Flushing IPv4 mangle table
* Flushing conntrack table ...
root@orangepi-r1:~# ls
kmod-br-netfilter_4.14.171-1_arm_cortex-a7_neon-vfpv4.ipk
root@orangepi-r1:~# opkg install kmod-br-netfilter_4.14.171-1_arm_cortex-a7_neon
-vfpv4.ipk
Installing kmod-br-netfilter (4.14.171-1) to root...
Configuring kmod-br-netfilter.
[13685.356909] kmodloader: loading kernel modules from /etc/modules.d/*
[13685.365879] Bridge firewalling registered
[13685.370038] kmodloader: done loading kernel modules from /etc/modules.d/*
root@orangepi-r1:~# rmmod br_netfilter
*****
*****
[ 151.581347] Control: 30c5387d Table: 4f02c400 DAC: b8d45a60
[ 151.587093] Process rmmod (pid: 1570, stack limit = 0xce8ac210)
[ 151.593013] Stack: (0xce8adf10 to 0xce8ae000)
[ 151.597373] df00: c0c50080 ce8adf30 bf074124 c0637924
[ 151.605557] df20: bf074124 bf074124 b6f2ed00 c0637aec c0c500a8 c0c500a8 c0c50788 c0637b54
[ 151.613740] df40: bf074108 bf074180 b6f2ed00 bf072f94 c0c03c54 c02a58b0 6e5f7262 69667465
[ 151.621922] df60: 7265746c 00000000 00000000 cf01e82c cf9aef00 cf01e3c0 00000000 c0253e34
[ 151.630105] df80: ffffe000 c0222864 ce8adfb0 00000006 00222864 00040eab b6f86c48 1fbe3c7e
[ 151.638287] dfa0: bef83ea4 c0222660 b6f86c48 1fbe3c7e b6f2ed00 00000000 00000000 00000000
[ 151.646470] dfc0: b6f86c48 1fbe3c7e bef83ea4 00000081 00000001 00000000 00000020 00000000
[ 151.654653] dfe0: bef83dbc bef83da0 00010fbc b6f5dbe8 a0000010 b6f2ed00 00000000 00000000
[ 151.662876] unwind: Index not found bf072f34
[ 151.667154] Code: e1a05000 e5934004 eb4840b7 e59536b8 (e7934104)
[ 151.673302] ---[ end trace 72506bd92e4ff9b9 ]---
[ 151.677951] Kernel panic - not syncing: Fatal exception
[ 151.683185] CPU1: stopping
[ 151.685903] CPU: 1 PID: 0 Comm: swapper/1 Tainted: G D 4.14.171 #0
[ 151.693213] Hardware name: Allwinner sun8i Family
[ 151.697939] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 151.705694] [<c0225790>] (show_stack) from [<c06f0ac0>] (dump_stack+0x94/0xa8)
[ 151.712928] [<c06f0ac0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 151.720248] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 151.727826] [<c0201530>] (gic_handle_irq) from [<c0226338>] (__irq_svc+0x58/0x8c)
[ 151.735311] Exception stack(0xcf86bf88 to 0xcf86bfd0)
[ 151.740367] bf80: 00000000 0000b394 0f347000 c022f000 ffffe000 c0c03cc4
[ 151.748549] bfa0: c0c03c78 c0c5b508 40007000 410fc075 00000000 00000000 cf86bfd0 cf86bfd8
[ 151.756729] bfc0: c0223028 c022302c 60000013 ffffffff
[ 151.761789] [<c0226338>] (__irq_svc) from [<c022302c>] (arch_cpu_idle+0x34/0x38)
[ 151.769195] [<c022302c>] (arch_cpu_idle) from [<c026eff4>] (do_idle+0xb0/0x124)
[ 151.776514] [<c026eff4>] (do_idle) from [<c026f2e4>] (cpu_startup_entry+0x18/0x1c)
[ 151.784091] [<c026f2e4>] (cpu_startup_entry) from [<4020180c>] (0x4020180c)
[ 151.791055] CPU0: stopping
[ 151.793772] CPU: 0 PID: 0 Comm: swapper/0 Tainted: G D 4.14.171 #0
[ 151.801082] Hardware name: Allwinner sun8i Family
[ 151.805797] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 151.813548] [<c0225790>] (show_stack) from [<c06f0ac0>] (dump_stack+0x94/0xa8)
[ 151.820780] [<c06f0ac0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 151.828096] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 151.835673] [<c0201530>] (gic_handle_irq) from [<c0226338>] (__irq_svc+0x58/0x8c)
[ 151.843158] Exception stack(0xc0c01f48 to 0xc0c01f90)
[ 151.848213] 1f40: 00000000 0007000c 0f338000 c022f000 ffffe000 c0c03cc4
[ 151.856397] 1f60: c0c03c78 ffffffff c0c5b0c0 00000001 cffe7c40 c0a2fa28 c0c01f90 c0c01f98
[ 151.864577] 1f80: c0223028 c022302c 60000013 ffffffff
[ 151.869636] [<c0226338>] (__irq_svc) from [<c022302c>] (arch_cpu_idle+0x34/0x38)
[ 151.877040] [<c022302c>] (arch_cpu_idle) from [<c026eff4>] (do_idle+0xb0/0x124)
[ 151.884356] [<c026eff4>] (do_idle) from [<c026f2e4>] (cpu_startup_entry+0x18/0x1c)
[ 151.891937] [<c026f2e4>] (cpu_startup_entry) from [<c0a00ca8>] (start_kernel+0x3ac/0x3b8)
[ 151.900119] CPU2: stopping
[ 151.902836] CPU: 2 PID: 0 Comm: swapper/2 Tainted: G D 4.14.171 #0
[ 151.910146] Hardware name: Allwinner sun8i Family
[ 151.914859] [<c0228f74>] (unwind_backtrace) from [<c0225790>] (show_stack+0x10/0x14)
[ 151.922610] [<c0225790>] (show_stack) from [<c06f0ac0>] (dump_stack+0x94/0xa8)
[ 151.929841] [<c06f0ac0>] (dump_stack) from [<c0227db8>] (handle_IPI+0xdc/0x17c)
[ 151.937157] [<c0227db8>] (handle_IPI) from [<c0201530>] (gic_handle_irq+0x8c/0x90)
[ 151.944734] [<c0201530>] (gi
*****
*****
root@orangepi-r1:~# opkg remove kmod-br-netfilter
root@orangepi-r1:~# Removing package kmod-br-netfilter from root...
root@orangepi-r1:~# restart
root@orangepi-r1:~# ls
br_netfilter.ko
kmod-br-netfilter_4.14.171-1_arm_cortex-a7_neon-vfpv4.ipk
root@orangepi-r1:~# modprobe br_netfilter.ko
failed to find a module named br_netfilter
Add more printks before ##3 to find out which pointer is invalid.
If the above is too cumbersome to continue, I would suggest a clean build with kmod-br-netfilter builtin in the image. I got the feeling that likely one way or another the issue was caused by inconsistencies between kernel and kmod
struct net *net;
int ret;
printk(KERN_NOTICE "## 1\n");
if (event != NETDEV_REGISTER || !(dev->priv_flags & IFF_EBRIDGE))
printk(KERN_NOTICE "## 1.1\n");
return NOTIFY_DONE;
ASSERT_RTNL();
printk(KERN_NOTICE "## 2\n");
net = dev_net(dev);
printk(KERN_NOTICE "## 2.1\n");
brnet = net_generic(net, brnf_net_id);
printk(KERN_NOTICE "## 3\n");
if (brnet->enabled)
return NOTIFY_OK;
printk(KERN_NOTICE "## 4\n");
ret = nf_register_net_hooks(net, br_nf_ops, ARRAY_SIZE(br_nf_ops));
printk(KERN_NOTICE "## 5\n");
if (ret)
return NOTIFY_BAD;
a weird thing happened for this time you can see from the shown below dumps . I installed new br_netfilter.ko and activated bridged interfaces but no kernel panic occured. After that when i give an ip to bridge it causes kernel panic i didn't understand what happening here. so i will try to clean build. Do you mean should I compile that kmod package within sysupgrade image ? i will try
That will cause the function to return early with NOTIFY_DONE. "if" statement without curly braces only attracts the first statement that follows. So it should be something like the following
@yousong thank you for all
i have solved the problem
i followed your advice and made clean build and select packages above from menuconfig
then there is no kernel panic when i activate the bridge now it takes IP from dhcp and no Kernel Panic
I am going to try filtering traffic between two bridges interfaces then i can see stability..
i am very appreciated to you i learned a lot of things like debugging