Problematic port field in struct ip_service in Samba.

Andreas Schneider asn at
Fri Jul 17 05:58:38 UTC 2020

On Friday, 17 July 2020 00:26:00 CEST Jeremy Allison via samba-team wrote:
> Hi Team & all interested parties,

Hi Jeremy,

> Eventually I'd like to replace all
> uses of struct ip_service -> struct sockaddr_storage,
> but that's a bigger cleanup for another
> day.. :-).

we actually should replace this with `struct samba_sockaddr`
to avoid strict aliasing issues!

See lib/util/util_net.h for `struct samba_sockaddr`


I've just recently had to fix a crash on arm in nss_wrapper which was caused 
by not following strict aliasing rules:

Best regards,


Andreas Schneider                      asn at
Samba Team                   
GPG-ID:     8DFF53E18F2ABC8D8F3C92237EE0FC4DCC014E3D

More information about the samba-technical mailing list