Revision: 14795
Author: adrian.chadd
Date: Tue Sep  7 00:17:11 2010
Log: Fix some of the IPv6 ACL types.


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

Modified:
 /playpen/LUSCA_HEAD_ipv6/src/acl.c

=======================================
--- /playpen/LUSCA_HEAD_ipv6/src/acl.c  Mon Sep  6 22:29:42 2010
+++ /playpen/LUSCA_HEAD_ipv6/src/acl.c  Tue Sep  7 00:17:11 2010
@@ -2038,7 +2038,10 @@
     debug(28, 3) ("aclMatchAcl: checking '%s'\n", ae->cfgline);
     switch (ae->type) {
     case ACL_SRC_IP:
-       return aclMatchIp(&ae->data, &checklist->src_address);
+       if (sqinet_get_family(&checklist->my_address) == AF_INET)
+           return aclMatchIp(&ae->data, &checklist->src_address);
+       else
+           return 0;           /* Can't do an IPv4 lookup against IPv6 
"my_addr" */
        /* NOTREACHED */
     case ACL_MY_IP:
        if (sqinet_get_family(&checklist->my_address) == AF_INET)
@@ -2064,7 +2067,11 @@
        }
        /* NOTREACHED */
     case ACL_SRC_IP6:
-       return 0;       /* XXX for now; no v6 address to compare! */
+       if (sqinet_get_family(&checklist->my_address) == AF_INET6)
+           return aclMatchIp(&ae->data, &checklist->src_address);
+       else
+           return 0;           /* Can't do an IPv4 lookup against IPv6 
"my_addr" */
+       /* NOTREACHED */
     case ACL_MY_IP6:
        if (sqinet_get_family(&checklist->my_address) == AF_INET6)
            return aclMatchIp(&ae->data, &checklist->my_address);

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