X-Git-Url: https://git.distorted.org.uk/~mdw/preload-hacks/blobdiff_plain/cbf28846bbd475c3ba2f7da02679b96638020dd3..8ce11853751d12c81fdd71a67af21e7c176c15e0:/noip.c diff --git a/noip.c b/noip.c index 38021db..173d43f 100644 --- a/noip.c +++ b/noip.c @@ -831,11 +831,16 @@ done: int socket(int pf, int ty, int proto) { - if (pf == PF_INET) { - pf = PF_UNIX; - proto = 0; + switch (pf) { + case PF_INET: + pf = PF_UNIX; + proto = 0; + case PF_UNIX: + return real_socket(pf, ty, proto); + default: + errno = EAFNOSUPPORT; + return -1; } - return real_socket(pf, ty, proto); } int socketpair(int pf, int ty, int proto, int *sk)