The best advice is not to fly. That keeps you from spreading germs and lessens the possibility of lasting ear problems.
And I know of what I speak. I popped an eardrum three years ago and things weren't totally healed for several months. In addition to pain and some temporary hearing problems, I was kept on antibiotics for close to a month (til the eardrum sealed) and had to pay for bi-weekly drs visits, to ensure there was no infection. Not to mention a few assorted work problems, as I had to avoid a few loud recording sessions and shows.
No lasting harm, but there is potential for hearing loss in these cases.
I was advised to ALWAYS begin a cycle of decongestants 24-36 hours before a flight. (Even if I am feeling well---allergies caused my congestion, not a virus.) Over the counters will do, though I'm now on a heavy duty one.
The upside is these decongestants force you to drink more water.