Hi, I came across this and believe it is a bug. I have found that when you set str to an IPv4 addr of the from "xxx.xxx.xxx.xxx' while the address family is AF_INET6, then instead of returning a 0 to indicate an invalid IPv6 string, it is converted to gibberish. inet_pton(AF_INET6, "192.168.1.1', &sa) should return 0 if I understand the specification correctly. Regards Paul