Look at subnets, not interfaces, for gateway

Look at the subnet settings to determine the IPs we have on each network,
instead of looking at the interface settings which might not yet be populated
fully.

Change-Id: I2318c3037cd9a2cd959bd238835a0d605560c110