lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 01 Aug 2013 16:13:42 +0800
From:	Cong Wang <amwang@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	eric.dumazet@...il.com, netdev@...r.kernel.org,
	edumazet@...gle.com, ycheng@...gle.com, ncardwell@...gle.com
Subject: Re: [Patch net-next] tcp_metrics: rearrange fields to avoid holes

On Thu, 2013-08-01 at 00:15 -0700, David Miller wrote:
> From: Cong Wang <amwang@...hat.com>
> Date: Thu, 01 Aug 2013 10:48:31 +0800
> 
> > Please teach me how to do that?
> 
> struct inet_addr {
> 	union {
> 		u32	v4;
> 		u32	v6[4];
> 	};
> };
> 
> ie. exactly what that code is using already.
> 
> And it's called called inetpeer_addr, we have it already, there is no
> need to make something new.
> 
> Making this code use a structure with completely unnecessary and
> unused members is pointless and a step backwards.

Ah, I was thinking to keep it compatible with sockaddr*, actually this
is indeed unnecessary. I am going to define something like:

struct inet_addr_base {
        union {
                struct in_addr  sin_addr;
                struct in6_addr sin6_addr;
        };
        unsigned short int      sin_family;
};

which could used by bridge multicast code too.

Thanks for the hint.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ