Fix exported ip address refrencing top scope

$exported_ipaddress is a local variable and does not exist as $::exported_ipaddress