From: Mark Wooding Date: Mon, 12 Jan 2009 17:21:58 +0000 (+0000) Subject: noip: Don't try to support families other than AF_UNIX and AF_INET. X-Git-Tag: 1.0.4~2 X-Git-Url: https://git.distorted.org.uk/~mdw/preload-hacks/commitdiff_plain/8ce11853751d12c81fdd71a67af21e7c176c15e0?hp=cbf28846bbd475c3ba2f7da02679b96638020dd3 noip: Don't try to support families other than AF_UNIX and AF_INET. If there's demand, I might try to hack in IPv6 later. But not now. --- 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)