The presence of civilian use does not automatically make a target unlawful. What matters is whether the object effectively contributes to military operations.
Wolff Heintschel von Heinegg, Professor of Public Law, explains in an interview when attacks on civilian infrastructure during the war are permitted under international law and why direct attacks on civilians are always a war crime.