Revision: 14790
Author: adrian.chadd
Date: Mon Sep 6 19:36:27 2010
Log: Back out the previous commit and split the asn match routine into
normal and legacy.
http://code.google.com/p/lusca-cache/source/detail?r=14790
Modified:
/playpen/LUSCA_HEAD_ipv6/src/asn.c
/playpen/LUSCA_HEAD_ipv6/src/protos.h
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/asn.c Mon Sep 6 19:33:56 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/asn.c Mon Sep 6 19:36:27 2010
@@ -80,22 +80,29 @@
/* PUBLIC */
+
int
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;
+ struct in_addr a;
#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);
+ a = sqinet_get_v4_inaddr(v6addr, SQADDR_ASSERT_IS_V4);
+ return asnMatchIp4(data, a);
+}
+
+int
+asnMatchIp4(void *data, struct in_addr addr)
+{
+ as_info *e;
+ intlist *a = NULL;
+ intlist *b = NULL;
+ prefix_t *p;
+ radix_node_t *n;
debug(53, 3) ("asnMatchIp: Called for %s.\n", inet_ntoa(addr));
=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/protos.h Mon Sep 6 19:33:56 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/protos.h Mon Sep 6 19:36:27 2010
@@ -823,6 +823,7 @@
extern int errorPageId(const char *page_name);
extern int asnMatchIp(void *, sqaddr_t *);
+extern int asnMatchIp4(void *, struct in_addr);
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.