Add urlencoding to ip address for redfish requests

This change applies to both IPv4 and IPv6 because
the specification permits it.

Test Plan:

PASS: Verify for both IPv4 and IPv6 addressing
PASS: Verify patched change for IPv4 and IPv6 cases.

Change-Id: I99dcb31c51dd287eed8eb3a038a1814763a4c600
Closes-Bug: #1852481
Signed-off-by: Eric MacDonald <eric.macdonald@windriver.com>
This commit is contained in:
Eric MacDonald 2019-11-15 12:14:31 -05:00
parent f48eae8f35
commit 66e8fbd747
1 changed files with 2 additions and 1 deletions

View File

@ -383,8 +383,9 @@ string redfishUtil_create_request ( string cmd,
command_request.append(" -T 30");
/* specify the bmc ip address */
command_request.append(" -r ");
command_request.append(" -r [");
command_request.append(ip);
command_request.append("]");
#ifdef WANT_INLINE_CREDS
if ( daemon_is_file_present ( MTC_CMD_FIT__INLINE_CREDS ) )