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]
Message-ID: <CAGRyCJH9XQusSu4h+NhnQvZsxOqvJAvJsnvUpJbszJLVOdH1_A@mail.gmail.com>
Date:   Wed, 13 Jun 2018 16:53:03 +0200
From:   Daniele Palmas <dnlplm@...il.com>
To:     Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
Cc:     netdev@...r.kernel.org,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH 1/1] ip: add rmnet initial support

2018-06-13 1:06 GMT+02:00 Subash Abhinov Kasiviswanathan
<subashab@...eaurora.org>:
>> +
>> +static void print_explain(FILE *f)
>> +{
>> +       fprintf(f,
>> +               "Usage: ... rmnet mux_id MUXID\n"
>> +               "\n"
>> +               "MUXID := 1-127\n"
>> +       );
>> +}
>
>
> Hi Daniele
>
> This range can be from 1-254.
>
>> +
>> +static void explain(void)
>> +{
>> +       print_explain(stderr);
>> +}
>> +
>> +static int rmnet_parse_opt(struct link_util *lu, int argc, char **argv,
>> +                          struct nlmsghdr *n)
>> +{
>> +       __u16 mux_id;
>> +
>> +       while (argc > 0) {
>> +               if (matches(*argv, "mux_id") == 0) {
>> +                       NEXT_ARG();
>> +                       if (get_u16(&mux_id, *argv, 0))
>> +                               invarg("mux_id is invalid", *argv);
>> +                       addattr_l(n, 1024, IFLA_RMNET_MUX_ID, &mux_id, 2);
>
>
> You could use addattr16() instead since it is __u16.
>

Thanks Subash, I'll fix those in v2.

Regards,
Daniele

> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ