Revision: 14789
Author: adrian.chadd
Date: Mon Sep  6 19:33:56 2010
Log: Modify the ASN code to be ipv6 "aware"


http://code.google.com/p/lusca-cache/source/detail?r=14789

Modified:
 /playpen/LUSCA_HEAD_ipv6/src/asn.c
 /playpen/LUSCA_HEAD_ipv6/src/protos.h

=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/asn.c  Sun Jul  4 06:56:53 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/asn.c  Mon Sep  6 19:33:56 2010
@@ -81,13 +81,21 @@
 /* PUBLIC */

 int
-asnMatchIp(void *data, struct in_addr addr)
+asnMatchIp(void *data, sqaddr_t *v6addr)
 {
     as_info *e;
     intlist *a = NULL;
     intlist *b = NULL;
     prefix_t *p;
     radix_node_t *n;
+    struct in_addr addr;
+
+#warning ASN code needs to be made ipv6 aware
+
+    if (sqinet_get_family(v6addr) != AF_INET)
+        return 0;
+
+    addr = sqinet_get_v4_inaddr(v6addr, SQADDR_ASSERT_IS_V4);

     debug(53, 3) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr));

=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/protos.h       Thu Sep  2 18:24:55 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/protos.h       Mon Sep  6 19:33:56 2010
@@ -822,7 +822,7 @@
 extern void errorSetAddr4(ErrorState *err, struct in_addr ip);
 extern int errorPageId(const char *page_name);

-extern int asnMatchIp(void *, struct in_addr);
+extern int asnMatchIp(void *, sqaddr_t *);
 extern void asnInit(void);
 extern void asnFreeMemory(void);

--
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.

Reply via email to