Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds a new condition, %{IP:<part>} #1620

Merged
merged 1 commit into from Apr 3, 2017
Merged

Conversation

zwoop
Copy link
Contributor

@zwoop zwoop commented Mar 29, 2017

This replaces the old %{CLIENT-IP}, and generalizes the access to
all four IP addresses. E.g.

cond %{SEND_RESPONSE_HDR_HOOK}
set-header X-Client-IP %{IP:CLIENT}
set-header X-Inbound-IP %{IP:INBOUND}
set-header X-Server-IP %{IP:SERVER}
set-header X-Outbound-IP %{IP:OUTBOUND}

In the case of a sockaddr not being populated, e.g. IP:SERVER on
a cache hit, the string is "" (empty).

This replaces the old %{CLIENT-IP}, and generalizes the access to
all four IP addresses. E.g.

cond %{SEND_RESPONSE_HDR_HOOK}
     set-header X-Client-IP %{IP:CLIENT}
     set-header X-Inbound-IP %{IP:INBOUND}
     set-header X-Server-IP %{IP:SERVER}
     set-header X-Outbound-IP %{IP:OUTBOUND}

In the case of a sockaddr not being populated, e.g. IP:SERVER on
a cache hit, the string is "" (empty).
@zwoop zwoop added the Plugins label Mar 29, 2017
@zwoop zwoop added this to the 7.2.0 milestone Mar 29, 2017
@atsci
Copy link

atsci commented Mar 29, 2017

RAT check successful! https://ci.trafficserver.apache.org/job/RAT-github/135/

@atsci
Copy link

atsci commented Mar 29, 2017

@atsci
Copy link

atsci commented Mar 29, 2017

@atsci
Copy link

atsci commented Mar 29, 2017

FreeBSD11 build successful! https://ci.trafficserver.apache.org/job/freebsd-github/1817/

@atsci
Copy link

atsci commented Mar 29, 2017

Linux build successful! https://ci.trafficserver.apache.org/job/linux-github/1708/

@atsci
Copy link

atsci commented Mar 29, 2017

Intel CC build successful! https://ci.trafficserver.apache.org/job/icc-github/247/

@atsci
Copy link

atsci commented Mar 29, 2017

clang-analyzer build successful! https://ci.trafficserver.apache.org/job/clang-analyzer-github/379/

@zwoop zwoop self-assigned this Mar 30, 2017

cond %{IP:<part>} <operand>

This is one of four possible IPs associated with the transaction, with the
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"IP" is "intellectual propety". I think you mean "IP addresses".

Copy link
Contributor

@vmamidi vmamidi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@SolidWallOfCode
Copy link
Member

You can commit it, but I'm going to modify the documents to use the correct term "IP address" instead of just "IP" which, sir, is wrong.

@zwoop zwoop merged commit 9746ceb into apache:master Apr 3, 2017
@zwoop zwoop deleted the ConditionIp branch April 21, 2017 17:15
@zwoop zwoop modified the milestones: 7.2.0, 8.0.0 Apr 25, 2017
@zwoop zwoop added this to Cherry-Picked in Iabalka Apr 25, 2017
@zwoop zwoop added this to 7.2.x candidates in 7.x releases Jul 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants