fix: correct listening status display on the firewall page#12516
fix: correct listening status display on the firewall page#12516ssongliu merged 1 commit into1Panel-dev:dev-v2from
Conversation
The bug only appeared when the same process had both TCP and UDP sockets: every listening port on that process was attributed to whichever protocol was encountered first. For example, if a process listened on TCP 8000 and UDP 8001, the UI could wrongly show TCP 8001 as in use while UDP 8001 looked unused. Use (PID, conn.Type) as the cache key so each protocol has its own ListeningProcess entry.
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
What this PR does / why we need it?
The bug only appeared when the same process had both TCP and UDP sockets: every listening port on that process was attributed to whichever protocol was encountered first. For example, if a process listened on TCP 8000 and UDP 8001, the UI could wrongly show TCP 8001 as in use while UDP 8001 looked unused.

Summary of your change
Use (PID, conn.Type) as the cache key so each protocol has its own ListeningProcess entry.
Please indicate you've done the following: