From 4b19a3321b2d1d7fe27b05728f720c9586787fd8 Mon Sep 17 00:00:00 2001 From: James R Date: Wed, 13 May 2020 15:29:17 -0700 Subject: [PATCH] Bind HMS connection with -bindaddr --- src/hms123311.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/hms123311.c b/src/hms123311.c index 6b1044176..b7db4d909 100644 --- a/src/hms123311.c +++ b/src/hms123311.c @@ -19,6 +19,7 @@ Documentation available here. #include "doomdef.h" #include "d_clisrv.h" #include "command.h" +#include "m_argv.h" #include "m_menu.h" #include "mserv.h" #include "i_tcp.h"/* for current_port */ @@ -144,6 +145,11 @@ HMS_connect (const char *format, ...) curl_easy_setopt(curl, CURLOPT_STDERR, logstream); } + if (M_CheckParm("-bindaddr") && M_IsNextParm()) + { + curl_easy_setopt(curl, CURLOPT_INTERFACE, M_GetNextParm()); + } + curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); curl_easy_setopt(curl, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);