Re: [RFC] nftables: reverse path filtering for nft

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

 



On Mon, Sep 12, 2016 at 09:00:25PM +0200, Florian Westphal wrote:
> Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> wrote:
> >         fib lookup ip daddr . oif
> > 
> > As you are basically looking for the route based on IPv4 address and
> > the output interface, so this boils down to:
> > 
> >         fib lookup $expr $flags
> 
> How would the kernel disentangle the register data?

What I'm proposing is to represent this as a concatenation, since this
represents the tuple that you use to look up for route.

> (i.e., how do i know where in the sreg e.g. the daddr is
>  that i need to stuff in the flowi struct?)

You can iterate over the concatenation compound from the
netlink_linearize path, it is just a list of expressions. Then, you
can set the NFTA_FIB_* netlink attribute using them.

>From the evaluation step, you would need to validate that the
expressions that we're using in the concatenation fit into flowi
struct, otherwise tell the user that they are not supported.

We cannot not actually support every tuple, as we are constrained by
flowi.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux