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:   Thu, 30 Sep 2021 09:53:27 +0300
From:   Nikolay Aleksandrov <razor@...ckwall.org>
To:     David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Cc:     roopa@...dia.com, donaldsharp72@...il.com, idosch@...sch.org,
        Nikolay Aleksandrov <nikolay@...dia.com>
Subject: Re: [RFC iproute2-next 07/11] ip: nexthop: add cache helpers

On 30/09/2021 06:39, David Ahern wrote:
> On 9/29/21 9:28 AM, Nikolay Aleksandrov wrote:
>> @@ -372,7 +409,7 @@ static int ipnh_parse_nhmsg(FILE *fp, const struct nhmsg *nhm, int len,
>>  		if (RTA_PAYLOAD(tb[NHA_GATEWAY]) > sizeof(nhe->nh_gateway)) {
>>  			fprintf(fp, "<nexthop id %u invalid gateway length %lu>\n",
>>  				nhe->nh_id, RTA_PAYLOAD(tb[NHA_GATEWAY]));
>> -			err = EINVAL;
>> +			err = -EINVAL;
>>  			goto out_err;
>>  		}
>>  		nhe->nh_gateway_len = RTA_PAYLOAD(tb[NHA_GATEWAY]);
>> @@ -383,7 +420,7 @@ static int ipnh_parse_nhmsg(FILE *fp, const struct nhmsg *nhm, int len,
>>  	if (tb[NHA_ENCAP]) {
>>  		nhe->nh_encap = malloc(RTA_LENGTH(RTA_PAYLOAD(tb[NHA_ENCAP])));
>>  		if (!nhe->nh_encap) {
>> -			err = ENOMEM;
>> +			err = -ENOMEM;
>>  			goto out_err;
>>  		}
>>  		memcpy(nhe->nh_encap, tb[NHA_ENCAP],
>> @@ -396,13 +433,13 @@ static int ipnh_parse_nhmsg(FILE *fp, const struct nhmsg *nhm, int len,
>>  		if (!__valid_nh_group_attr(tb[NHA_GROUP])) {
>>  			fprintf(fp, "<nexthop id %u invalid nexthop group>",
>>  				nhe->nh_id);
>> -			err = EINVAL;
>> +			err = -EINVAL;
>>  			goto out_err;
>>  		}
>>  
>>  		nhe->nh_groups = malloc(RTA_PAYLOAD(tb[NHA_GROUP]));
>>  		if (!nhe->nh_groups) {
>> -			err = ENOMEM;
>> +			err = -ENOMEM;
>>  			goto out_err;
>>  		}
>>  		nhe->nh_groups_cnt = RTA_PAYLOAD(tb[NHA_GROUP]) /
> 
> those should go with previous patches.
> 

Oops, this one was a last minute change, I didn't notice I've done it in the wrong patch.
Of course I'll fix it for the non-rfc submission.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ