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

Fixes empty portmapping forward #7764

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Nino-K
Copy link
Member

@Nino-K Nino-K commented Nov 13, 2024

The API Tracker in guestAgent was calling certain functions without checking if portMapping had any entries. While this didn’t break the logic, it resulted in unnecessary function calls with empty portMapping, making the code less efficient and cluttering the logs with irrelevant information.

Fixes: #7763

Some of the logs outputs were encountering `*fmt.wrapError` type
`!w` in the logs. This change addresses the wrong format output.
Also, makes the logs in watcher_linux.go to match the rest of
log formats.

Signed-off-by: Nino Kodabande <[email protected]>
Vtunnel is no longer used, therefore, renaming the file
to forwarder.go

Signed-off-by: Nino Kodabande <[email protected]>
Previously, the portStorage.Add and WSLProxy.Send functions
were called with an empty portMapping. This change adds a check for the
length of portMapping before calling these functions, making sure they are
only invoked when necessary.

Signed-off-by: Nino Kodabande <[email protected]>
When portTracker.Add fails, we should simply continue without
attempting to recreate the loopback iptables rule.

Signed-off-by: Nino Kodabande <[email protected]>
@gunamata gunamata requested review from mook-as and removed request for mook-as November 13, 2024 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Address inefficiencies in guestAgent
1 participant