Revision: 14838
Author: adrian.chadd
Date: Tue Jan 11 17:46:15 2011
Log: Do the bare minimum needed to the ipcache API to allow the src/comm.c
routines to be ipv6-clean.
This means that the server-side path now is ipv6 happy - but only
with IPv6 socket addresses. IPv6 dns is now needed to properly
support full IPv6.
http://code.google.com/p/lusca-cache/source/detail?r=14838
Modified:
/playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c
/playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h
/playpen/LUSCA_HEAD_ipv6/src/comm.c
=======================================
--- /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c Sun Jul 4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.c Tue Jan 11 17:46:15 2011
@@ -565,10 +565,17 @@
* advance the current pointer to the next OK address.
*/
void
-ipcacheMarkBadAddr(const char *name, struct in_addr addr)
+ipcacheMarkBadAddr(const char *name, sqaddr_t *a)
{
ipcache_entry *i;
ipcache_addrs *ia;
+ struct in_addr addr;
+
+ if (sqinet_get_family(a) != AF_INET)
+ return;
+#warning ipcacheMarkBadAddr needs to be ipv6ed!
+ addr = sqinet_get_v4_inaddr(a, SQADDR_ASSERT_IS_V4);
+
int k;
if ((i = ipcache_get(name)) == NULL)
return;
@@ -589,10 +596,17 @@
}
void
-ipcacheMarkGoodAddr(const char *name, struct in_addr addr)
+ipcacheMarkGoodAddr(const char *name, sqaddr_t *a)
{
ipcache_entry *i;
ipcache_addrs *ia;
+ struct in_addr addr;
+
+ if (sqinet_get_family(a) != AF_INET)
+ return;
+#warning ipcacheMarkGoodAddr needs to be ipv6ed!
+ addr = sqinet_get_v4_inaddr(a, SQADDR_ASSERT_IS_V4);
+
int k;
if ((i = ipcache_get(name)) == NULL)
return;
=======================================
--- /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h Sun Jul 4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/libsqname/ipcache.h Tue Jan 11 17:46:15 2011
@@ -58,8 +58,8 @@
extern void ipcacheInvalidateNegative(const char *);
extern void ipcache_init(wordlist *testhosts);
extern void ipcacheCycleAddr(const char *name, ipcache_addrs *);
-extern void ipcacheMarkBadAddr(const char *name, struct in_addr);
-extern void ipcacheMarkGoodAddr(const char *name, struct in_addr);
+extern void ipcacheMarkBadAddr(const char *name, sqaddr_t *a);
+extern void ipcacheMarkGoodAddr(const char *name, sqaddr_t *a);
extern void ipcacheFreeMemory(void);
extern ipcache_addrs *ipcacheCheckNumeric(const char *name);
extern void ipcache_restart(void);
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/comm.c Tue Jan 11 17:18:58 2011
+++ /playpen/LUSCA_HEAD_ipv6/src/comm.c Tue Jan 11 17:46:15 2011
@@ -284,12 +284,12 @@
commSetSelect(fd, COMM_SELECT_WRITE, commConnectHandle, cs, 0);
break;
case COMM_OK:
- ipcacheMarkGoodAddr(cs->host, sqinet_get_v4_inaddr(&cs->in_addr6,
SQADDR_ASSERT_IS_V4));
+ ipcacheMarkGoodAddr(cs->host, &cs->in_addr6);
commConnectCallback(cs, COMM_OK);
break;
default:
cs->tries++;
- ipcacheMarkBadAddr(cs->host, sqinet_get_v4_inaddr(&cs->in_addr6,
SQADDR_ASSERT_IS_V4));
+ ipcacheMarkBadAddr(cs->host, &cs->in_addr6);
if (Config.onoff.test_reachability)
netdbDeleteAddrNetwork(&cs->in_addr6);
if (commRetryConnect(cs)) {
--
You received this message because you are subscribed to the Google Groups
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/lusca-commit?hl=en.