Re: [PATCH net-next v3 02/10] net: ip: make fib_validate_source() return drop reason

From: Paolo Abeni
Date: Mon Oct 21 2024 - 06:42:13 EST


On 10/21/24 12:20, Paolo Abeni wrote:
> On 10/15/24 16:07, Menglong Dong wrote:
>> @@ -1785,9 +1785,10 @@ static int __mkroute_input(struct sk_buff *skb, const struct fib_result *res,
>> return -EINVAL;
>> }
>>
>> - err = fib_validate_source(skb, saddr, daddr, dscp, FIB_RES_OIF(*res),
>> - in_dev->dev, in_dev, &itag);
>> + err = __fib_validate_source(skb, saddr, daddr, dscp, FIB_RES_OIF(*res),
>> + in_dev->dev, in_dev, &itag);
>> if (err < 0) {
>> + err = -EINVAL;
>> ip_handle_martian_source(in_dev->dev, in_dev, skb, daddr,
>> saddr);
>
> I'm sorry for not noticing this issue before, but must preserve (at
> least) the -EXDEV error code from the unpatched version or RP Filter MIB
> accounting in ip_rcv_finish_core() will be fooled.

Please, ignore this comment. ENOCOFFEE here, sorry.

/P