Ear infection ?

How do you know if your baby has an ear infection since yesterday she’s been fussy she doesn’t stay still and has trouble staying asleep and keeps rubbing her ear