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  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, 20 Oct 2020 07:33:23 -0400
From:   Roman Mashak <mrv@...atatu.com>
To:     Petr Machata <me@...chata.org>
Cc:     netdev@...r.kernel.org, dsahern@...il.com,
        stephen@...workplumber.org, john.fastabend@...il.com,
        jiri@...dia.com, idosch@...dia.com
Subject: Re: [PATCH iproute2-next 11/15] lib: Extract from iplink_vlan a helper to parse key:value arrays

Petr Machata <me@...chata.org> writes:


[...]

> +static int parse_qos_mapping(__u32 key, char *value, void *data)
> +{
> +	struct nlmsghdr *n = data;
> +	struct ifla_vlan_qos_mapping m = {
> +		.from = key,
> +	};
> +
> +	if (get_u32(&m.to, value, 0))
> +		return 1;
> +
> +	addattr_l(n, 1024, IFLA_VLAN_QOS_MAPPING, &m, sizeof(m));
> +	return 0;
> +}

addatr_l() may fail if netlink buffer size is not sufficient, may be:

return addattr_l(...);

would be better.

Powered by blists - more mailing lists