Skip to content

Commit

Permalink
endpoint: Use resolved named port also in the proxy stats
Browse files Browse the repository at this point in the history
Commit 10f04fd (endpoint: Resolve named
ports for redirects) fixed redirect creation for L7 policies using a
named port, but failed to use the resolved destination port also in proxy
stats. This commit does that.

Fixes: cilium#29023
Signed-off-by: Jarno Rajahalme <jarno@isovalent.com>
  • Loading branch information
jrajahalme authored and julianwiedmann committed Dec 19, 2023
1 parent e5b1de4 commit a573bb4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/endpoint/bpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ func (e *Endpoint) addNewRedirectsFromDesiredPolicy(ingress bool, desiredRedirec
// Update the endpoint API model to report that Cilium manages a
// redirect for that port.
e.proxyStatisticsMutex.Lock()
proxyStats := e.getProxyStatisticsLocked(proxyID, string(l4.L7Parser), uint16(l4.Port), l4.Ingress)
proxyStats := e.getProxyStatisticsLocked(proxyID, string(l4.L7Parser), dstPort, l4.Ingress)
proxyStats.AllocatedProxyPort = int64(redirectPort)
e.proxyStatisticsMutex.Unlock()

Expand Down

0 comments on commit a573bb4

Please sign in to comment.