Commit 1a531671 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Fix SCTP_I_WANT_MAPPED_V4_ADDR behavior when IPv6 is disabled in config; thank...

Fix SCTP_I_WANT_MAPPED_V4_ADDR behavior when IPv6 is disabled in config; thank you Michael Tuexen for the issue report \& patch.
parent d8f5ec37
Pipeline #1664 skipped
...@@ -408,7 +408,7 @@ static int fd_setsockopt_prebind(int sk) ...@@ -408,7 +408,7 @@ static int fd_setsockopt_prebind(int sk)
/* Set the v4 mapped addresses option */ /* Set the v4 mapped addresses option */
#ifdef SCTP_I_WANT_MAPPED_V4_ADDR #ifdef SCTP_I_WANT_MAPPED_V4_ADDR
{ if (!fd_g_config->cnf_flags.no_ip6) {
int v4mapped; int v4mapped;
if (TRACE_BOOL(SCTP_LEVEL)) { if (TRACE_BOOL(SCTP_LEVEL)) {
...@@ -437,6 +437,8 @@ static int fd_setsockopt_prebind(int sk) ...@@ -437,6 +437,8 @@ static int fd_setsockopt_prebind(int sk)
CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) ); CHECK_SYS( getsockopt(sk, IPPROTO_SCTP, SCTP_I_WANT_MAPPED_V4_ADDR, &v4mapped, &sz) );
fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false"); fd_log_debug( "New SCTP_I_WANT_MAPPED_V4_ADDR value : %s\n", v4mapped ? "true" : "false");
} }
} else {
TRACE_DEBUG(SCTP_LEVEL, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR, since IPv6 disabled.");
} }
#else /* SCTP_I_WANT_MAPPED_V4_ADDR */ #else /* SCTP_I_WANT_MAPPED_V4_ADDR */
TRACE_DEBUG(SCTP_LEVEL, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR"); TRACE_DEBUG(SCTP_LEVEL, "Skipping SCTP_I_WANT_MAPPED_V4_ADDR");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment