In the case of Iran Air flight 655 we made radio challenges to the aircraft and received no response before firing on it. There is no evidence that MH17 received any warning they were about to be fired upon.
We thought Iran Air 655 was an enemy fighter jet, but the Russians thought MH17 was a Ukrainian transport plane, not a fighter or a bomber.
When our aircraft carrier fired on Iran Air 655, it had just been attacked by Iranian gunboats. The Russians who shot down MH17 were not provoked by any Ukrainian attack. Ukraine has not attacked Russia.
In 1988 we were not invading Iran, like Russian forces have invaded Ukraine. Our forces were in the Persian Gulf for defensive, not offensive purposes. Russian forces have invaded Ukraine for the purposes of hostile conquest.