sm-notify: Use getaddrinfo(3) to create bind address in smn_create_socket()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 14 Jan 2010 17:22:59 +0000 (12:22 -0500)
committerSteve Dickson <steved@redhat.com>
Fri, 15 Jan 2010 19:55:51 +0000 (14:55 -0500)
commit51fdac83e3afd86d0885c6b83123758708da61b1
treed30107a3847cff311edff9aa2ea798105579f12b
parent86cfdf1d38da18f9f917c674daba79a4435445a7
sm-notify: Use getaddrinfo(3) to create bind address in smn_create_socket()

This patch updates the "bind to a user-specified port" arm of
smn_create_socket() so it can deal with IPv6 bind addresses.

A single getaddrinfo(3) call can convert a user-specified bind address
or hostname to a socket address, optionally plant a provided port
number, or whip up an appropriate wildcard address for use as the main
socket's bind address.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
utils/statd/sm-notify.c