Merge #11744: net: Add missing locks in net.{cpp,h}