Skip to content

session server BUGFIX allow binding on missing address#606

Merged
michalvasko merged 1 commit into
CESNET:develfrom
jeremie6wind:devel
May 25, 2026
Merged

session server BUGFIX allow binding on missing address#606
michalvasko merged 1 commit into
CESNET:develfrom
jeremie6wind:devel

Conversation

@jeremie6wind
Copy link
Copy Markdown
Contributor

Use the IPPROTO_IP/IPPROTO_IPV6 on the socket to allow the bind even if the address is not ready.

Copy link
Copy Markdown
Member

@michalvasko michalvasko left a comment

Choose a reason for hiding this comment

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

I do not have an issue with using this option, generally, but perhaps it should not be used by default. If you make a typo in the address in the configuration, it may result in much more difficult debugging. Also, there may be compatibility issues and this option not supported on all the platforms so it may be worth adding a new check to cmake.

Comment thread src/session_server.c Outdated
Copy link
Copy Markdown
Member

@michalvasko michalvasko left a comment

Choose a reason for hiding this comment

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

Thanks for the improvements but I would appreciate if, in case the feature is enabled, the availability of the socket option is also checked in cmake. Should be fairly simple.

Comment thread src/config.h.in Outdated
Comment thread src/session_server.c Outdated
Copy link
Copy Markdown
Member

@michalvasko michalvasko 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, thanks. Just a minor formatting issue.

Comment thread src/session_server.c
Add a cmake option to use IP_FREEBIND/IPV6_FREEBIND options.
Use the IP_FREEBIND/IPV6_FREEBIND on the socket to allow the bind even
if the address is not ready.

Signed-off-by: Jeremie Leska <jeremie.leska@6wind.com>
@michalvasko michalvasko merged commit 235f60d into CESNET:devel May 25, 2026
11 checks passed
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.

3 participants