diff options
author | John Crispin <blogic@openwrt.org> | 2014-08-18 13:08:52 +0000 |
---|---|---|
committer | John Crispin <blogic@openwrt.org> | 2014-08-18 13:08:52 +0000 |
commit | 262de18485041d5bc781926ba3375394df67ffaa (patch) | |
tree | 6f2fa94a5b738627b1457bcc02e23682d6a79055 /target | |
parent | 5c9513e815a32930c247b4928c8330f0a44182c8 (diff) | |
download | upstream-262de18485041d5bc781926ba3375394df67ffaa.tar.gz upstream-262de18485041d5bc781926ba3375394df67ffaa.tar.bz2 upstream-262de18485041d5bc781926ba3375394df67ffaa.zip |
ramips: add a workaround to fix failsafe on RT5350
Due to TCP connections not working when VLAN is disabled, this is
needed to get failsafe functional.
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@42179 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips index db03b6bde6..ab87421bb9 100644 --- a/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips +++ b/target/linux/ramips/base-files/lib/preinit/07_set_preinit_iface_ramips @@ -11,7 +11,24 @@ ramips_set_preinit_iface() { swconfig dev rt305x set reset 1 fi - ifname=eth0 + if echo $RT3X5X | grep -q RT5350; then + # This is a dirty hack to get by while the switch + # problem is investigated. When VLAN is disabled, ICMP + # pings work as expected, but TCP connections time + # out, so telnetting in failsafe is impossible. The + # likely reason is TCP checksumming hardware getting + # disabled: + # https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg19870.html + swconfig dev rt305x set enable_vlan 1 + swconfig dev rt305x vlan 1 set ports "0 6" + swconfig dev rt305x port 6 set untag 0 + swconfig dev rt305x set apply 1 + vconfig add eth0 1 + ifconfig eth0 up + ifname=eth0.1 + else + ifname=eth0 + fi } boot_hook_add preinit_main ramips_set_preinit_iface |