changed ipaddr logic to accept interfaces other than eth0