chiark
/
gitweb
/
~mdw
/
preload-hacks
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
cbf2884
)
noip: Don't try to support families other than AF_UNIX and AF_INET.
author
Mark Wooding
<mdw@distorted.org.uk>
Mon, 12 Jan 2009 17:21:58 +0000
(17:21 +0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Mon, 12 Jan 2009 17:37:12 +0000
(17:37 +0000)
If there's demand, I might try to hack in IPv6 later. But not now.
noip.c
patch
|
blob
|
blame
|
history
diff --git
a/noip.c
b/noip.c
index 38021db5df62099693ca4351bb960b57f48e2056..173d43f594774b5ca6aafe064310264916f4bd25 100644
(file)
--- 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)