[CalendarServer-changes] [14714] CalendarServer/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon Apr 27 12:05:30 PDT 2015


Revision: 14714
          http://trac.calendarserver.org//changeset/14714
Author:   cdaboo at apple.com
Date:     2015-04-27 12:05:30 -0700 (Mon, 27 Apr 2015)
Log Message:
-----------
Fix cross-pod IPv6 address issue.

Modified Paths:
--------------
    CalendarServer/trunk/conf/localservers-test.xml
    CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py

Modified: CalendarServer/trunk/conf/localservers-test.xml
===================================================================
--- CalendarServer/trunk/conf/localservers-test.xml	2015-04-27 18:24:50 UTC (rev 14713)
+++ CalendarServer/trunk/conf/localservers-test.xml	2015-04-27 19:05:30 UTC (rev 14714)
@@ -22,13 +22,17 @@
   <server>
     <id>A</id>
     <uri>http://localhost:8008</uri>
-    <allowed-from>localhost</allowed-from>
+    <allowed-from>127.0.0.1</allowed-from>
+    <allowed-from>::1</allowed-from>
+    <allowed-from>::ffff:127.0.0.1</allowed-from>
     <shared-secret>A</shared-secret>
   </server>
   <server>
     <id>B</id>
     <uri>http://localhost:8108</uri>
-    <allowed-from>localhost</allowed-from>
+    <allowed-from>127.0.0.1</allowed-from>
+    <allowed-from>::1</allowed-from>
+    <allowed-from>::ffff:127.0.0.1</allowed-from>
     <shared-secret>B</shared-secret>
   </server>
 </servers>

Modified: CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py
===================================================================
--- CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py	2015-04-27 18:24:50 UTC (rev 14713)
+++ CalendarServer/trunk/txdav/caldav/datastore/scheduling/ischedule/localservers.py	2015-04-27 19:05:30 UTC (rev 14714)
@@ -15,7 +15,7 @@
 ##
 
 from twext.python.log import Logger
-from twisted.internet.abstract import isIPAddress
+from twisted.internet.abstract import isIPAddress, isIPv6Address
 from twistedcaldav.client.pool import installPool
 from twistedcaldav.config import config, fullServerPath
 from twistedcaldav.xmlutil import readXML
@@ -182,7 +182,7 @@
 
         actual_ips = set()
         for item in self.allowed_from_ips:
-            if not isIPAddress(item):
+            if not isIPAddress(item) and not isIPv6Address(item):
                 try:
                     ips = getIPsFromHost(item)
                 except socket.gaierror, e:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-changes/attachments/20150427/5cd30b7a/attachment.html>


More information about the calendarserver-changes mailing list