Fixed automatic ip address calculation
* Previously this would return the ip address of the default gateway NOT the interface
Merge pull request #736 from rnavarro/master

Fix for automatic gateway interface IP calculation