Re: [B.A.T.M.A.N.] Problem openWRT "backfire" and "kmod-batman-adv"
by Tim Glaremin
Hello,
I compiled an new image with symbols included, here is what demsg returned:
"root@OpenWrt:/# dmesg
Linux version 2.6.32.16 (tim@atze) (gcc version 4.3.3 (GCC) ) #1 Thu Aug
12 14:49:00 CEST 2010
CPU revision is: 00029008 (Broadcom BCM3302)
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0E, vendor 0x4243)
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x09, vendor 0x4243)
ssb: Core 2 found: MIPS 3302 (cc 0x816, rev 0x06, vendor 0x4243)
ssb: Core 3 found: USB 1.1 Host (cc 0x817, rev 0x02, vendor 0x4243)
ssb: Core 4 found: MEMC SDRAM (cc 0x80F, rev 0x01, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
ssb: Core 6 found: Roboswitch (cc 0x81C, rev 0x02, vendor 0x4243)
ssb: Initializing MIPS core...
ssb: set_irq: core 0x0806, irq 4 => 4
ssb: set_irq: core 0x0816, irq 5 => 2
ssb: set_irq: core 0x0812, irq 2 => 5
ssb: after irq reconfiguration
ssb: core 0x0800, irq : 2(S) 3* 4 5 6 D I
ssb: core 0x0806, irq : 2(S) 3 4* 5 6 D I
ssb: core 0x0816, irq : 2(S)* 3 4 5 6 D I
ssb: core 0x0817, irq : 2(S) 3 4 5 6* D I
ssb: core 0x080f, irq : 2(S) 3 4 5 6 D I*
ssb: core 0x0812, irq : 2(S) 3 4 5* 6 D I
ssb: core 0x081c, irq : 2(S) 3 4 5 6 D I*
ssb: Sonics Silicon Backplane found at address 0x18000000
Serial init done.
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 802a5b50, node_mem_map 802eb000
Normal zone: 32 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 4064 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2
noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 13236k/16384k available (2231k kernel code, 3148k reserved, 476k
data, 136k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:128
console [ttyS0] enabled
Calibrating delay loop... 199.16 BogoMIPS (lpj=398336)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 25
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
Amd/Fujitsu Extended Query Table at 0x0040
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Updating TRX offsets and length:
old trx = [0x0000001c, 0x00000974, 0x000e2c00], len=0x00281000
crc32=0x00d3dbd9
new trx = [0x0000001c, 0x00000974, 0x000e2c00], len=0x000e2c00
crc32=0xbdc7b0c6
Done
Creating 4 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000003f0000 : "linux"
0x000000122c00-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary
or be smaller than an erase block -- forcing read-only
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2A0000, len=150000
0x0000002a0000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:25:9c:3c:46:04
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb(a)candelatech.com>
All bugs added by David S. Miller <davem(a)redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 136k freed
Please be patient, while OpenWrt loads ...
diag: Detected 'Linksys WRT54G/GS/GL'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found a 5325! It's a 5350.
mini_fo: using base directory: /
mini_fo: using storage directory: /tmp/root
b44: eth0: powering down PHY
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
device eth0.0 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.0) entering forwarding state
Compat-wireless backport release: compat-wireless-2010-07-13-4-g04898a5
Backport based on wireless-2.6.git v2.6.35-rc6-48432-gdce358e
cfg80211: Calling CRDA to update world regulatory domain
cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
b43-phy0: Broadcom 5352 WLAN found (core revision 9)
phy0: Selected rate control algorithm 'minstrel'
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
Registered led device: b43-phy0::radio
Broadcom 43xx driver loaded [ Features: PL, Firmware-ID: FW13 ]
Broadcom 43xx-legacy driver loaded [ Features: PLID, Firmware-ID: FW10 ]
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (208 buckets, 832 max)
batman-adv:B.A.T.M.A.N. advanced 2010.0.0 (compatibility version 8) loaded
batman-adv:Adding interface: wlan0
batman-adv:Not using interface wlan0 (retrying later): interface not active
jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
br-lan: port 1(eth0.0) entering disabled state
device eth0 left promiscuous mode
device eth0.0 left promiscuous mode
br-lan: port 1(eth0.0) entering disabled state
device eth0.0 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.0) entering forwarding state
batman-adv:Removing interface: wlan0
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
CPU 0 Unable to handle kernel paging request at virtual address
00003aa1, epc == 805882f4, ra == 805882dc
Oops[#1]:
Cpu 0
$ 0 : 00000000 10009800 3c9c2500 80dca000
$ 4 : 80362b88 00003a9e 00003a98 00000000
$ 8 : 00000004 00000001 8029fd20 00000001
$12 : 0000000f 8023a728 ffffffff 80da5bc8
$16 : 80e9de80 80dca000 8058c334 80547ec0
$20 : 00000008 7ff5e300 7ff5e250 00000001
$24 : 0000003c 8f1bbcdc
$28 : 80da4000 80da5d58 00475028 805882dc
Hi : 00000000
Lo : 00000000
epc : 805882f4 update_min_mtu+0x2d8/0x4d8 [batman_adv]
Not tainted
ra : 805882dc update_min_mtu+0x2c0/0x4d8 [batman_adv]
Status: 10009803 KERNEL EXL IE
Cause : 0080000c
BadVA : 00003aa1
PrId : 00029008 (Broadcom BCM3302)
Modules linked in: batman_adv nf_nat_tftp nf_conntrack_tftp nf_nat_irc
nf_conntrack_irc nf_nat_ftp nf_conntrack_ftp ipt_MASQUERADE iptable_nat
nf_nat xt_NOTRACK iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4
nf_conntrack pppoe pppox ipt_REJECT xt_TCPMSS ipt_LOG xt_comment
xt_multiport xt_mac xt_limit iptable_mangle iptable_filter ip_tables
xt_tcpudp x_tables ppp_async ppp_generic slhc b43legacy b43 mac80211
crc_ccitt cfg80211 compat_firmware_class compat arc4 aes_generic deflate
ecb cbc switch_robo switch_core diag
Process hostapd (pid: 1372, threadinfo=80da4000, task=80763650,
tls=00000000)
Stack : 80e9de80 80dca000 8058c334 80547ec0 80e9de80 80588a5c 8037d2a8
fffffff2
00000000 80dca000 00000000 fffffff0 00000000 80dca000 00000008
8004343c
00000000 80dca000 00000000 801a545c 00000000 80dca000 7ff5e270
00000000
80da5e18 800435d8 00000000 7ff5e270 00008914 00000000 00000000
ffffffed
80dca000 801a93c4 802e6c90 801aa3ec 00000000 0000001d 00008924
00008924
...
Call Trace:
[<805882f4>] update_min_mtu+0x2d8/0x4d8 [batman_adv]
[<805882dc>] update_min_mtu+0x2c0/0x4d8 [batman_adv]
Code: 24c50006 88820003 98820000 <a8a20003> b8a20000 90830004
a0a30004 90820005 a0a20005
Disabling lock debugging due to kernel taint"
An the return of logread:
"root@OpenWrt:/# logread
Jan 1 00:00:16 OpenWrt user.debug kernel: Normal zone: 32 pages used
for memmap
Jan 1 00:00:16 OpenWrt user.debug kernel: Normal zone: 0 pages reserved
Jan 1 00:00:16 OpenWrt user.debug kernel: Normal zone: 4064 pages,
LIFO batch:0
Jan 1 00:00:16 OpenWrt user.warn kernel: Built 1 zonelists in Zone
order, mobility grouping off. Total pages: 4064
Jan 1 00:00:16 OpenWrt user.notice kernel: Kernel command line:
root=/dev/mtdblock2 rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200
Jan 1 00:00:16 OpenWrt user.info kernel: PID hash table entries: 64
(order: -4, 256 bytes)
Jan 1 00:00:16 OpenWrt user.info kernel: Dentry cache hash table
entries: 2048 (order: 1, 8192 bytes)
Jan 1 00:00:16 OpenWrt user.info kernel: Inode-cache hash table
entries: 1024 (order: 0, 4096 bytes)
Jan 1 00:00:16 OpenWrt user.warn kernel: Primary instruction cache
16kB, VIPT, 2-way, linesize 16 bytes.
Jan 1 00:00:16 OpenWrt user.warn kernel: Primary data cache 8kB, 2-way,
VIPT, no aliases, linesize 16 bytes
Jan 1 00:00:17 OpenWrt user.info kernel: Memory: 13236k/16384k
available (2231k kernel code, 3148k reserved, 476k data, 136k init, 0k
highmem)
Jan 1 00:00:17 OpenWrt user.info kernel: Hierarchical RCU implementation.
Jan 1 00:00:17 OpenWrt user.info kernel: NR_IRQS:128
Jan 1 00:00:17 OpenWrt user.info kernel: console [ttyS0] enabled
Jan 1 00:00:17 OpenWrt user.info kernel: Calibrating delay loop...
199.16 BogoMIPS (lpj=398336)
Jan 1 00:00:17 OpenWrt user.warn kernel: Mount-cache hash table
entries: 512
Jan 1 00:00:17 OpenWrt user.info kernel: NET: Registered protocol family 16
Jan 1 00:00:17 OpenWrt user.warn kernel: bio: create slab <bio-0> at 0
Jan 1 00:00:17 OpenWrt user.info kernel: Switching to clocksource MIPS
Jan 1 00:00:17 OpenWrt user.info kernel: NET: Registered protocol family 2
Jan 1 00:00:17 OpenWrt user.info kernel: IP route cache hash table
entries: 1024 (order: 0, 4096 bytes)
Jan 1 00:00:17 OpenWrt user.info kernel: TCP established hash table
entries: 512 (order: 0, 4096 bytes)
Jan 1 00:00:17 OpenWrt user.info kernel: TCP bind hash table entries:
512 (order: -1, 2048 bytes)
Jan 1 00:00:17 OpenWrt user.info kernel: TCP: Hash tables configured
(established 512 bind 512)
Jan 1 00:00:17 OpenWrt user.info kernel: TCP reno registered
Jan 1 00:00:17 OpenWrt user.info kernel: NET: Registered protocol family 1
Jan 1 00:00:17 OpenWrt user.info kernel: squashfs: version 4.0
(2009/01/31) Phillip Lougher
Jan 1 00:00:17 OpenWrt user.warn kernel: Registering mini_fo version $Id$
Jan 1 00:00:17 OpenWrt user.info kernel: JFFS2 version 2.2. (NAND)
(SUMMARY) © 2001-2006 Red Hat, Inc.
Jan 1 00:00:17 OpenWrt user.info kernel: msgmni has been set to 25
Jan 1 00:00:17 OpenWrt user.info kernel: io scheduler noop registered
Jan 1 00:00:17 OpenWrt user.info kernel: io scheduler deadline
registered (default)
Jan 1 00:00:17 OpenWrt user.info kernel: Serial: 8250/16550 driver, 2
ports, IRQ sharing enabled
Jan 1 00:00:17 OpenWrt user.info kernel: serial8250: ttyS0 at MMIO
0xb8000300 (irq = 3) is a 16550A
Jan 1 00:00:17 OpenWrt user.info kernel: serial8250: ttyS1 at MMIO
0xb8000400 (irq = 3) is a 16550A
Jan 1 00:00:17 OpenWrt user.info kernel: serial8250.0: ttyS0 at MMIO
0xb8000300 (irq = 3) is a 16550A
Jan 1 00:00:17 OpenWrt user.info kernel: serial8250.0: ttyS1 at MMIO
0xb8000400 (irq = 3) is a 16550A
Jan 1 00:00:17 OpenWrt user.warn kernel: flash init: 0x1c000000 0x02000000
Jan 1 00:00:17 OpenWrt user.info kernel: Physically mapped flash: Found
1 x16 devices at 0x0 in 16-bit bank
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x400000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x800000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0xc00000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x1000000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x1400000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x1800000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.debug kernel: Physically mapped flash:
Found an alias at 0x1c00000 for the chip at 0x0
Jan 1 00:00:17 OpenWrt user.warn kernel: Amd/Fujitsu Extended Query
Table at 0x0040
Jan 1 00:00:17 OpenWrt user.notice kernel: number of CFI chips: 1
Jan 1 00:00:17 OpenWrt user.notice kernel: cfi_cmdset_0002: Disabling
erase-suspend-program due to code brokenness.
Jan 1 00:00:17 OpenWrt user.notice kernel: Flash device: 0x400000 at
0x1fc00000
Jan 1 00:00:17 OpenWrt user.notice kernel: bootloader size: 262144
Jan 1 00:00:17 OpenWrt user.warn kernel: Updating TRX offsets and length:
Jan 1 00:00:17 OpenWrt user.warn kernel: old trx = [0x0000001c,
0x00000974, 0x000e2c00], len=0x00281000 crc32=0x00d3dbd9
Jan 1 00:00:17 OpenWrt user.warn kernel: new trx = [0x0000001c,
0x00000974, 0x000e2c00], len=0x000e2c00 crc32=0xbdc7b0c6
Jan 1 00:00:17 OpenWrt user.warn kernel: Done
Jan 1 00:00:17 OpenWrt user.notice kernel: Creating 4 MTD partitions on
"Physically mapped flash":
Jan 1 00:00:17 OpenWrt user.notice kernel:
0x000000000000-0x000000040000 : "cfe"
Jan 1 00:00:17 OpenWrt user.notice kernel:
0x000000040000-0x0000003f0000 : "linux"
Jan 1 00:00:17 OpenWrt user.notice kernel:
0x000000122c00-0x0000003f0000 : "rootfs"
Jan 1 00:00:17 OpenWrt user.warn kernel: mtd: partition "rootfs" must
either start or end on erase block boundary or be smaller than an erase
block -- forcing read-only
Jan 1 00:00:17 OpenWrt user.notice kernel: mtd: partition "rootfs" set
to be root filesystem
Jan 1 00:00:17 OpenWrt user.info kernel: mtd: partition "rootfs_data"
created automatically, ofs=2A0000, len=150000
Jan 1 00:00:17 OpenWrt user.notice kernel:
0x0000002a0000-0x0000003f0000 : "rootfs_data"
Jan 1 00:00:17 OpenWrt user.notice kernel:
0x0000003f0000-0x000000400000 : "nvram"
Jan 1 00:00:17 OpenWrt user.info kernel: b44.c:v2.0
Jan 1 00:00:17 OpenWrt user.info kernel: eth0: Broadcom 44xx/47xx
10/100BaseT Ethernet 00:25:9c:3c:46:04
Jan 1 00:00:17 OpenWrt user.info kernel: BCM47xx Watchdog Timer enabled
(30 seconds, nowayout)
Jan 1 00:00:17 OpenWrt user.info kernel: TCP westwood registered
Jan 1 00:00:17 OpenWrt user.info kernel: NET: Registered protocol family 17
Jan 1 00:00:17 OpenWrt user.info kernel: 802.1Q VLAN Support v1.8 Ben
Greear <greearb(a)candelatech.com>
Jan 1 00:00:17 OpenWrt user.info kernel: All bugs added by David S.
Miller <davem(a)redhat.com>
Jan 1 00:00:17 OpenWrt user.warn kernel: VFS: Mounted root (squashfs
filesystem) readonly on device 31:2.
Jan 1 00:00:17 OpenWrt user.info kernel: Freeing unused kernel memory:
136k freed
Jan 1 00:00:17 OpenWrt user.warn kernel: Please be patient, while
OpenWrt loads ...
Jan 1 00:00:17 OpenWrt user.warn kernel: diag: Detected 'Linksys
WRT54G/GS/GL'
Jan 1 00:00:17 OpenWrt user.info kernel: b44: eth0: Link is up at 100
Mbps, full duplex.
Jan 1 00:00:17 OpenWrt user.info kernel: b44: eth0: Flow control is off
for TX and off for RX.
Jan 1 00:00:17 OpenWrt user.info kernel: roboswitch: Probing device
eth0: found a 5325! It's a 5350.
Jan 1 00:00:17 OpenWrt user.info kernel: mini_fo: using base directory: /
Jan 1 00:00:17 OpenWrt user.info kernel: mini_fo: using storage
directory: /tmp/root
Jan 1 00:00:17 OpenWrt user.info kernel: b44: eth0: powering down PHY
Jan 1 00:00:19 OpenWrt user.info kernel: b44: eth0: Link is up at 100
Mbps, full duplex.
Jan 1 00:00:19 OpenWrt user.info kernel: b44: eth0: Flow control is off
for TX and off for RX.
Jan 1 00:00:21 OpenWrt user.info kernel: device eth0.0 entered
promiscuous mode
Jan 1 00:00:21 OpenWrt user.info kernel: device eth0 entered
promiscuous mode
Jan 1 00:00:21 OpenWrt user.info kernel: br-lan: port 1(eth0.0)
entering forwarding state
Jan 1 00:00:21 OpenWrt user.info kernel: Compat-wireless backport
release: compat-wireless-2010-07-13-4-g04898a5
Jan 1 00:00:21 OpenWrt user.info kernel: Backport based on
wireless-2.6.git v2.6.35-rc6-48432-gdce358e
Jan 1 00:00:22 OpenWrt user.info kernel: cfg80211: Calling CRDA to
update world regulatory domain
Jan 1 00:00:28 OpenWrt user.info kernel: cfg80211: World regulatory
domain updated:
Jan 1 00:00:28 OpenWrt user.info kernel: (start_freq - end_freq @
bandwidth), (max_antenna_gain, max_eirp)
Jan 1 00:00:28 OpenWrt user.info kernel: (2402000 KHz - 2472000 KHz
@ 40000 KHz), (300 mBi, 2000 mBm)
Jan 1 00:00:28 OpenWrt user.info kernel: (2457000 KHz - 2482000 KHz
@ 20000 KHz), (300 mBi, 2000 mBm)
Jan 1 00:00:28 OpenWrt user.info kernel: (2474000 KHz - 2494000 KHz
@ 20000 KHz), (300 mBi, 2000 mBm)
Jan 1 00:00:28 OpenWrt user.info kernel: (5170000 KHz - 5250000 KHz
@ 40000 KHz), (300 mBi, 2000 mBm)
Jan 1 00:00:28 OpenWrt user.info kernel: (5735000 KHz - 5835000 KHz
@ 40000 KHz), (300 mBi, 2000 mBm)
Jan 1 00:00:28 OpenWrt user.info kernel: b43-phy0: Broadcom 5352 WLAN
found (core revision 9)
Jan 1 00:00:28 OpenWrt user.debug kernel: phy0: Selected rate control
algorithm 'minstrel'
Jan 1 00:00:28 OpenWrt user.info kernel: Registered led device:
b43-phy0::tx
Jan 1 00:00:28 OpenWrt user.info kernel: Registered led device:
b43-phy0::rx
Jan 1 00:00:28 OpenWrt user.info kernel: Registered led device:
b43-phy0::radio
Jan 1 00:00:28 OpenWrt user.info kernel: Broadcom 43xx driver loaded [
Features: PL, Firmware-ID: FW13 ]
Jan 1 00:00:29 OpenWrt user.info kernel: Broadcom 43xx-legacy driver
loaded [ Features: PLID, Firmware-ID: FW10 ]
Jan 1 00:00:29 OpenWrt user.info kernel: PPP generic driver version 2.4.2
Jan 1 00:00:30 OpenWrt user.info kernel: ip_tables: (C) 2000-2006
Netfilter Core Team
Jan 1 00:00:30 OpenWrt user.info kernel: NET: Registered protocol family 24
Jan 1 00:00:31 OpenWrt user.warn kernel: nf_conntrack version 0.5.0
(208 buckets, 832 max)
Jan 1 00:00:32 OpenWrt user.info kernel: batman-adv:B.A.T.M.A.N.
advanced 2010.0.0 (compatibility version 8) loaded
Jan 1 00:00:35 OpenWrt user.info sysinit: Loading defaults
Jan 1 00:00:36 OpenWrt user.info sysinit: Loading synflood protection
Jan 1 00:00:36 OpenWrt user.info sysinit: Adding custom chains
Jan 1 00:00:37 OpenWrt user.info sysinit: Loading zones
Jan 1 00:00:38 OpenWrt user.info sysinit: Loading forwarding
Jan 1 00:00:38 OpenWrt user.info sysinit: Loading redirects
Jan 1 00:00:38 OpenWrt user.info sysinit: Loading rules
Jan 1 00:00:38 OpenWrt user.info sysinit: Loading includes
Jan 1 00:00:38 OpenWrt user.info sysinit: Loading zone defaults
Jan 1 00:00:39 OpenWrt user.notice root: adding lan (br-lan) to
firewall zone lan
Jan 1 00:00:41 OpenWrt user.notice dnsmasq: DNS rebinding protection is
active, will discard upstream RFC1918 responses!
Jan 1 00:00:46 OpenWrt daemon.info dnsmasq[806]: started, version 2.55
cachesize 150
Jan 1 00:00:46 OpenWrt daemon.info dnsmasq[806]: compile time options:
IPv6 GNU-getopt no-DBus no-I18N DHCP TFTP
Jan 1 00:00:46 OpenWrt daemon.info dnsmasq[806]: using local addresses
only for domain lan
Jan 1 00:00:46 OpenWrt daemon.warn dnsmasq[806]: no servers found in
/tmp/resolv.conf.auto, will retry
Jan 1 00:00:46 OpenWrt daemon.info dnsmasq[806]: read /etc/hosts - 1
addresses
Jan 1 00:00:46 OpenWrt user.info kernel: batman-adv:Adding interface: wlan0
Jan 1 00:00:46 OpenWrt user.err kernel: batman-adv:Not using interface
wlan0 (retrying later): interface not active
Jan 1 00:00:47 OpenWrt user.warn kernel: jffs2_scan_eraseblock(): End
of filesystem marker found at 0x0
Jan 1 00:00:47 OpenWrt user.warn kernel: jffs2_build_filesystem():
unlocking the mtd device... done.
Jan 1 00:01:00 OpenWrt user.warn kernel: jffs2_build_filesystem():
erasing all blocks after the end marker... done.
Jan 1 00:01:00 OpenWrt user.info sysinit: copying files ... done
Jan 1 00:01:01 OpenWrt user.info kernel: mini_fo: using base directory: /
Jan 1 00:01:01 OpenWrt user.info kernel: mini_fo: using storage
directory: /overlay
Jan 1 00:01:07 OpenWrt authpriv.info dropbear[877]: Running in background
Jan 1 00:06:33 OpenWrt daemon.warn dnsmasq[806]: failed to access
/tmp/resolv.conf.auto: No such file or directory
Jan 1 00:06:34 OpenWrt user.info kernel: br-lan: port 1(eth0.0)
entering disabled state
Jan 1 00:06:34 OpenWrt user.info kernel: device eth0 left promiscuous mode
Jan 1 00:06:34 OpenWrt user.info kernel: device eth0.0 left promiscuous
mode
Jan 1 00:06:34 OpenWrt user.info kernel: br-lan: port 1(eth0.0)
entering disabled state
Jan 1 00:06:40 OpenWrt user.info kernel: device eth0.0 entered
promiscuous mode
Jan 1 00:06:40 OpenWrt user.info kernel: device eth0 entered
promiscuous mode
Jan 1 00:06:40 OpenWrt user.info kernel: br-lan: port 1(eth0.0)
entering forwarding state
Jan 1 00:06:44 OpenWrt user.info kernel: batman-adv:Removing interface:
wlan0
Jan 1 00:06:48 OpenWrt user.info kernel: b43-phy0: Loading firmware
version 410.2160 (2007-05-26 15:32:10)
Jan 1 00:06:48 OpenWrt user.alert kernel: CPU 0 Unable to handle kernel
paging request at virtual address 00003aa1, epc == 805882f4, ra == 805882dc
Jan 1 00:06:48 OpenWrt user.warn kernel: Oops[#1]:
Jan 1 00:06:48 OpenWrt user.warn kernel: Cpu 0
Jan 1 00:06:48 OpenWrt user.warn kernel: $ 0 : 00000000 10009800
3c9c2500 80dca000
Jan 1 00:06:48 OpenWrt user.warn kernel: $ 4 : 80362b88 00003a9e
00003a98 00000000
Jan 1 00:06:48 OpenWrt user.warn kernel: $ 8 : 00000004 00000001
8029fd20 00000001
Jan 1 00:06:48 OpenWrt user.warn kernel: $12 : 0000000f 8023a728
ffffffff 80da5bc8
Jan 1 00:06:48 OpenWrt user.warn kernel: $16 : 80e9de80 80dca000
8058c334 80547ec0
Jan 1 00:06:48 OpenWrt user.warn kernel: $20 : 00000008 7ff5e300
7ff5e250 00000001
Jan 1 00:06:48 OpenWrt user.warn kernel: $24 : 0000003c 8f1bbcdc
Jan 1 00:06:48 OpenWrt user.warn kernel: $28 : 80da4000 80da5d58
00475028 805882dc
Jan 1 00:06:48 OpenWrt user.warn kernel: Hi : 00000000
Jan 1 00:06:48 OpenWrt user.warn kernel: Lo : 00000000
Jan 1 00:06:48 OpenWrt user.warn kernel: epc : 805882f4
update_min_mtu+0x2d8/0x4d8 [batman_adv]
Jan 1 00:06:48 OpenWrt user.warn kernel: Not tainted
Jan 1 00:06:48 OpenWrt user.warn kernel: ra : 805882dc
update_min_mtu+0x2c0/0x4d8 [batman_adv]
Jan 1 00:06:48 OpenWrt user.warn kernel: Status: 10009803 KERNEL EXL IE
Jan 1 00:06:48 OpenWrt user.warn kernel: Cause : 0080000c
Jan 1 00:06:48 OpenWrt user.warn kernel: BadVA : 00003aa1
Jan 1 00:06:48 OpenWrt user.warn kernel: PrId : 00029008 (Broadcom
BCM3302)
Jan 1 00:06:48 OpenWrt user.warn kernel: Modules linked in: batman_adv
nf_nat_tftp nf_conntrack_tftp nf_nat_irc nf_conntrack_irc nf_nat_ftp
nf_conntrack_ftp ipt_MASQUERADE iptable_nat nf_nat xt_NOTRACK
iptable_raw xt_state nf_conntrack_ipv4 nf_defrag_ipv4 nf_conntrack
Jan 1 00:06:48 OpenWrt user.warn kernel: Process hostapd (pid: 1372,
threadinfo=80da4000, task=80763650, tls=00000000)
Jan 1 00:06:48 OpenWrt user.warn kernel: Stack : 80e9de80 80dca000
8058c334 80547ec0 80e9de80 80588a5c 8037d2a8 fffffff2
Jan 1 00:06:48 OpenWrt user.warn kernel: 00000000 80dca000
00000000 fffffff0 00000000 80dca000 00000008 8004343c
Jan 1 00:06:48 OpenWrt user.warn kernel: 00000000 80dca000
00000000 801a545c 00000000 80dca000 7ff5e270 00000000
Jan 1 00:06:48 OpenWrt user.warn kernel: 80da5e18 800435d8
00000000 7ff5e270 00008914 00000000 00000000 ffffffed
Jan 1 00:06:48 OpenWrt user.warn kernel: 80dca000 801a93c4
802e6c90 801aa3ec 00000000 0000001d 00008924 00008924
Jan 1 00:06:48 OpenWrt user.warn kernel: ...
Jan 1 00:06:48 OpenWrt user.warn kernel: Call Trace:
Jan 1 00:06:48 OpenWrt user.warn kernel: [<805882f4>]
update_min_mtu+0x2d8/0x4d8 [batman_adv]
Jan 1 00:06:48 OpenWrt user.warn kernel: [<805882dc>]
update_min_mtu+0x2c0/0x4d8 [batman_adv]
Jan 1 00:06:48 OpenWrt user.warn kernel: Code: 24c50006 88820003
98820000 <a8a20003> b8a20000 90830004 a0a30004 90820005 a0a20005
Jan 1 00:06:48 OpenWrt user.warn kernel: Disabling lock debugging due
to kernel taint"
Hope it helps.... The part Marek quoted at least did change :)
With best regards,
Tim
12 years, 5 months
[B.A.T.M.A.N.] The state of batman-adv branches in august 2010
by Sven Eckelmann
Hi,
as we started to have different branches and repositories, everything
became a little bit more complex to track. I will try to summarize what
and where is something going on inside the batman-adv universe.
There is currently one main change happening in the branch design. The
branch currently called 'maint' will be renamed to 'next'. This should
reflect that we work there on the features (already part of
master/trunk) which should be submitted to the kernel maintainers. This
branch is stopped quite early in the development phase - even before the
kernel with the corresponding features will be released.
For example the current patches for linux 2.6.36 (which will may be
released in 5 weeks) will be finished with the release of v2010.1.0. The
next branch will get immediately all patches which will be part of linux
2.6.37. This is needed because all patches must be tested in linux-next
a long time before Linus Torvalds opens the merge window vor linux
2.6.37.
Of course, this will create a small gap for bug fixes which will enter
linux 2.6.36 after the release of v2010.1.0. That's why we now use the
maint branch to track those changes. Maint will always be a branch on
top of the last release with all bugfixes which must be added to that
release and are not features for the next branch.
That new maint branch will also help other distributors to easily find
patches which should be applied on top of their shipped versions or for
users which want to build their version of batman-adv manually and still
get a version which fixes (hopefully) all know bugs. And maybe we will
have bug fix releases in the future...
* trunk/batman-adv/ [1], master [2]
In trunk is always summer - so changes always(?) enter here and will
get moved to other branches unless they need some more time to get a
fine flavor - or at least more testing. Even if everything should hit
trunk, it is easier to describe changes in a different places (next,
master-rebase).
This branch can be used together with trunk/batctl/ [3]
* next [4]
This is were commits are gathered to be send later to the linux
kernel folks. Only tested features or features which are dependencies
for the in-kernel batman-adv should enter this branch.
Since the last time [5] many things happened, but not all are
finished yet. So for example the release of v2010.1.0 is still
pending and so no patches for linux-2.6.37 have been send to GregKH.
Meanwhile we had to deal a little bit with some regressions which
were added when we changed to everything from procfs to sysfs. This
is the reason why there were some patches sent to the linux
stable-tree folks lately.
After that release we we will merge some patches which are mostly
needed to push the merge of batman-adv into linux-net a little bit
further. That includes for example the preparation of nearly all data
inside of skbs instead of external buffers and the usage of optimized
kernel functionality for things which we tried to implement our self.
But of course there are again quite interesting features:
* batman-adv: layer2 unicast packet fragmentation
* batman-adv: attach each hard-interface to a soft-interface
* batman-adv: multiple mesh clouds
Also patches were added which tweaked a little bit here and there.
Many of them came directly from the kernel folks and dealt with
smaller coding style problems.
This branch can be used together with batctl-next [6]
* linux-2.6.36
The release of linux 2.6.36 isn't finished yet, but we have submitted
all patches in next. We aren't yet in net/, but hope that this
follows soon. All problems which David S. Miller [7] found were
relative small and already fixed. We will wait until the first
patches for the upcoming merge window were send to the staging tree,
before we try to get really into net/.
You may experienced some weird regressions when using early -RCs of
linux 2.6.36. Those happened due to some smaller patch war between
the guys from linux-net and us. Those changes clashed when GregKH had
to merge them after the release of 2.6.35. Unfortunately he resolved
the merge conflicts a little bit different than I expected. But those
problems should be solved with the upcoming release of linux
2.6.36-rc3.
* linux [8]
The dirty place were all the linux integration happens. It is ugly,
misunderstood and uninteresting for most people.
The last synchronization point was GregKH-20100821 [9]. It is a merge
of linux-2.6.36-rc1 and v2010.0.0-46-ge3a0cc9 [10] + a documentation
of all files we create in sysfs. So this synchronization point (a git
tag) just says that we checked at least linux-2.6.36-rc1 for new
patches not yet integrated in next/trunk of batman-adv and that we
send our changes until that point to GregKH [11].
* rebase [12]
My personal playground. (With a little delay) I will try to get all
changes in trunk rebased on top of next. As result we get only the
essence of changes in trunk which aren't already part of next. This
also means for example that patches will look like they were made
with sysfs in mind when they are originally created files in /proc.
Even when I always ensure that the files in master and rebase are
100% equal, the original author may not be blamed when a single patch
will try to eat your pet (or you could say that patches in that
branch will not be checked by their original authors and I will only
guarantee that when you apply all patches you will get the same files
as in trunk).
Nevertheless it is a great place to get and test feature patches on
top of next without using the complete set of changes in master. Or
to understand what goes on in trunk compared to next.
After the release of v2010.1.0 we will only have the gateway patches
again waiting to get merged into next.
* batman-adv: adapting source version to revised versioning scheme [13]
* batman-adv: adding gateway functionality [14]
* batman-adv: send DHCP requests directly to the chosen gw [15]
* batman-adv: best gw DHCP filter 802.1Q support [16]
This branch will jump around and it is not save to track it using a
local git branch.
It can be used together with trunk/batctl/ [3]
Maybe this is a good place to announce that there is something like
master-rebase also to rebase current patches of batctl [17] on top of
the latest release. It is unknown who will continue the work on that,
but as it is not as complex at the kernel module, I doubt that it is
really much work rebase and reorder those patches.
Last but not least, thanks to everyone who has done the real work
* Andreas Langer
* Joe Perches
* Linus Lüssing
* Marek Lindner
* Randy Dunlap
* Simon Wunderlich
Special thanks goes to
* Kazuki Shimada
* Tim Glaremin
for extensive testing and debugging help. Lets see what the next months
will bring us.
Best regards,
Sven
[1] http://downloads.open-mesh.org/svn/batman/trunk/batman-adv/
[2] http://git.open-mesh.net/?p=batman-adv.git;a=shortlog;h=refs/heads/master
[3] http://downloads.open-mesh.net/svn/batman/trunk/batctl/
[4] http://git.open-mesh.net/?p=batman-adv.git;a=shortlog;h=refs/heads/next
[5] http://git.open-mesh.net/?p=batman-adv.git;a=shortlog;h=13bc17ebf3e6062d9...
[6] http://git.open-mesh.net/?p=batctl.git;a=shortlog;h=refs/heads/next
[7] https://lists.open-mesh.org/pipermail/b.a.t.m.a.n/2010-July/003141.html
[8] http://git.open-mesh.net/?p=ecsv/linux-merge.git;a=shortlog;h=refs/heads/...
[9] http://git.open-mesh.net/?p=ecsv/linux-merge.git;a=commit;h=GregKH-20100821
[10] http://git.open-mesh.net/?p=batman-adv;a=commit;h=e3a0cc90940915dd14e4ca6...
[11] http://open-mesh.net/wiki/SubmittingLinux
[12] http://git.open-mesh.net/?p=ecsv/master-rebase.git;a=shortlog;h=rebase
[13] http://git.open-mesh.net/?p=ecsv/master-rebase.git;a=commit;h=5900c5e6557...
[14] http://git.open-mesh.net/?p=ecsv/master-rebase.git;a=commit;h=efd570e04d1...
[15] http://git.open-mesh.net/?p=ecsv/master-rebase.git;a=commit;h=1f498c63ae1...
[16] http://git.open-mesh.net/?p=ecsv/master-rebase.git;a=commit;h=791290fc06e...
[17] http://git.open-mesh.net/?p=ecsv/batctl-rebase.git;a=shortlog;h=rebase
12 years, 5 months
[B.A.T.M.A.N.] [PATCH] batman-adv: Don't call unregister_netdev with locked rtnl semaphore
by Sven Eckelmann
We currently try to call unregister_netdev when we can destroy a softif
after all corresponding hard-interfaces announced that they will be
removed.
This will be done when we receive a hard_if_event which already takes
the rtnl semaphore and thus we try to get it again in unregister_netdev.
This results in a deadlock. This call to unregister_netdev cannot easily
replaced by unregister_netdevice, because other parts of the batman-adv
module still call that code indirectly without holding the rtnl
semaphore.
(needs rtln_unlocked)
unregister_netdev
^
|
softif_destroy
^
|
hardif_disable_interface
^ ^
/ |
store_mesh_iface hardif_remove_interface
(rtln_unlocked) ^ ^
| \
hardif_remove_interfaces hard_if_event
^ (rtln_locked)
|
batman_exit
(rtln_unlocked)
A consistent workaround is to change store_mesh_iface and
hardif_remove_interfaces to call rtnl_lock before they call the
mentioned child function, release the semaphore afterwards and change
unregister_netdev in softif_destroy to unregister_netdevice.
Reported-by: Kazuki Shimada <zukky(a)bb.banban.jp>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
---
batman-adv/bat_sysfs.c | 7 ++++++-
batman-adv/hard-interface.c | 5 ++++-
batman-adv/soft-interface.c | 2 +-
3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/batman-adv/bat_sysfs.c b/batman-adv/bat_sysfs.c
index 1331a02..8e180ba 100644
--- a/batman-adv/bat_sysfs.c
+++ b/batman-adv/bat_sysfs.c
@@ -492,13 +492,18 @@ static ssize_t store_mesh_iface(struct kobject *kobj, struct attribute *attr,
return count;
if (status_tmp == IF_NOT_IN_USE) {
+ rtnl_lock();
hardif_disable_interface(batman_if);
+ rtnl_unlock();
return count;
}
/* if the interface already is in use */
- if (batman_if->if_status != IF_NOT_IN_USE)
+ if (batman_if->if_status != IF_NOT_IN_USE) {
+ rtnl_lock();
hardif_disable_interface(batman_if);
+ rtnl_unlock();
+ }
return hardif_enable_interface(batman_if, buff);
}
diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c
index a437ec3..b12f63b 100644
--- a/batman-adv/hard-interface.c
+++ b/batman-adv/hard-interface.c
@@ -441,8 +441,11 @@ void hardif_remove_interfaces(void)
{
struct batman_if *batman_if, *batman_if_tmp;
- list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list)
+ list_for_each_entry_safe(batman_if, batman_if_tmp, &if_list, list) {
+ rtnl_lock();
hardif_remove_interface(batman_if);
+ rtnl_unlock();
+ }
}
static int hard_if_event(struct notifier_block *this,
diff --git a/batman-adv/soft-interface.c b/batman-adv/soft-interface.c
index a45626e..38134ae 100644
--- a/batman-adv/soft-interface.c
+++ b/batman-adv/soft-interface.c
@@ -351,7 +351,7 @@ void softif_destroy(struct net_device *soft_iface)
debugfs_del_meshif(soft_iface);
sysfs_del_meshif(soft_iface);
mesh_free(soft_iface);
- unregister_netdev(soft_iface);
+ unregister_netdevice(soft_iface);
}
/* ethtool */
--
1.7.1
12 years, 5 months
[B.A.T.M.A.N.] (no subject)
by Linus Lüssing
-------------
Hi Linus,
On Wed, Aug 18, 2010 at 00:10 +0200, Linus Lüssing wrote:
> Hi Vasiliy,
>
> Also first of all thanks for your little reviewing of the batman code from
> me too. I've been the person submitting the patch to enable ebtables
> filtering of batman-adv's packets.Sorry, I'm not a kernel coding veteran, so
> I might possibly have missed something ;). However, I don't fully understand
> when the skb should be leaked, so hope you don't mind some more asking from
> my side :).
>
> Okay, I had a little closer look again.NF_HOOK returns -1 in case of a drop
> due to nf_hook_slow() and 1 in case of a success due to nf_hook_slow() + the
> ok function returning 1 too. And hey, yes, nf_hook_slow() can also return 0,
> passing it all up to the NF_HOOK which would lead to the goto err_out in
> batman-adv - and both the kernel module and netfilter won't free the skb!
> However, I think I'm not quite getting when nf_hook_slow() might return 0...
The thing is that code using NF_HOOK should be written in functional
paradigm: the recv() should be divided into 2 functions, before the NF_HOOK
and after. All after-nf work should be delegated to second part, not to code in
first part that is run after NF_HOOK return. It solves the problem of asyncronous
processing in hooks. It is perferctly seen in ipv4 ip_rcv() & rp_rcv_finish().
>
> What confuses me even more is, that of course if nf_hook_slow() could return
> a value other than 1 and without freeing the skb, the batman-adv kernel
> module would have to free the skb itself in send.c, too. In send.c the
> return value of NF_HOOK is being returned there immediately without a check
> at the moment, hoping that either netfilter or dev_queue_xmit() would free
> the skb. But then net/ipv4/arp.c's arp_xmit() would have the same problem,
> too, wouldn't it? It also does not check whether the
> NF_HOOK(/nf_hook_slow()) there might return 0 either, meaning that the skb
> has not yet been consumed/freed? So is there the same bug / possible memleak
> or what is the difference between ipv4's arp.c and batman-adv's
> send.c/hard_interface.c in the usage of the NF_HOOK?
No, there isn't ;) In fact, for the caller of NF_HOOK() three cases may
happed:
1) All hooks return NF_ACCEPT or similar (NF_STOP or through
NF_QUEUE/NF_REPEAT with the same result). In this case ok_fn() is called
and code after return from NF_HOOK() is run.
In case of arp dev_queue_xmit() processes the skb and free it.
In your case ok_fn() does nothing and code after return from NF_HOOK()
finishes the processing of skb.
2) Some hook returns NF_DROP or similar (like (1), with the same
effect for the caller). In this case nf_hook_slow() frees skb and NF_HOOK()
returns -1. ok_fn() is not called at all.
Arp and batman don't leak anything as skb is freed.
3) Some hook returns NF_STOLEN signaling that now it is responsible for
skb delivery and freeing. It can be stolen until some long
calculations end or even some network communication is finished (e.g.
hook wants to know whether skb dest ip is google.com)
a) After some time the hook frees skb and doesn't call ok_fn().
arp and you don't leak anything and work exactly like NF_HOOK() retuned
NF_DROPPED.
b) After some time the hook finishes calcs and passes the skb to
ok_fn(). From this time ok_fn() is responsible for the skb.
In arp case it is dev_queue_xmit() that frees skb.
In batman case it does NOTHING and skb is leaked.
Also see the comment from linux/netfilter.h:
/* Activate hook; either okfn or kfree_skb called, unless a hook
returns NF_STOLEN (in which case, it's up to the hook to deal with
the consequences).
Returns -ERRNO if packet dropped. Zero means queued, stolen or
accepted.
*/
/* RR:
> I don't want nf_hook to return anything because people might forget
> about async and trust the return value to mean "packet was ok".
AK:
Just document it clearly, then you can expect some sense from kernel
coders :)
*/
Thanks,
Vasiliy.
12 years, 5 months
[B.A.T.M.A.N.] Staging: batman-adv for 2.6.36 (7: fixes)
by Sven Eckelmann
Hi,
here are patches targeted for 2.6.36. They are smaller bugfixes and add
no new features.
I already send you 5 Patches two weeks ago which fixes problems in 2.6.36 and
one of them also in 2.6.35, but got no reply till now. So here is the reminder
you asked me before.
The patches for 2.6.37 will follow later.
thanks,
Sven
Sven Eckelmann (3):
Staging: batman-adv: Create batman_if only on register event
Staging: batman-adv: Don't use net_dev after dev_put
Staging: batman-adv: Don't write in not allocated packet_buff
drivers/staging/batman-adv/hard-interface.c | 21 ++++++++++++---------
1 files changed, 12 insertions(+), 9 deletions(-)
12 years, 5 months
[B.A.T.M.A.N.] Nat Question
by David Beaumont
I have a B.A.T.M.A.N mesh successfully configured on x86 hardware.
I can currently ping the internet from the router that is connected
via the mesh, however i can't download or connect to any webpages.
I see the request for the page going over the bat0 interface and being
received at the other end.
I've a feeling this is a basic nat problem, but have been unable to
find a solution.
I am using OpenWRT software.
Any advice? or hints?
Thanks
12 years, 5 months
[B.A.T.M.A.N.] [PATCH] batman-adv: Don't write in not allocated packet_buff
by Sven Eckelmann
Each net_device in a system will automatically managed as a possible
batman_if and holds different informations like a buffer with a prepared
originator messages. To reduce the memory usage, the packet_buff will
only be allocated when the interface is really added/enabled for
batman-adv.
The function to update the hw address information inside the packet_buff
just assumes that the packet_buff is always initialised and thus the
kernel will just oops when we try to change the hw address of a not
already fully enabled interface.
We must always check if the packet_buff is allocated before we try to
change information inside of it.
Reported-by: Tim Glaremin <Tim.Glaremin(a)web.de>
Reported-by: Lemonde <zukky(a)bb.banban.jp>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
Cc: stable <stable(a)kernel.org>
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
---
batman-adv/hard-interface.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/batman-adv/hard-interface.c b/batman-adv/hard-interface.c
index eb26026..9d0a47c 100644
--- a/batman-adv/hard-interface.c
+++ b/batman-adv/hard-interface.c
@@ -138,6 +138,9 @@ static bool hardif_is_iface_up(struct batman_if *batman_if)
static void update_mac_addresses(struct batman_if *batman_if)
{
+ if (!batman_if || !batman_if->packet_buff)
+ return;
+
addr_to_string(batman_if->addr_str, batman_if->net_dev->dev_addr);
memcpy(((struct batman_packet *)(batman_if->packet_buff))->orig,
@@ -397,6 +400,7 @@ static struct batman_if *hardif_add_interface(struct net_device *net_dev)
batman_if->net_dev = net_dev;
batman_if->soft_iface = NULL;
batman_if->if_status = IF_NOT_IN_USE;
+ batman_if->packet_buff = NULL;
INIT_LIST_HEAD(&batman_if->list);
check_known_mac_addr(batman_if->net_dev->dev_addr);
--
1.7.1
12 years, 5 months
Re: [B.A.T.M.A.N.] Problem openWRT "backfire" and "kmod-batman-adv"
by Tim
Hi everybody,
> Ok, could you please try the attached patch? Just add it to the other patches
> (you can omit 03-... after a successful test. But it may reveal interesting
> information if that wasn't the actual problem). Don't forget to cleanup your
> openwrt build environment.
>
> Best regards,
> Sven
>
the patch seems to work. Just did some basic testing and was able to
build up a network, even with the devices running older versions.
I will continue testing within the next few days, but now I need to
focus on creating a presentation for Wednesday.
I also added the output of dmesg:
root@OpenWrt:/# dmesg
Linux version 2.6.32.16 (tim@atze) (gcc version 4.3.3 (GCC) ) #1 Fri Aug
20 20:56:09 CEST 2010
CPU revision is: 00029008 (Broadcom BCM3302)
ssb: Core 0 found: ChipCommon (cc 0x800, rev 0x0E, vendor 0x4243)
ssb: Core 1 found: Fast Ethernet (cc 0x806, rev 0x09, vendor 0x4243)
ssb: Core 2 found: MIPS 3302 (cc 0x816, rev 0x06, vendor 0x4243)
ssb: Core 3 found: USB 1.1 Host (cc 0x817, rev 0x02, vendor 0x4243)
ssb: Core 4 found: MEMC SDRAM (cc 0x80F, rev 0x01, vendor 0x4243)
ssb: Core 5 found: IEEE 802.11 (cc 0x812, rev 0x09, vendor 0x4243)
ssb: Core 6 found: Roboswitch (cc 0x81C, rev 0x02, vendor 0x4243)
ssb: Initializing MIPS core...
ssb: set_irq: core 0x0806, irq 4 => 4
ssb: set_irq: core 0x0816, irq 5 => 2
ssb: set_irq: core 0x0812, irq 2 => 5
ssb: after irq reconfiguration
ssb: core 0x0800, irq : 2(S) 3* 4 5 6 D I
ssb: core 0x0806, irq : 2(S) 3 4* 5 6 D I
ssb: core 0x0816, irq : 2(S)* 3 4 5 6 D I
ssb: core 0x0817, irq : 2(S) 3 4 5 6* D I
ssb: core 0x080f, irq : 2(S) 3 4 5 6 D I*
ssb: core 0x0812, irq : 2(S) 3 4 5* 6 D I
ssb: core 0x081c, irq : 2(S) 3 4 5 6 D I*
ssb: Sonics Silicon Backplane found at address 0x18000000
Serial init done.
Determined physical RAM map:
memory: 01000000 @ 00000000 (usable)
Initrd not found or empty - disabling initrd
Zone PFN ranges:
Normal 0x00000000 -> 0x00001000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
0: 0x00000000 -> 0x00001000
On node 0 totalpages: 4096
free_area_init_node: node 0, pgdat 802a5b50, node_mem_map 802eb000
Normal zone: 32 pages used for memmap
Normal zone: 0 pages reserved
Normal zone: 4064 pages, LIFO batch:0
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 4064
Kernel command line: root=/dev/mtdblock2 rootfstype=squashfs,jffs2
noinitrd console=ttyS0,115200
PID hash table entries: 64 (order: -4, 256 bytes)
Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Primary instruction cache 16kB, VIPT, 2-way, linesize 16 bytes.
Primary data cache 8kB, 2-way, VIPT, no aliases, linesize 16 bytes
Memory: 13236k/16384k available (2231k kernel code, 3148k reserved, 476k
data, 136k init, 0k highmem)
Hierarchical RCU implementation.
NR_IRQS:128
console [ttyS0] enabled
Calibrating delay loop... 199.16 BogoMIPS (lpj=398336)
Mount-cache hash table entries: 512
NET: Registered protocol family 16
bio: create slab <bio-0> at 0
Switching to clocksource MIPS
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 512 (order: 0, 4096 bytes)
TCP bind hash table entries: 512 (order: -1, 2048 bytes)
TCP: Hash tables configured (established 512 bind 512)
TCP reno registered
NET: Registered protocol family 1
squashfs: version 4.0 (2009/01/31) Phillip Lougher
Registering mini_fo version $Id$
JFFS2 version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
msgmni has been set to 25
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 2 ports, IRQ sharing enabled
serial8250: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
serial8250.0: ttyS0 at MMIO 0xb8000300 (irq = 3) is a 16550A
serial8250.0: ttyS1 at MMIO 0xb8000400 (irq = 3) is a 16550A
flash init: 0x1c000000 0x02000000
Physically mapped flash: Found 1 x16 devices at 0x0 in 16-bit bank
Physically mapped flash: Found an alias at 0x400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0xc00000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1000000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1400000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1800000 for the chip at 0x0
Physically mapped flash: Found an alias at 0x1c00000 for the chip at 0x0
CFI mfr 0x000000c2
CFI id 0x000022a8
Amd/Fujitsu Extended Query Table at 0x0040
Amd/Fujitsu Extended Query version 1.1.
number of CFI chips: 1
cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness.
Flash device: 0x400000 at 0x1fc00000
bootloader size: 262144
Creating 4 MTD partitions on "Physically mapped flash":
0x000000000000-0x000000040000 : "cfe"
0x000000040000-0x0000003f0000 : "linux"
0x000000122c00-0x0000003f0000 : "rootfs"
mtd: partition "rootfs" must either start or end on erase block boundary
or be smaller than an erase block -- forcing read-only
mtd: partition "rootfs" set to be root filesystem
mtd: partition "rootfs_data" created automatically, ofs=2A0000, len=150000
0x0000002a0000-0x0000003f0000 : "rootfs_data"
0x0000003f0000-0x000000400000 : "nvram"
b44.c:v2.0
eth0: Broadcom 44xx/47xx 10/100BaseT Ethernet 00:25:9c:3c:46:04
BCM47xx Watchdog Timer enabled (30 seconds, nowayout)
TCP westwood registered
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb(a)candelatech.com>
All bugs added by David S. Miller <davem(a)redhat.com>
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 136k freed
Please be patient, while OpenWrt loads ...
diag: Detected 'Linksys WRT54G/GS/GL'
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
roboswitch: Probing device eth0: found a 5325! It's a 5350.
mini_fo: using base directory: /
mini_fo: using storage directory: /overlay
b44: eth0: powering down PHY
b44: eth0: Link is up at 100 Mbps, full duplex.
b44: eth0: Flow control is off for TX and off for RX.
device eth0.0 entered promiscuous mode
device eth0 entered promiscuous mode
br-lan: port 1(eth0.0) entering forwarding state
Compat-wireless backport release: compat-wireless-2010-07-13-4-g04898a5
Backport based on wireless-2.6.git v2.6.35-rc6-48432-gdce358e
cfg80211: Calling CRDA to update world regulatory domain
b43-phy0: Broadcom 5352 WLAN found (core revision 9)
cfg80211: World regulatory domain updated:
(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
(2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
(5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
(5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
phy0: Selected rate control algorithm 'minstrel'
Registered led device: b43-phy0::tx
Registered led device: b43-phy0::rx
Registered led device: b43-phy0::radio
Broadcom 43xx driver loaded [ Features: PL, Firmware-ID: FW13 ]
Broadcom 43xx-legacy driver loaded [ Features: PLID, Firmware-ID: FW10 ]
PPP generic driver version 2.4.2
ip_tables: (C) 2000-2006 Netfilter Core Team
NET: Registered protocol family 24
nf_conntrack version 0.5.0 (208 buckets, 832 max)
batman-adv-dbg: go through if_list
batman-adv-dbg: final min_mtu is 1500
batman-adv-dbg: got event 5 for net_dev 80845c00
batman-adv-dbg: will add net_device 80845c00 to if_list
batman-adv-dbg: got batman_if (null) for net_dev 80845c00
batman-adv-dbg: got event 1 for net_dev 80845c00
batman-adv-dbg: got batman_if (null) for net_dev 80845c00
batman-adv-dbg: got event 5 for net_dev 8086f000
batman-adv-dbg: will add net_device 8086f000 to if_list
batman-adv-dbg: added net_device 8086f000 to if_list as 8042b900
batman-adv-dbg: got batman_if 8042b900 for net_dev 8086f000
batman-adv-dbg: got event 1 for net_dev 8086f000
batman-adv-dbg: got batman_if 8042b900 for net_dev 8086f000
batman-adv-dbg: hardif_activate_interface(8054eec0, 8042b900)
batman-adv-dbg: got event 5 for net_dev 80f0d800
batman-adv-dbg: will add net_device 80f0d800 to if_list
batman-adv-dbg: added net_device 80f0d800 to if_list as 8042b880
batman-adv-dbg: got batman_if 8042b880 for net_dev 80f0d800
batman-adv-dbg: got event 1 for net_dev 80f0d800
batman-adv-dbg: got batman_if 8042b880 for net_dev 80f0d800
batman-adv-dbg: hardif_activate_interface(8054eec0, 8042b880)
batman-adv-dbg: got event 5 for net_dev 808e9000
batman-adv-dbg: will add net_device 808e9000 to if_list
batman-adv-dbg: added net_device 808e9000 to if_list as 8042b800
batman-adv-dbg: got batman_if 8042b800 for net_dev 808e9000
batman-adv-dbg: got event 1 for net_dev 808e9000
batman-adv-dbg: got batman_if 8042b800 for net_dev 808e9000
batman-adv-dbg: hardif_activate_interface(8054eec0, 8042b800)
batman-adv-dbg: got event 5 for net_dev 80d03000
batman-adv-dbg: will add net_device 80d03000 to if_list
batman-adv-dbg: added net_device 80d03000 to if_list as 8042b780
batman-adv-dbg: got batman_if 8042b780 for net_dev 80d03000
batman-adv-dbg: got event 1 for net_dev 80d03000
batman-adv-dbg: got batman_if 8042b780 for net_dev 80d03000
batman-adv-dbg: hardif_activate_interface(8054eec0, 8042b780)
batman-adv-dbg: got event 5 for net_dev 80c74800
batman-adv-dbg: will add net_device 80c74800 to if_list
batman-adv-dbg: added net_device 80c74800 to if_list as 8042b700
batman-adv-dbg: got batman_if 8042b700 for net_dev 80c74800
batman-adv-dbg: got event 5 for net_dev 8054ec00
batman-adv-dbg: will add net_device 8054ec00 to if_list
batman-adv-dbg: got batman_if (null) for net_dev 8054ec00
batman-adv:B.A.T.M.A.N. advanced 2010.0.0 (compatibility version 8) loaded
batman-adv-dbg: got event 13 for net_dev 8054ec00
batman-adv-dbg: got batman_if (null) for net_dev 8054ec00
batman-adv-dbg: got event 1 for net_dev 8054ec00
batman-adv-dbg: got batman_if (null) for net_dev 8054ec00
device bat0 entered promiscuous mode
br-lan: port 2(bat0) entering forwarding state
batman-adv-dbg: got event 6 for net_dev 80c74800
batman-adv-dbg: got batman_if 8042b700 for net_dev 80c74800
batman-adv-dbg: hardif_remove_interface(8042b700)
batman-adv-dbg: will remove batman_if 8042b700
batman-adv-dbg: putted netdev 80c74800 of batman_if 8042b700
batman-adv-dbg: removed batman_if 8042b700
batman-adv-dbg: got event 5 for net_dev 80c74800
batman-adv-dbg: will add net_device 80c74800 to if_list
batman-adv-dbg: added net_device 80c74800 to if_list as 8042be80
batman-adv-dbg: got batman_if 8042be80 for net_dev 80c74800
batman-adv-dbg: got event 8 for net_dev 80c74800
batman-adv-dbg: got batman_if 8042be80 for net_dev 80c74800
batman-adv-dbg: got event 13 for net_dev 80c74800
batman-adv-dbg: got batman_if 8042be80 for net_dev 80c74800
b43-phy0: Loading firmware version 410.2160 (2007-05-26 15:32:10)
batman-adv-dbg: got event 1 for net_dev 80c74800
batman-adv-dbg: got batman_if 8042be80 for net_dev 80c74800
batman-adv-dbg: hardif_activate_interface(8054eec0, 8042be80)
batman-adv-dbg: got event 7 for net_dev 80c74800
batman-adv-dbg: got batman_if 8042be80 for net_dev 80c74800
wlan0: Creating new IBSS network, BSSID 02:12:34:56:78:9a
batman-adv:Adding interface: wlan0
batman-adv:Interface activated: wlan0
batman-adv-dbg: update_min_mtu for softdevice 8054ec00
batman-adv-dbg: go through if_list
batman-adv-dbg: check batman_if 8042b900
batman-adv-dbg: batman_if 8042b900 has status 0
batman-adv-dbg: batman_if 8042b900 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b880
batman-adv-dbg: batman_if 8042b880 has status 0
batman-adv-dbg: batman_if 8042b880 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b800
batman-adv-dbg: batman_if 8042b800 has status 0
batman-adv-dbg: batman_if 8042b800 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b780
batman-adv-dbg: batman_if 8042b780 has status 0
batman-adv-dbg: batman_if 8042b780 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042be80
batman-adv-dbg: batman_if 8042be80 has status 4
batman-adv-dbg: compare batman_if 8042be80 with net_dev 80c74800
batman-adv-dbg: compare batman_if 8042be80 with 1524 against 1500
batman-adv-dbg: batman_if 8042be80 round got min_mtu 1500
batman-adv-dbg: final min_mtu is 1500
batman-adv-dbg: found min_mtu 1500
batman-adv-dbg: update_min_mtu for softdevice 8054ec00
batman-adv-dbg: go through if_list
batman-adv-dbg: check batman_if 8042b900
batman-adv-dbg: batman_if 8042b900 has status 0
batman-adv-dbg: batman_if 8042b900 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b880
batman-adv-dbg: batman_if 8042b880 has status 0
batman-adv-dbg: batman_if 8042b880 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b800
batman-adv-dbg: batman_if 8042b800 has status 0
batman-adv-dbg: batman_if 8042b800 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042b780
batman-adv-dbg: batman_if 8042b780 has status 0
batman-adv-dbg: batman_if 8042b780 round got min_mtu 1500
batman-adv-dbg: check batman_if 8042be80
batman-adv-dbg: batman_if 8042be80 has status 4
batman-adv-dbg: compare batman_if 8042be80 with net_dev 80c74800
batman-adv-dbg: compare batman_if 8042be80 with 1524 against 1500
batman-adv-dbg: batman_if 8042be80 round got min_mtu 1500
batman-adv-dbg: final min_mtu is 1500
batman-adv-dbg: found min_mtu 1500
root@OpenWrt:/#
Greetings,
Tim
12 years, 5 months
Re: [B.A.T.M.A.N.] Problem openWRT "backfire" and "kmod-batman-adv"
by Sven Eckelmann
On Saturday 21 August 2010 06:42:56 Kazuki Shimada wrote:
> Hi, Sven Eckelmann.
>
> Sorry to be late to reply.
>
> > @Lemonde, it seems that you have the same problem. The patch will appear
> > on the ml later. But please also add the other patches I'd suggested.
>
> Thank you for your reply and patches.
> I applied the patches. (It seems batman-adv-devel is a little defferent
> from batman-adv, so I made patches to fit to batman-adv-devel on
> buildroot. hope I didn't mistake :- )
> The result is the same before. But this report has already obsolete.
> I'll try your next patches.
Actually these patches are for devel aka the trunk. The patches I send to Tim
were for v2010.0.0. Please check if you really use the latest version of
batman-adv from trunk (see mareks reply to your message).
The trunk (r1776) has nearly all patches I've send around in the last week (at
least it should not have the problems you've experienced). Please try that
revision and please report back.
thanks,
Sven
12 years, 5 months
[B.A.T.M.A.N.] [PATCH] batman-adv: Add include guards to unicast.h
by Sven Eckelmann
Signed-off-by: Sven Eckelmann <sven.eckelmann(a)gmx.de>
---
batman-adv/unicast.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/batman-adv/unicast.h b/batman-adv/unicast.h
index 06f374e..1d5cbeb 100644
--- a/batman-adv/unicast.h
+++ b/batman-adv/unicast.h
@@ -19,6 +19,9 @@
*
*/
+#ifndef _NET_BATMAN_ADV_UNICAST_H_
+#define _NET_BATMAN_ADV_UNICAST_H_
+
#define FRAG_TIMEOUT 10000 /* purge frag list entrys after time in ms */
#define FRAG_BUFFER_SIZE 6 /* number of list elements in buffer */
@@ -32,3 +35,5 @@ struct frag_packet_list_entry *search_frag_packet(struct list_head *head,
struct unicast_frag_packet *up);
void frag_list_free(struct list_head *head);
int unicast_send_skb(struct sk_buff *skb, struct bat_priv *bat_priv);
+
+#endif /* _NET_BATMAN_ADV_UNICAST_H_ */
--
1.7.1
12 years, 5 months