inet: refactor inet[6]_lookup functions to take skb