Re: [PATCH nf-next] netfilter: introduce support for reject at prerouting stage

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

 



On Thu, May 28, 2020 at 7:24 PM Florian Westphal <fw@xxxxxxxxx> wrote:
>
> Laura Garcia Liebana <nevola@xxxxxxxxx> wrote:
> > +static void nf_reject_fill_skb_dst(struct sk_buff *skb_in)
> > +{
> > +     struct dst_entry *dst = NULL;
> > +     struct flowi fl;
> > +     struct flowi4 *fl4 = &fl.u.ip4;
> > +
> > +     memset(fl4, 0, sizeof(*fl4));
> > +     fl4->daddr = ip_hdr(skb_in)->saddr;
> > +     nf_route(dev_net(skb_in->dev), &dst, &fl, false, AF_INET);
>
> Hmm, won't that need error handling for the case where we can't find
> a route?

Right. I'll send a v2.

Thanks.



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux