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

Fix.listen ipv6 #321

Closed
wants to merge 2 commits into from
Closed

Fix.listen ipv6 #321

wants to merge 2 commits into from

Conversation

newgenid
Copy link

Hello.

fmt.Sprintf("%s:%d", addr, port) works incorrect for ipv6 addr.
For example, if addr = "::", port = 444, this code returns ":::444". The ":::444" is incorrect address for using in reuseport.ListenPacket().

net.JoinHostPort() supports ipv6 addresses and returns "[host]:port".

Without this fix UDPReceiver does not work with ipv6 addresses.

Thank you.

newgenid added 2 commits May 7, 2024 13:31

Verified

This commit was signed with the committer’s verified signature.
ihipop ihipop

Verified

This commit was signed with the committer’s verified signature.
ihipop ihipop
@lspgn
Copy link
Member

lspgn commented May 19, 2024

Thank you for the details
I could have reopened #316 but will move forward with this one once I check it

@lspgn
Copy link
Member

lspgn commented May 19, 2024

Ok I dived into the code. Would be great to also add ways to break the application.
Ended up finding a different bug and was fearing a regression.

  • it won't break passing a -listen sflow://locahost:6343
  • but there is no need to use the net function. It just checks if : are present
  • currently, the following -listen sflow://::1:6343 is not detected as a bad arguments to GoFlow2
    • the errors are not being intercepted properly

@lspgn
Copy link
Member

lspgn commented Aug 18, 2024

Should be fixed with #323

@lspgn lspgn closed this Aug 18, 2024
@newgenid
Copy link
Author

Thank you.

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.

None yet

2 participants