addr_len was undefined