cherry-picked from openwrt/packages openwrt-19.07 branch commit 445c3d8f86b85c2c6fc4a8d7a003b06ca219ffb1