A landowner of land where livestock are kept or an owner of adjoining land shall be liable to erect or maintain a fence if the livestock trespasses upon the land of a neighboring landowner or strays from the land where the livestock are kept onto a public road, as provided in section 169C.6.