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] [thread-next>] [day] [month] [year] [list]
Date:   Sun, 30 Sep 2018 09:37:20 -0600
From:   David Ahern <dsahern@...il.com>
To:     Stephen Hemminger <stephen@...workplumber.org>,
        David Ahern <dsahern@...nel.org>
Cc:     netdev@...r.kernel.org, christian@...uner.io
Subject: Re: [PATCH iproute2-next 01/11] libnetlink: Convert GETADDR dumps to
 use rtnl_addrdump_req

On 9/30/18 3:35 AM, Stephen Hemminger wrote:
> On Sat, 29 Sep 2018 10:59:21 -0700
> David Ahern <dsahern@...nel.org> wrote:
> 
>> From: David Ahern <dsahern@...il.com>
>>
>> Add rtnl_addrdump_req for address dumps using the proper ifaddrmsg
>> as the header. Convert existing RTM_GETADDR dumps to use it.
>>
>> Signed-off-by: David Ahern <dsahern@...il.com>
> 
>  }
>>  
>> +int rtnl_addrdump_req(struct rtnl_handle *rth, int family)
>> +{
>> +	struct {
>> +		struct nlmsghdr nlh;
>> +		struct ifaddrmsg ifm;
>> +	} req = {
>> +		.nlh.nlmsg_len = sizeof(req),
>> +		.nlh.nlmsg_type = RTM_GETADDR,
>> +		.nlh.nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST,
>> +		.nlh.nlmsg_seq = rth->dump = ++rth->seq,
>> +		.ifm.ifa_family = family,
>> +	};
> 
> 
> This could be:
> 	} req = {
> 		.nlh = {
> 			.nlmsg_len = sizeof(req),
> 			.nlmsg_type = RTM_GETADDR,
> ...
> 

I kept the inline because it is the style everywhere else in the
iproute2 code.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ