It shall be unlawful for the owner of any livestock to allow such livestock to run at large or be upon any United States military reservation upon which field artillery firing or other target practice with military weapons is conducted. Any owner who permits livestock to run at large or be upon any such reservation shall do so at the risk of such owner and such owner shall have no claim for damages if such livestock is injured or destroyed while so running at large on such reservation: PROVIDED, HOWEVER, That the commanding officer of any such United States military reservation may issue permits for specific areas and for specific periods of time when firing will not be conducted thereon authorizing the owner of such livestock to permit the same to run at large or be upon any such military reservation.