discover/network: Null terminate ifname buffer explicitly