From 8ce11853751d12c81fdd71a67af21e7c176c15e0 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 12 Jan 2009 17:21:58 +0000 Subject: [PATCH] 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. --- noip.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) 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) -- 2.11.0