Fixed automatic ip address calculation
* Previously this would return the ip address of the default gateway NOT the interface