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.

Reply via email to