I successfully used this lib for entering my net namespace (for example - myns0), but there is no DNS at all inside it.
Of course I have a valid resolv.conf in /etc/netns/myns0/ and it works well when I call commands in shell like "ip netns exec myns0 ping google.com".