Use db model hook to filter external network

Fixes bug 1132849

Change-Id: I47e01a11afaf6e6bcf06da7bd713fd39b05600ff
Merge "Use db model hook to filter external network"