def interface_lookup(interfaces, hwaddr, address_type):
    """Search the address within the interface list."""
    for interface in interfaces.values():
        if interface.get('hwaddr') == hwaddr:
            for address in interface.get('addrs'):
                if address.get('type') == address_type:
                    return address.get('addr')
