fixed socket wrapper to determine family from the right structure
authorAndrew Tridgell <tridge@samba.org>
Tue, 9 Jun 2009 03:33:09 +0000 (13:33 +1000)
committerAndrew Tridgell <tridge@samba.org>
Tue, 9 Jun 2009 03:33:09 +0000 (13:33 +1000)
commit03dd06de9ae7b3692fd2ab141c0522abacbaec31
tree86d68f0f030e492af0c65fbc7dc7598d4c006bef
parent4b0658d4486d60c82c989ed0b6c806dfc45edbac
fixed socket wrapper to determine family from the right structure

In convert_in_un_remote() the socket family can be accessed either as
si->family or inaddr->sa_family. We were using the si->family to
determine how to cast the inaddr structure, but if si->family !=
inaddr->sa_family then we will incorrectly be casting a in6 structure
as in4 or vice-versa.
lib/socket_wrapper/socket_wrapper.c