You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by "zwoop (via GitHub)" <gi...@apache.org> on 2025/07/23 09:45:55 UTC

[PR] Cripts: Add Geo APIs to the cripts::IP object [trafficserver]

zwoop opened a new pull request, #12383:
URL: https://github.com/apache/trafficserver/pull/12383

   This is step 1 towards a clean / simple abstraction where the effective IP (either from socket, or PROXY protocol, or a header) can be used to do Geo ACLs / lookups.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Add Geo APIs to the cripts::IP object [trafficserver]

Posted by "zwoop (via GitHub)" <gi...@apache.org>.
zwoop merged PR #12383:
URL: https://github.com/apache/trafficserver/pull/12383


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Add Geo APIs to the cripts::IP object [trafficserver]

Posted by "Copilot (via GitHub)" <gi...@apache.org>.
Copilot commented on code in PR #12383:
URL: https://github.com/apache/trafficserver/pull/12383#discussion_r2225004846


##########
src/cripts/Connections.cc:
##########
@@ -142,6 +142,14 @@ IP::GetSV(unsigned ipv4_cidr, unsigned ipv6_cidr)
   return "";
 }
 
+sockaddr
+IP::Socket() const
+{
+  sockaddr addr;

Review Comment:
   The sockaddr structure is not properly initialized before use. This could lead to undefined behavior when copy_to() is called. Initialize the structure with memset or use zero-initialization: `sockaddr addr = {};`
   ```suggestion
     sockaddr addr = {};
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Cripts: Add Geo APIs to the cripts::IP object [trafficserver]

Posted by "bneradt (via GitHub)" <gi...@apache.org>.
bneradt commented on code in PR #12383:
URL: https://github.com/apache/trafficserver/pull/12383#discussion_r2237881294


##########
doc/developer-guide/cripts/cripts-connections.en.rst:
##########
@@ -154,8 +180,40 @@ accessed via the ``Log()`` method. See the ``tcpinfo`` plugin in ATS for details
 Geo-IP
 ======
 
-If ATS has been built with Geo-IP support, the connection object will provide access to the Geo-IP
-data for the connection. The following methods will then be available:
+If ATS has been built with Geo-IP support, both connection objects and IP objects will provide

Review Comment:
   `ATS` -> `|TS|`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org