There are several different sources for a mod like that
known as RSCS filter. The prblem with that thing is that it
only works in cases of separating "subnetworks" from a backbone.
It could not be used for example at PSUVM to check whether
a file comes from "Europe". Even at CUNYVM or ar GWUVM a file
from "Europe" can arrive via two links.
Be careful using such a thing when there is a possibility of
routing changes.