Accept both adr and addr to extract local IP

Correct bug #21