fly-snapping
Repeated snapping at non-existent flying things can be associated with ear infections. Sometimes it's simply a behaviour problem or a habit caused by boredom that can be alleiviated by behavioural modification techniques.
SOURCE: dogs.consultinghealth.com

|