Re: [RFC PATCH net-next 4/7] net: ip: make fib_validate_source() return drop reason

From: Antoine Tenart
Date: Thu Sep 19 2024 - 10:44:01 EST


Quoting Menglong Dong (2024-09-19 11:41:44)
>
> @@ -2339,8 +2345,11 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32 daddr, __be32 saddr,
> if (!ipv4_is_zeronet(saddr)) {
> err = fib_validate_source(skb, saddr, 0, tos, 0, dev,
> in_dev, &itag);
> - if (err < 0)
> + if (err < 0) {
> + err = -EINVAL;
> + __reason = -err;

That should be:

__reason = -err;
err = -EINVAL;


Also this patch should take care of the fib_validate_source call in
ip_mc_validate_source.

Thanks!
Antoine