# HG changeset patch # User Mark Doliner # Date 1088567542 0 # Node ID 30a812571a6b2f76d56364f143868045574be921 # Parent a3e3c71d995a971e0cff7a1db3169c7521169950 [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 diff -r a3e3c71d995a -r 30a812571a6b src/protocols/oscar/ft.c --- 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;