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]
Date:   Tue, 12 Jun 2018 17:06:59 -0600
From:   Subash Abhinov Kasiviswanathan <subashab@...eaurora.org>
To:     Daniele Palmas <dnlplm@...il.com>
Cc:     netdev@...r.kernel.org,
        Stephen Hemminger <stephen@...workplumber.org>
Subject: Re: [PATCH 1/1] ip: add rmnet initial support

> +
> +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.

-- 
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