Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [Ipsec-tools-devel] racoon+NAT-T and racoon+debug+IPv6 not so happy?



On Wed, Oct 29, 2008 at 01:16:24PM +0100, S.P.Zeidler wrote:
> diff -u -r1.36 ipsec_doi.c
> --- ipsec_doi.c       14 Jul 2008 05:45:15 -0000      1.36
> +++ ipsec_doi.c       29 Oct 2008 12:13:07 -0000

> -             saddr.sa_len = sizeof(struct sockaddr_in);
> +             ((struct sockaddr *)&saddr)->sa_len = sizeof(struct 
> sockaddr_in);

> -             saddr.sa_family = AF_INET;
> +             ((struct sockaddr *)&saddr)->sa_family = AF_INET;

> -             saddr.sa_len = sizeof(struct sockaddr_in6);
> +             ((struct sockaddr *)&saddr)->sa_len = sizeof(struct 
> sockaddr_in6);

> -             saddr.sa_family = AF_INET6;
> +             ((struct sockaddr *)&saddr)->sa_family = AF_INET6;

etc.

Why obfucate the code with pointless casts?  sockaddr_storage has perfectly
good ss_len and ss_family members.

--chris


Home | Main Index | Thread Index | Old Index