I think that getent is enough in this usecase. Only behavior without a "db key" (an IP here) is not obvious, but it doesn't hurt here.