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:   Tue, 22 Jun 2021 13:24:44 +0300
From:   Sergey Ryazanov <ryazanov.s.a@...il.com>
To:     Loic Poulain <loic.poulain@...aro.org>
Cc:     David Ahern <dsahern@...il.com>,
        Stephen Hemminger <stephen@...workplumber.org>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [PATCH iproute2-next 1/2] iplink: add support for parent device

On Tue, Jun 22, 2021 at 9:46 AM Loic Poulain <loic.poulain@...aro.org> wrote:
> On Tue, 22 Jun 2021 at 02:32, Sergey Ryazanov <ryazanov.s.a@...il.com> wrote:
>> Add support for specifying a parent device (struct device) by its name
>> during the link creation and printing parent name in the links list.
>> This option will be used to create WWAN links and possibly by other
>> device classes that do not have a "natural parent netdev".
>>
>> Add the parent device bus name printing for links list info
>> completeness. But do not add a corresponding command line argument, as
>> we do not have a use case for this attribute.
>>
>> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@...il.com>
>> ---
>>  ip/ipaddress.c | 14 ++++++++++++++
>>  ip/iplink.c    |  6 +++++-
>>  2 files changed, 19 insertions(+), 1 deletion(-)
>>
>> diff --git a/ip/ipaddress.c b/ip/ipaddress.c
>> index 06ca7273..7dc38ff1 100644
>> --- a/ip/ipaddress.c
>> +++ b/ip/ipaddress.c
>> @@ -1242,6 +1242,20 @@ int print_linkinfo(struct nlmsghdr *n, void *arg)
>>                 }
>> +
>> +               if (tb[IFLA_PARENT_DEV_BUS_NAME]) {
>> +                       print_string(PRINT_ANY,
>> +                                    "parentdevbus",
>
> Parav suggested previously to simply name it 'parentbus'.

Khm. Sounds reasonable. Will do it in V3.

>> +                                    "parentdevbus %s ",
>> +                                    rta_getattr_str(tb[IFLA_PARENT_DEV_BUS_NAME]));
>> +               }
>> +
>> +               if (tb[IFLA_PARENT_DEV_NAME]) {
>> +                       print_string(PRINT_ANY,
>> +                                    "parentdev",
>> +                                    "parentdev %s ",
>> +                                    rta_getattr_str(tb[IFLA_PARENT_DEV_NAME]));
>> +               }
>>         }

-- 
Sergey

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ