Fix up bugs in IP query

the problem was we don't implement access(2) yet

Signed-off-by: Ronald G. Minnich <rminnich@google.com>