Modify

Opened 5 years ago

Last modified 3 years ago

#13337 new defect

RT3052 based router. LAN clients pull DHCP from upstream WAN router during boot.

Reported by: chipdankly@… Owned by: developers
Priority: high Milestone: Barrier Breaker 14.07
Component: kernel Version: Attitude Adjustment 12.09 Beta
Keywords: Cc:

Description

Exact same issue as this ticket:
/ticket/6819.html

During bootup there is a very large period of time (~10 seconds?) where LAN clients can pull a DHCP lease from an upstream router connected to the WAN port.

dmesg from Attitude Adjustment 12.09 RC1:

[    0.000000] prom: fw_arg0=00000001, fw_arg1=03f5bfb0, fw_arg2=03f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=64
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] env[0]: memsize=64
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3052 id:1 rev:3 running at 384.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00004000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00004000
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80231810, node_mem_map 81000000
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16256 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line:  board=BC2 console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(u-boot-env)ro,64k(factory)ro,896k(kernel),6976k(rootfs),7872k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Primary instruction cache 32kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00004010
[    0.000000] Readback ErrCtl register=00004010
[    0.000000] Memory: 62308k/65536k available (1919k kernel code, 3228k reserved, 328k data, 172k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 255.59 BogoMIPS (lpj=1277952)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.100000] Mount-cache hash table entries: 512
[    0.110000] NET: Registered protocol family 16
[    0.120000] MIPS: machine is NexAira BC2
[    0.130000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.140000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.150000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.170000] bio: create slab <bio-0> at 0
[    0.180000] Switching to clocksource MIPS
[    0.190000] NET: Registered protocol family 2
[    0.200000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.210000] TCP established hash table entries: 2048 (order: 2, 16384 bytes)
[    0.230000] TCP bind hash table entries: 2048 (order: 1, 8192 bytes)
[    0.240000] TCP: Hash tables configured (established 2048 bind 2048)
[    0.250000] TCP reno registered
[    0.260000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.270000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] NET: Registered protocol family 1
[    0.320000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.340000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.360000] msgmni has been set to 121
[    0.360000] io scheduler noop registered
[    0.370000] io scheduler deadline registered (default)
[    0.380000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.400000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.410000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.430000] physmap platform flash device: 00800000 at bf000000
[    0.440000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022cb
[    0.460000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.470000]   Amd/Fujitsu Extended Query version 1.1.
[    0.480000] number of CFI chips: 1
[    0.490000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.500000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.510000] 0x000000000000-0x000000030000 : "u-boot"
[    0.530000] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.540000] 0x000000040000-0x000000050000 : "factory"
[    0.550000] 0x000000050000-0x000000130000 : "kernel"
[    0.560000] 0x000000130000-0x000000800000 : "rootfs"
[    0.580000] mtd: partition "rootfs" set to be root filesystem
[    0.590000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=510000 
[    0.610000] 0x0000002f0000-0x000000800000 : "rootfs_data"
[    0.620000] 0x000000050000-0x000000800000 : "firmware"
[    0.640000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 33, using 33
[    0.660000] TCP cubic registered
[    0.660000] NET: Registered protocol family 17
[    0.670000] 8021q: 802.1Q VLAN Support v1.8
[    0.680000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.700000] Freeing unused kernel memory: 172k freed
[    2.540000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    2.650000] Button Hotplug driver version 0.4.1
[    2.810000] Registered led device: bc2:blue:usb
[    6.020000] JFFS2 notice: (348) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 9 of xref (0 dead, 0 orphan) found.
[    7.840000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    7.850000] Backport based on wireless-testing.git master-2012-09-07
[    7.870000] compat.git: wireless-testing.git
[    7.900000] cfg80211: Calling CRDA to update world regulatory domain
[    7.920000] cfg80211: World regulatory domain updated:
[    7.930000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    7.940000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    7.960000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.970000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    7.990000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.010000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.470000] usbcore: registered new interface driver usbfs
[    8.480000] usbcore: registered new interface driver hub
[    8.490000] usbcore: registered new device driver usb
[    8.920000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[    8.920000] Registered led device: rt2800pci-phy0::radio
[    8.920000] Registered led device: rt2800pci-phy0::assoc
[    8.920000] Registered led device: rt2800pci-phy0::quality
[    8.960000] PPP generic driver version 2.4.2
[    9.130000] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.360000] NET: Registered protocol family 24
[    9.390000] nf_conntrack version 0.5.0 (976 buckets, 3904 max)
[    9.760000] dwc_otg: version 2.72a 24-JUN-2008
[    9.770000] dwc_otg: Core Release: 2.66a
[    9.980000] dwc_otg: Periodic Transfer Interrupt Enhancement - disabled
[    9.990000] dwc_otg: Multiprocessor Interrupt Enhancement - disabled
[   10.000000] dwc_otg: Using DMA mode
[   10.010000] dwc_otg: Device using Buffer DMA mode
[   10.020000] dwc_otg dwc_otg.0: DWC OTG Controller
[   10.030000] dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 1
[   10.040000] dwc_otg dwc_otg.0: irq 26, io mem 0x101c0000
[   10.050000] dwc_otg: Init: Port Power? op_state=1
[   10.060000] dwc_otg: Init: Power Port (0)
[   10.070000] hub 1-0:1.0: USB hub found
[   10.080000] hub 1-0:1.0: 1 port detected
[   13.900000] device eth0.2 entered promiscuous mode
[   13.910000] device eth0 entered promiscuous mode
[   13.920000] br-lan: port 1(eth0.2) entered forwarding state
[   13.930000] br-lan: port 1(eth0.2) entered forwarding state
[   15.310000] ramips-wdt: timeout value 60 must be 0 < timeout <= 33, using 33
[   15.930000] br-lan: port 1(eth0.2) entered forwarding state
[   18.920000] cfg80211: Calling CRDA for country: US
[   18.930000] cfg80211: Regulatory domain changed to country: US
[   18.940000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[   18.960000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2700 mBm)
[   18.970000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 1700 mBm)
[   18.990000] cfg80211:   (5250000 KHz - 5330000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   19.010000] cfg80211:   (5490000 KHz - 5600000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   19.020000] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   19.040000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 3000 mBm)
[   21.620000] device wlan0 entered promiscuous mode
[   22.120000] br-lan: port 2(wlan0) entered forwarding state
[   22.130000] br-lan: port 2(wlan0) entered forwarding state
[   24.130000] br-lan: port 2(wlan0) entered forwarding state

Attachments (2)

ramips-boot-bridge.patch (1.7 KB) - added by brnt 5 years ago.
esw_rt3052.patch (1.5 KB) - added by anonymous 3 years ago.
Patch by brnt ported to 14.07

Download all attachments as: .zip

Change History (10)

comment:1 Changed 5 years ago by brnt

The same issue affects another rt3052-based router, the ReadyNet WRT300N-RN.

comment:2 Changed 5 years ago by brnt

This issue is present in Attitude Adjustment but appears to be gone in trunk.

comment:3 Changed 5 years ago by brnt

Correction: It doesn't appear in older versions of trunk. I'm not sure where the problem was introduced, but as of r32735 it wasn't present. In current trunk (as of r36552) the problem still exists.

comment:4 Changed 5 years ago by brnt

Correction of my last correction: I dug up some old builds based on r32735 and the problem existed there, so I can't say for sure that it ever worked correctly :-(

I'll give US$500 to the person that squashes this bug.

Changed 5 years ago by brnt

comment:5 follow-up: Changed 5 years ago by brnt

To correct my correction of my previous correction... :-|

The earlier rev indeed didn't suffer from the issue. I whittled my way down to the rev where the issue was introduced (r33301; r33300 is fine) and diffed the two. Attached is a patch that applies the important stuff to trunk (r36698).

comment:6 in reply to: ↑ 5 Changed 5 years ago by chipdankly@…

Replying to brnt:

To correct my correction of my previous correction... :-|

The earlier rev indeed didn't suffer from the issue. I whittled my way down to the rev where the issue was introduced (r33301; r33300 is fine) and diffed the two. Attached is a patch that applies the important stuff to trunk (r36698).

How could one make a patch for Attitude Adjustment?

I hope this fix gets backported to AA. This is a serious issue affecting the 3052 platform.

comment:7 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:8 Changed 3 years ago by anonymous

Is there a reason to why the patch attached has not been accepted yet? It still does the job in 14.07 final.

Changed 3 years ago by anonymous

Patch by brnt ported to 14.07

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.