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

Support IPv6 #213

Merged
merged 7 commits into from
Mar 19, 2024
Merged

Support IPv6 #213

merged 7 commits into from
Mar 19, 2024

Conversation

petrkr
Copy link
Contributor

@petrkr petrkr commented Mar 11, 2024

Redone TCP connect function. Get rid of deprecated gethostbyname function and replaced it by getaddrinfo, which makes also work IPv6 out-of-box.

Tested

  • IPv4
  • IPv6
  • Hostname (both IPv4 and IPv6)

All working.

mbus/mbus-tcp.c Outdated Show resolved Hide resolved
mbus/mbus-tcp.c Outdated Show resolved Hide resolved
mbus/mbus-tcp.c Outdated Show resolved Hide resolved
mbus/mbus-tcp.c Outdated Show resolved Hide resolved
…thostbyname

Signed-off-by: Petr Kracík <petrkr@petrkr.net>
Signed-off-by: Petr Kracík <petrkr@petrkr.net>
Signed-off-by: Petr Kracik <petrkr@petrkr.net>
Signed-off-by: Petr Kracik <petrkr@petrkr.net>
@petrkr
Copy link
Contributor Author

petrkr commented Mar 11, 2024

Rebased to latest master, added port range check, put max size to definition, use snprintf instead of sprintf. Updated code style to match rest of code

mbus/mbus-tcp.c Outdated Show resolved Hide resolved
mbus/mbus-tcp.c Outdated Show resolved Hide resolved
@lategoodbye lategoodbye merged commit cb28aca into rscada:master Mar 19, 2024
@lategoodbye lategoodbye mentioned this pull request Mar 19, 2024
@petrkr petrkr deleted the ipv6 branch March 22, 2024 19:44
Apollon77 pushed a commit to Apollon77/libmbus that referenced this pull request Mar 26, 2024
* Rewritten TCP connection to support IPv6 and get rid of deprecated gethostbyname

Signed-off-by: Petr Kracík <petrkr@petrkr.net>

(cherry picked from commit cb28aca)
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.

2 participants