Mercurial > pidgin.yaz
changeset 9430:30a812571a6b
[gaim-migrate @ 10250]
I haven't tested this, but it should be ok. Read my note.
Also, I'm using PF_INET instead of AF_INET for the reasons
given at
http://www.ecst.csuchico.edu/~beej/guide/net/html/syscalls.html#socket
(This is one of those things were it doesn't matter but
it feels more correct.)
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 30 Jun 2004 03:52:22 +0000 |
parents | a3e3c71d995a |
children | 33332a4f3a84 |
files | src/protocols/oscar/ft.c |
diffstat | 1 files changed, 15 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/oscar/ft.c Tue Jun 29 23:34:30 2004 +0000 +++ b/src/protocols/oscar/ft.c Wed Jun 30 03:52:22 2004 +0000 @@ -61,6 +61,20 @@ #include "win32dep.h" #endif +/* + * I really want to switch all our networking code to using IPv6 only, + * but that really isn't a good idea at all. Evan S. of Adium says + * OS X sets all connections as "AF_INET6/PF_INET6," even if there is + * nothing inherently IPv6 about them. And I feel like Linux kernel + * 2.6.5 is doing the same thing. So we REALLY should accept + * connections if they're showing up as IPv6. Old OSes (Solaris?) + * that might not have full IPv6 support yet will fail if we try + * to use PF_INET6 but it isn't defined. --Mark Doliner + */ +#ifndef PF_INET6 +#define PF_INET6 PF_INET +#endif + struct aim_odc_intdata { fu8_t cookie[8]; char sn[MAXSNLEN+1]; @@ -180,8 +194,7 @@ if ((acceptfd = accept(cur->fd, &addr, &addrlen)) == -1) return 0; /* not an error */ - /* Also accept inet6? */ - if (addr.sa_family != AF_INET) { + if ((addr.sa_family != PF_INET) && (addr.sa_family != PF_INET6)) { close(acceptfd); aim_conn_close(cur); return -1;