- Tracing the 'real' source of an attack can be difficult. E.g. what if it's only being routed through China?
- This would only encourage a more 'locked down' Internet. Reducing the current open-ness of the Internet, and putting up strict national boundaries in order to make it easier to control/find attacks leaving your country so that they don't trigger a war.
First lesson in international law - there is no international law, because the actors involved are sovereign and only prolonged warfare can -sometimes- dislodge them, at massive cost. So open violations of international treaties, even on large scale, are let go without consequences. Say, for example, something between legal discrimination (at minimum denial of religious freedom, article 2 UNHR) and religious genocide is happening in most/all muslim countries (with countries like Morocco and Turkey "merely" discriminating and Sudan, Pakistan and Bangladesh regularly being accused of large-scale state-sponsored religious genocide). And it's not like most of those countries are even a real military threat.
For China the question may be simpler, of course. It is certainly, shall we say, "absorbing" a few of it's neighbors. Again, what are you going to do ?