But, can someone explain why a person who is MITM'ing ipk downloads would change the package and not the checksum?
Are there GPG signatures of the package checksums signed with a key that ships with the release?
Are package repos downloaded over HTTPS? Is there a CA bundle in the release with which repo x.509 certs are validated?
The OpenWRT firmware couldn't access https sites without installing multiple packages first. Then they had me install all the root certs over an unencrypted connection. The opkg repos and install files are all downloaded over http.
With full seriousness, I really hope nobody expects operational security using these routers.
This was a problem because of the bug. But now it isn't one anymore. 'opkg update' updates the package lists. The lists contain information about the packages: name, file size, architecture, description etc., and also the SHA256sum. When you install a package opkg will compare the SHA256sums.
Firmware releases are also signed with GPG: