Added patch from openwrt trunk