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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 19, 2024 at 10:43 PM Antoine Tenart <atenart@xxxxxxxxxx> wrote:
>
> 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;

Oops, my mistake!

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

Yeah, I should do the same thing in ip_mc_validate_source().

Thanks!





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux