mirror of
https://github.com/ipmitool/ipmitool.git
synced 2026-06-28 16:21:35 +00:00
ID:336 - ipmitool does not fall back to IPv4 for IPMI v2 / RMCP+ sessions
Commit implements '-4' and '-6' switch in order to enforce IPv4 or IPv6 connection. In order to do so, struct ipmi_intf has been extended to carry ai_family flag.
This commit is contained in:
@@ -350,7 +350,7 @@ ipmi_intf_socket_connect(struct ipmi_intf * intf)
|
||||
sprintf(service, "%d", params->port);
|
||||
/* Obtain address(es) matching host/port */
|
||||
memset(&hints, 0, sizeof(hints));
|
||||
hints.ai_family = AF_UNSPEC; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_family = intf->ai_family; /* Allow IPv4 or IPv6 */
|
||||
hints.ai_socktype = SOCK_DGRAM; /* Datagram socket */
|
||||
hints.ai_flags = 0; /* use AI_NUMERICSERV for no name resolution */
|
||||
hints.ai_protocol = IPPROTO_UDP; /* */
|
||||
|
||||
Reference in New Issue
Block a user