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]
Message-ID: <e2591670-0398-fb81-ebe6-2c568db298a0@gmail.com>
Date:   Thu, 1 Feb 2018 08:40:58 -0700
From:   David Ahern <dsahern@...il.com>
To:     Serhey Popovych <serhe.popovych@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2-next v2 5/6] utils: Introduce and use
 print_name_and_link() to print name@...k

On 2/1/18 4:09 AM, Serhey Popovych wrote:
> David Ahern wrote:
>>> diff --git a/bridge/link.c b/bridge/link.c
>>> index a11cbb1..90c9734 100644
>>> --- a/bridge/link.c
>>> +++ b/bridge/link.c
>>> @@ -125,20 +125,13 @@ int print_linkinfo(const struct sockaddr_nl *who,
>>>  	if (n->nlmsg_type == RTM_DELLINK)
>>>  		fprintf(fp, "Deleted ");
>>>  
>>> -	fprintf(fp, "%d: %s ", ifi->ifi_index,
>>> -		tb[IFLA_IFNAME] ? rta_getattr_str(tb[IFLA_IFNAME]) : "<nil>");
>>> +	fprintf(fp, "%d: ", ifi->ifi_index);
>>> +
>>> +	print_name_and_link("%s: ", COLOR_NONE, name, tb);
>>
>> It only needs tb[IFLA_LINK] so just pass it. Makes the arg list
>> consistent with the function name too.
>>
> 
> Unfortunately not only: it uses IFLA_LINK_NETNSID too. May be adding
> "_rta" suffix to this routine as we did in the past when introducing
> get_addr_rta() and similar routines? In my opinion this is preferred
> than adding one more parameters to the routine.

ok, tb arg is fine. I missed the IFLA_LINK_NETNSID case.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ