If you're on a public road, and the dog owner negligently fails to restrain said dog, he'd have to pay damages. Trouble is, most of the morons out there don't have insurance or any money.
So you need to keep a sharp eye out, and when you see dog(s) attacking, squirt some suppression fire out of your water bottle at them. Works every time.