A suggestion- Bear Spray. All you have to do is get close to your target. Shooting a firearm can cause you all sorts of potential legal problems and hassles even if you are legally justified!! As a USFS volunteer our LEOs recommend using it for self defense in last resort situations. Its non-lethal and works very well on Dogs, People as well as bears. I have a couple of out of date cans that I carry in our vests.
I would strongly recommend some type of legal contact. What if you had been A CHILD!
As a campground host, I get an average 2-3 dog "charges" a summer by "FRIENDLY" dogs. When the owners get upset over my pulling the spray, My comment is what if a child had been riding a bike or scooter instead of me.