sm-notify: Support creating a PF_INET6 socket in smn_create_socket()
authorChuck Lever <chuck.lever@oracle.com>
Thu, 14 Jan 2010 17:22:33 +0000 (12:22 -0500)
committerSteve Dickson <steved@redhat.com>
Fri, 15 Jan 2010 19:55:51 +0000 (14:55 -0500)
commitf867499c8521a957776d52a9657b15fa7c2a513f
tree7a4281eaa6747cf641fe601c8574a965eb449b42
parent56f9d50712481ed0f84f26e3a9f9dd012cf1995f
sm-notify: Support creating a PF_INET6 socket in smn_create_socket()

Socket creation is unfortunately complicated by the need to handle the
case where sm-notify is built with IPv6 support, but the local system
has disabled it entirely at run-time (ie, socket(3) returns
EAFNOSUPPORT when we try to create an AF_INET6 socket).

The run-time address family setting is made available in the global
variable nsm_family.  This setting can control the family of the
socket's bind address and what kind of addresses we want returned by
smn_lookup().  Support for that is added in subsequent patches.

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