Re: [PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread Serhey Popovych
David Ahern wrote: > On 2/15/18 11:34 AM, Serhey Popovych wrote: >> Be consistent in handling of IFLA_IFNAME attribute in all places: if >> there is no attribute report bug to stderr and use ll_idx_n2a() as >> last measure to get name in "if%u" format instead of "". >> >> Use check_ifname() to

Re: [PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread David Ahern
On 2/15/18 11:34 AM, Serhey Popovych wrote: > Be consistent in handling of IFLA_IFNAME attribute in all places: if > there is no attribute report bug to stderr and use ll_idx_n2a() as > last measure to get name in "if%u" format instead of "". > > Use check_ifname() to validate network device

[PATCH iproute2-next v4 7/9] utils: Introduce and use get_ifname_rta()

2018-02-15 Thread Serhey Popovych
Be consistent in handling of IFLA_IFNAME attribute in all places: if there is no attribute report bug to stderr and use ll_idx_n2a() as last measure to get name in "if%u" format instead of "". Use check_ifname() to validate network device name: this catches both unexpected return from kernel and