[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <a84630b6-7776-623e-9a95-e483efec5cfa@blackwall.org>
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