pud: fix readIPAddress function