~mdw
/
preload-hacks
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
noip: Don't try to support families other than AF_UNIX and AF_INET.
[preload-hacks]
/
noip.c
diff --git
a/noip.c
b/noip.c
index
38021db
..
173d43f
100644
(file)
--- a/
noip.c
+++ b/
noip.c
@@
-831,11
+831,16
@@
done:
int socket(int pf, int ty, int proto)
{
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)
}
int socketpair(int pf, int ty, int proto, int *sk)